[Libreoffice-bugs] [Bug 103690] macOS: libreoffice crash on startup, VCL thread mutex condition
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Feb 22 10:24:41 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=103690
--- Comment #57 from Tor Lillqvist <tml at iki.fi> ---
I think the essential thing in the tracebacks that hasn't bee mentioned (?) is
the -[VCL_NSApplication screenParametersChanged:] line. For some reason, on
some machines, that notification gets called too early before the SolarMutex
has been set up (and VCL initialised in general).
However, I could not reproduce it directly on my machine, using any of the
hints above (tried both running
"instdir/LibreOfficeDev.app/Contents/MacOS/soffice", "open
instdir/LibreOfficeDev.app", and even putting it into the Dock and clicking
that. The screenParametersChanged: method does not get called.
I think in some other Mac crash bug report I have seen mentions that if the
Dock has been resized to a non-standard size you would get crashes, so I tried
that, too. I even tried resizing it back and forth while LO was starting, and
with the machine loaded with a LO build with make -j10. But no crash.
But, if I add a sleep(5) in initNSApp() (vcl/osx/salinst.cxx):
> [[NSNotificationCenter defaultCenter] addObserver: NSApp
> selector: @selector(screenParametersChanged:)
> name: NSApplicationDidChangeScreenParametersNotification
> object: nil ];
> SAL_DEBUG(" sleeping a bit");
> sleep(5);
> SAL_DEBUG(" slept");
and then change the Dock size in System Preferences while LO is sleeping,
Boom!. The backtrace is exactly as mentioned here.
I guess it is possible that some machines have some modifications to settings,
or particular hardware or software, that causes the system to send all apps a
NSApplicationDidChangeScreenParametersNotification when they start, and in the
LibreOffice case that arrives before it is ready.
So, the fix to this bug is probably to move the notification addObserver: calls
to some later point, after VCL and the SolarMutex have been initialised. Will
experiment.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180222/1295eeae/attachment.html>
More information about the Libreoffice-bugs
mailing list