Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Crash when Coin library is used #17

Closed
sanguinariojoe opened this issue Feb 5, 2024 · 2 comments
Closed

Crash when Coin library is used #17

sanguinariojoe opened this issue Feb 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sanguinariojoe
Copy link

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 kmoks added the bug Something isn't working label Feb 6, 2024
kmoks added a commit that referenced this issue Feb 7, 2024
exists when invoking FdDB::init() later, but before Fui::start().
This will hopefully fix #17.
Remove the unneccessary static method Fui::mainWIndowUI().
@kmoks
Copy link
Contributor

kmoks commented Feb 7, 2024

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
Copy link
Author

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

@sanguinariojoe sanguinariojoe mentioned this issue Feb 7, 2024
Closed
@kmoks kmoks closed this as completed in 2a8a7b5 Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants