Comments (5)
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 triggered
event handler I add a setTimeout(buildMenu, 250);
Where the buildMenu()
creates a NEW QMenuBar, and all new QMenu's and then sets the newly created QMenuBar as the main window menubar. Basically replacing and discarding the prior menu any time anything is done with a menu selection. It isn't perfect, but it does make the app usable for using more than one menu item...
from nodegui.
v0.59.2 does not exhibit this crash for me. 100% reproducible with v0.60 and v0.61.
from nodegui.
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.
from nodegui.
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:
qode!v8::internal::SetupIsolateDelegate::SetupHeap
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.
from nodegui.
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.
from nodegui.
Related Issues (20)
- Failed to install HOT 2
- The packer is broken and nobody is attending to the repo HOT 2
- Is anybody working on it ? HOT 5
- How to open the "console" window after build HOT 1
- Make icons optional for QTabWidget.addTab HOT 2
- Sub-Tree items disappear when window is resized
- Arm64 support for MacOS HOT 3
- cannot open shared object file
- Consider using getters and setters
- Display above fullscreen apps (games)
- Cannot access children!
- Slight typo in tutorial.md
- cannot load @rpath/QtSvgWidget on v0.62.0 on m1 mac HOT 1
- mqtt.js client causes event loop to stop HOT 2
- Linux Wayland support
- npm install with custom Qt installation is looking for Qt6 libraries, however qt5 is mentioned in the Readme (m2 Mac) HOT 2
- How To use NodeGui without typescript?
- Please implement StackedLayout HOT 3
- NodeGui build for arm64
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodegui.