SAP-archive / fedem-gui

Graphical user interface for FEDEM
https://openfedem.org
Apache License 2.0
1 stars 6 forks source link

Crash when Coin library is used #17

Closed sanguinariojoe closed 7 months ago

sanguinariojoe commented 7 months ago

When Coin is found the GUI crashes during the spashscreen, because FUI is initialized here, and then FdDB is asked to intialized also here.

Unfortunately, Fui::getMainWindow() cannot be called until Fui::start() is called at https://github.com/SAP/fedem-gui/blob/main/src/vpm_main.C#L244

Thus a NULL is passed to SoQt::init(), so the program crashes.

kmoks commented 7 months ago

I can't reproduce this crash on my system (Windows, with Visual Studio 2019), but I could verify that a NULL pointer is passed to SoQt::init() like you said. Maybe you are using a different (newer) version of the SoQt library, @sanguinariojoe ? Anyway, I tried a fix (see top commit on the PR #18), where the creation of the mainWindow object is moved to Fui::init() instead. It works well for me, but it would be great if you could verify that it fixes the crash on your side as well, before this is merged. Thanks!

sanguinariojoe commented 7 months ago

It is not NULL anymore. It is still crashing to me though. I will further investigate and let you now. But I will say your commit fixed the issue