-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
MenuBar Global Menu queue_free() on PopupMenu causes crash during runtime #89066
Comments
Unfortunately you are going to have to do a little bit of investigation before we can help you. Ideally, you would compile the engine with debug symbols so that you can get a proper stack trace. The one you have posted just contains random information and doesn't help us identify the issue. If you can't do that, you will have to trim down your project to be as small as possible while still recreating the error. We call that an MRP. Without one of those we can't really do anything as we don't have enough information to go off of. The title of your post seems unrelated to the content of the post. But the error message that is in the title usually occurs when you try to render an object using a ViewportTexture that points to the Viewport you are trying to render the object into. Doing so is not allowed, hence the error. If you are getting that error consistently, I would start by trying to find places where you might be doing that and fixing them. |
@clayjohn I'll compile with symbols once I get home tonight and report back! I do have a separate viewport that I eventually take the texture from, but I can't even get to the scene that happens in. If this isn't allowed, its strange it works fine in Windows and in dev3 works both MacOS and windows. |
The error could be a red herring. Let me know how your investigation goes! |
@clayjohn Thanks for your advice through this! Here is the MacOS crash log generated after compiling from source with debug symbols enabled. And a new godot.log:
Luckily, this runs fine on dev3 and in its actual development in 4.2, If you need me to do any more testing please let me know. Again, I would be willing to let a trusted user look at my project if need be, but I have spent a lot of time and money on this and its currently for sale on itch. |
I'll disable or remove my MenuBar setup and report back tomorrow. And I think this is an issue with MacOS, as it works fine on Windows and Linux (Tested it when I got home). So something between dev3 and dev4 for MacOS may be at fault. |
I have removed the MenuBar and it works just fine. Seems the issue is related to what @clayjohn linked. |
I have an update, after finding out that it was a problem with the MenuBar, I went through and started commenting out my MenuBar code and I found out what is causing the issue.
The part in the example is removing the popup menu that would be there if you were in Windows or another non-global menu OS, all the items get moved to the "_apple" global menu and then this is removed since its no longer needed. I also tried calling %MenuBar.remove_child(%System) and that also crashes. Calling %System.hide() does nothing. I have fixed it by calling %MenuBar.set_menu_hidden, this might be the preferred way of doing it rather than queue_free. |
I can't reproduce any issues with removing native menus from |
Tested versions
Happens only in 4.3.dev4, works fine in 4.3.dev3 and 4.2 stable.
System information
Godot v4.3.dev4 - macOS 14.3.0 - GLES3 (Compatibility) - Apple M1 - Apple M1 (8 Threads)
Issue description
This error does not happen when I run it in Windows.
I can open the project fine, and even run it. But after a while it will crash at runtime in each Renderer. Forward+ and Mobile produce an actual error in the Editor and Compatibility just crashes and I have to refer to the godot.log. The title is the error that Forward and Mobile produce, and here is the log from Compatibility:
4.3.dev3 works fine.
I thought this might have something to do with a shader so I removed it and it still crashes.
I only found this issue because I wanted to try some of the new global menu additions available in 4.3 that 4.2 does not have so this is a fork of my main from 4.2 which works 100% perfectly.
Steps to reproduce
Open the Editor, press Run, wait until crash.
Minimal reproduction project (MRP)
I will provide if necessary, but this is a long time project that I would prefer not be made public.
The text was updated successfully, but these errors were encountered: