Issue 117968 - crash when duplicating draw page with linked pictures
Summary: crash when duplicating draw page with linked pictures
Alias: None
Product: Draw
Classification: Application
Component: editing (show other issues)
Version: DEV300m106
Hardware: PC Windows XP
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact: issues@graphics
Depends on:
Reported: 2011-05-02 14:39 UTC by Regina Henschel
Modified: 2013-07-11 13:04 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

OOo crashes on opening the file (19.45 KB, application/zip)
2011-05-02 14:39 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2011-05-02 14:39:17 UTC
Created attachment 76473 [details]
OOo crashes on opening the file

I had made a draw page with 9 picture, all linked to the same file. Then I used Insert > Duplicate Slide. DEV300m106 crashes immediately.

When DEV300m106 tries to recover the file it crashes again immediately.

When I try to open the file in a non-pro DEV300m100, then that version crashes too and I get two error messages in the debug log (the first one is likely i115594):

Error: invalid type for InteractionHandler From File c:/DEV300m100my/sfx2/source/appl/appuno.cxx at Line 515

Error: SolarMutex not locked From File C:/DEV300m100my/vcl/source/app/dbggui.cxx at Line 1970

The attached zip-file contains the document and the linked picture.
Comment 1 Regina Henschel 2011-05-02 15:20:03 UTC
Addition: The file opens without problems in OOo3.3.
Comment 2 Regina Henschel 2011-05-02 20:20:27 UTC
OOo3.4 Beta crashes too, when I open the attached file. And OOo3.4 Beta crashes too, when I follow the described scenario. You need at least two linked pictures on the first page to reproduce the crash.
Comment 3 Armin Le Grand 2011-11-02 14:22:50 UTC
ALG: I can even reproduce with a single linked image, need to check...
Comment 4 Regina Henschel 2011-11-03 09:16:24 UTC
The bug has been fixed in LibreOffice, see
Comment 5 Armin Le Grand 2012-05-31 17:06:15 UTC
ALG: This has to do with asynchronous graphic loading (not with errors in WMF import or rendering). If forcing in SdrGrafObj::ImpUpdateGraphicLink bAsynchron to false all goes well.
The async loading uses the class SdrGraphicUpdater which uses ::osl::Thread to create working threads. This works in principle but seems to have problems with too many same graphics (?). It may have problems with count graphics at all, need to check.
On the stack is something interesting:

svt.dll!_getenv()  + 0x50371 bytes	C++
svt.dll!_getenv()  + 0x510cb bytes	C++
svt.dll!_getenv()  + 0x511b1 bytes	C++
svt.dll!_getenv()  + 0x5127d bytes	C++
svt.dll!_getenv()  + 0x4bca5 bytes	C++
svxcore.dll!_DisableThreadLibraryCalls@4()  + 0xa1590 bytes	C++
svxcore.dll!_DisableThreadLibraryCalls@4()  + 0xa169b bytes	C++

I could not find _DisableThreadLibraryCalls in the whole trunk, this maybe something special. Does the @4 mean that from four threads up threading gets disabled? Does someone know more about ::osl::Thread...?
Comment 6 Armin Le Grand 2012-06-12 11:08:51 UTC
ALG: Problem is that the WMFReader and it's helper classes in winmtf.cxx use VirtualDevices as helpers in some cases, this is not thread safe. Locking the SolarMutex when these are used will solve the problem. I'm just curious why this worked in OOo3.3. Checked various possibilities, but could not find a reason. Nonetheless, making WMFReader thread-safe is not wrong. Doing some more checks...
Comment 7 Armin Le Grand 2012-06-12 11:31:27 UTC
ALG: Done, checked in. Also took a 2nd look why this did not happen in OOo3.3, but found no hints.
Comment 8 Oliver-Rainer Wittmann 2012-06-13 12:28:52 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.
Comment 9 liuping 2012-06-25 05:56:19 UTC
confirm fixing the bug on ver 1351249 in Win7 ,pass