Inkscape crashes on load CDR select sheet

Bug #1395435 reported by Fred Philpott
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Patrick Storz

Bug Description

When attempting to load a CDR file Inkscape crashes while trying to select the sheet number. Coreldraw V8 file. Inkscape 0.91-Pre2 64 bit. Windows 8.1.

Variation (same kind of dialog used for Visio files):
Bug #1441437 “crashes when load multi page visio and select page 2 or more”

Revision history for this message
su_v (suv-lp) wrote :

Please attach a sample file to allow further investigation (with different Inkscape versions, on other platforms).

(Seems very similar to bug #1240966 (private report))

Changed in inkscape:
status: New → Incomplete
tags: added: cdr crash importing win32
tags: added: win64
removed: win32
Revision history for this message
Fred Philpott (nred) wrote : Re: [Bug 1395435] Re: Inkscape crashes on load CDR select sheet

On 2014-11-23 11:08, ~suv wrote:
> Please attach a sample file to allow further investigation (with
> different Inkscape versions, on other platforms).
>
> (Seems very similar to bug #1240966 (private report))
>
> ** Changed in: inkscape
> Status: New => Incomplete
>
> ** Tags added: cdr crash importing win32
>
> ** Tags removed: win32
> ** Tags added: win64
>

Revision history for this message
su_v (suv-lp) wrote :

Crash not reproduced on OS X 10.7.5 (64bit) with
- Inkscape 0.91+devel r13750
- Inkscape 0.91pre2 r13518, r13654

Tested with libcdr 0.0.10, 0.0.14 and 0.1.0 (git master).

Changed in inkscape:
status: Incomplete → New
Revision history for this message
Fred Philpott (nred) wrote :

Windows 8.1 - OS Version 6.3.9600
Intel i7-4710MQ
Inkscape 0.91pre2 r13516

Will try to get later version for testing.

On 2014-11-24 09:27, ~suv wrote:
> Crash not reproduced on OS X 10.7.5 (64bit) with
> - Inkscape 0.91+devel r13750
> - Inkscape 0.91pre2 r13518, r13654
>
> Tested with libcdr 0.0.10, 0.0.14 and 0.1.0 (git master).
>
> ** Changed in: inkscape
> Status: Incomplete => New
>

Revision history for this message
Alvin Penner (apenner) wrote :

confirmed on Windows XP, Inkscape rev 13709.
the crash occurs when switching pages in the preview dialog.
backtrace attached, unfortunately it looks like it is quite Windows-specific.

...............................................

C:\InkscapeBZR\inkscape>gdb inkscape
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(no debugging symbols found)
(gdb) symbol-file inkscape.dbg
Reading symbols from C:\InkscapeBZR\inkscape/inkscape.dbg...done.
(gdb) run
Starting program: C:\InkscapeBZR\inkscape/inkscape.exe
[New thread 804.0xa2c]
[New thread 804.0x698]
[New thread 804.0xafc]
[New thread 804.0xe3c]
[New thread 804.0xe38]
[New thread 804.0xe28]
[New thread 804.0xe44]
[New thread 804.0xe48]
[New thread 804.0xc18]
warning: Lowest section in C:\WINDOWS\system32\xpsp2res.dll is .rsrc at 00011000

warning: HEAP[inkscape.exe]:
warning: Invalid Address specified to RtlFreeHeap( 00030000, 092F38A0 )

Program received signal SIGTRAP, Trace/breakpoint trap.
0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
(gdb) bt
#0 0x7c90120f in ntdll!DbgUiConnectToDbg ()
   from C:\WINDOWS\system32\ntdll.dll
#1 0x7c96e139 in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\WINDOWS\system32\ntdll.dll
#2 0x7c96e576 in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\WINDOWS\system32\ntdll.dll
#3 0x7c96f75e in ntdll!RtlpNtMakeTemporaryKey ()
   from C:\WINDOWS\system32\ntdll.dll
#4 0x7c94bc4c in ntdll!LdrFindEntryForAddress ()
   from C:\WINDOWS\system32\ntdll.dll
#5 0x00030000 in ?? ()
#6 0x50000061 in ?? ()
#7 0x092f38a0 in ?? ()
#8 0x00030000 in ?? ()
#9 0x092f38a0 in ?? ()
#10 0x40000060 in ?? ()

Changed in inkscape:
status: New → Confirmed
su_v (suv-lp)
tags: added: win32
Changed in inkscape:
importance: Undecided → High
su_v (suv-lp)
description: updated
Revision history for this message
francoisb (francoisbrest) wrote :

Same bug: Windows 8.1; AMD C-70 APU 64bits; Inkscape 0.91 r13725

crash doesn't occur in Inkscape 0.48.4 r9939 (but all pages are merged in the same page)

su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.92
jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
Patrick Storz (ede123) wrote :

Here's a patch that should fix most issues of bug #1395435 and bug #1441437 (I guess some issues might already have been fixed by the recent update of both devlibs and devlibs64 to include the latest librevenge based import filters):
- Loading preview images of pages works as intended
- Using enter key in input box does not cause the import to fail
- Clicking arrow up/down does not cause the spinner to increase/decrease by multiple pages*

* This was caused by the main thread being blocked with rendering the preview. The "mouse-up" event on the arrow button was therefore being delayed until rendering of the preview was completed. The artificially prolonged "mouse-down" on the arrow button then caused the widget to increase the page number more than expected.
I fiddled around with this a bit and tried to do the preview rendering in an idle callback of the main thread which sadly did not work (same symptoms). I resorted to using a timeout for now which is not satisfying but works well enough. To address this fully real multi-threading is probably required.

I tested this patch on Windows 7 x64 in both 32-bit builds and 64-bit builds of trunk revision 14691 as well as on Windows XP x86 and wasn't able to trigger any crashes. Please verify if possible.

jazzynico (jazzynico)
Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Patch from comment #7 tested successfully on Windows XP, Inkscape trunk rev. 14696, except for:
> - Clicking arrow up/down does not cause the spinner to increase/decrease by multiple pages*

Still affected here. The click must be very quick to increase by 1 page. I don't know if the mouse click delay is set at the application level, but I *feel* it's faster in the CDR import dialog.

Thanks for the fix!

Revision history for this message
Patrick Storz (ede123) wrote :

Committed in revision 14751.
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14751

The fix is based on the patch from comment #7.
The SpinButton issue should be properly fixed now (Rendering the preview is delayed until the mouse button is released)
I also simplified the dialog code a bit and made is resizeable so please check for regressions if possible (I tested on Windows 7 x64 with GTK2/3 builds)

Changed in inkscape:
status: In Progress → Fix Committed
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.