-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞QMenu causes the application to crash #1012
Comments
v0.59.2 does not exhibit this crash for me. 100% reproducible with v0.60 and v0.61. |
I updated to the master branch version right before the v0.62.0 launch from v0.59.0 today (8/28/2023) but my project started to crash after some seconds of use, I guess this was the cause. I decided to install v0.62.0 but got an error related to /node_modules/@nodegui/nodegui/dist/index.js directory, I did a downgrade to v0.61.2 and my project started to crash randomly again. Tried with v0.61.0, and still the crashes were there so I did a complete downgrade to v0.59.0 and then there were no crashes... I returned to v0.62.0 to make some tests, since my project has a fixed-size window. The crash can be triggered by hovering QMenu items in the first seconds of running the program, if I wait enough I can hover and click them safely. The crash seems to happen faster when setNativeMenuBar is true. I removed the QMenuBar from my app and there were no crashes. Hope that this helps, not being able to update is bad. |
I'm only seeing this occur on Windows (perhaps related to QMenuBar). Not sure it's helpful, but testing with WinDbg shows the following exception:
It also doesn't seem to crash while the triggered function, if you have an action assigned to the menu item (ie, showing a dialog), is running. It'll crash after it is completed. Hover events don't seem to crash and if a menu isn't selected, it doesn't crash. v0.60 did changes to menus, so that makes sense why it only shows up in that version. |
I have to say I'm also seeing this issue in v.065 with QMenuBar/QMenu. I do NOT get a stack trace, but it randomly exits typically on the second interaction with the menu on Linux. Hitting ALT-F for the &File menu in my app then escape twice to close the menu and exit the menu navigation then do something else that causes some other part of the screen to refresh a QWidget, then tap ALT-P for the Program menu, and boom, app crashes instantly. |
For those who might be interested -- I did find a way to make the QMenuBar/QMenu massively more stable at least in my app. Basically in the menu's |
I also see this bug.
PS Running NodeGui on Windows with VSCode, all current. |
Describe the bug
If you make a simple application with a QMenu, and then call a lot of window resize events, then when you further hover over the menu, the application collapses with an error:
/c/Program Files/nodejs/npm: line 44: 9202 Segmentation fault "$NODE_EXE" "$NPM_CLI_JS" "$@"
To Reproduce
Run this code then resize the window like in the video:
issue.mp4
Expected behavior
App should be fine
Desktop (please complete the following information):
Additional context
In fact, it’s not even about resizing, it’s just that it’s easy to catch an error on it with this minimal code for reproduction.
The text was updated successfully, but these errors were encountered: