Bug 106857 - Assertion failed when cancel edit snap line dialog
Summary: Assertion failed when cancel edit snap line dialog
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: x86 (IA32) Windows (All)
: medium major
Assignee: Julien Nabet
QA Contact:
URL:
Whiteboard: target:5.4.0 target:5.2.7 target:5.3.3
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2017-03-29 18:30 UTC by Regina Henschel
Modified: 2017-04-04 11:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Assertion failed screenshot (18.93 KB, image/png)
2017-03-29 18:30 UTC, Regina Henschel
Details
bt with debug symbols (8.50 KB, text/plain)
2017-03-29 20:41 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-03-29 18:30:30 UTC
Created attachment 132263 [details]
Assertion failed screenshot

Take a Draw document. Insert a snap line by dragging it from the vertical ruler. Right click the snap line and choose item "Edit Snap Line". Click on the "Cancel", the "Edit" or the "Delete" button in that dialog. An assertion pops up, see attached screenshot.

I get this in Version: 5.4.0.0.alpha0+
Build ID: a5c947579253a7f4e784004e18929af5ab22fa28
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-03-02_01:57:01
Locale: de-DE (de_DE); Calc: group
Comment 1 Julien Nabet 2017-03-29 20:41:26 UTC
Created attachment 132271 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I got a crash when adding a snap line from menu.
I'm adding bt here and don't create new bugtracker because I think, seeing the screenshot, it's more than related.
Comment 2 Julien Nabet 2017-03-29 20:46:35 UTC
With this patch I don't reproduce the crash and can also edit the snapline:
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 1b9a51655c5a..342108f3d6b8 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -156,8 +156,8 @@ void SdSnapLineDlg::GetAttr(SfxItemSet& rOutAttrs)
     nYValue = Fraction( GetCoreValue( *m_pMtrFldY, MapUnit::Map100thMM) ) * aUIScale;
 
     rOutAttrs.Put(SfxAllEnumItem(ATTR_SNAPLINE_KIND, (sal_uInt16)eKind));
-    rOutAttrs.Put(SfxUInt32Item(ATTR_SNAPLINE_X, nXValue));
-    rOutAttrs.Put(SfxUInt32Item(ATTR_SNAPLINE_Y, nYValue));
+    rOutAttrs.Put(SfxInt32Item(ATTR_SNAPLINE_X, nXValue));
+    rOutAttrs.Put(SfxInt32Item(ATTR_SNAPLINE_Y, nYValue));
 }

Regina: if you build LO from sources, would you have a little time to give the patch a try?
Indeed, I haven't seen the toolbar to insert snapline, that's why I used menu.
Comment 3 Regina Henschel 2017-03-29 21:15:16 UTC
Julien: No, for the next two weeks I cannot build LO.
Comment 4 Julien Nabet 2017-03-30 05:21:40 UTC
Let's give it a try with https://gerrit.libreoffice.org/#/c/35885/
Comment 5 Commit Notification 2017-03-30 08:05:22 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e1ff3782cc0bef951e7e5f0166c2b2395eaee26b

tdf#106857: use SfxInt32Item for ATTR_SNAPLINE

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Julien Nabet 2017-03-30 08:07:03 UTC
For 5.2 branch: https://gerrit.libreoffice.org/#/c/35896/
For 5.3: https://gerrit.libreoffice.org/#/c/35895/

Let's wait for your feedback with next daily build including the patch.
Comment 7 Commit Notification 2017-03-30 10:07:41 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=86ac337ffefff18913f2ef3d87fffbfd24ebedc0&h=libreoffice-5-2

tdf#106857: use SfxInt32Item for ATTR_SNAPLINE

It will be available in 5.2.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2017-03-30 10:32:41 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b688a226c5e346e7fb27cdfc22190ed516afc0f4&h=libreoffice-5-3

tdf#106857: use SfxInt32Item for ATTR_SNAPLINE

It will be available in 5.3.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Julien Nabet 2017-04-04 11:44:21 UTC
Let's put this to FIXED.
Regina: don't hesitate of course to reopen this tracker if it's not ok with a build including the patch.