-
Notifications
You must be signed in to change notification settings - Fork 13
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
Editor crash on Godot 3.5.2 #123
Comments
Hmm that's strange, thanks for reporting, do you think you could give me the output of I assume you have only one version of the addon at the time? (not two?) |
Some notes about the tree and project:
|
Maybe I have it! we built for 3.5.1, if you use 3.5.2 you may have to build yourself! https://github.com/MatejSloboda/Dijkstra_map_for_Godot#method-2-from-github |
Interesting. I could try that next time I'm working on it, although I may need more guidance on how to install the GDNative dependencies (step 3) and where to run the cargo command from in step 4 (the cloned repo's root?). The instructions do assume you know how to work with the Rust ecosystem a bit, but I'm using this for its functionality rather than the language it's made with. (I've never really worked with Rust outside of past troubleshooting for this addon.) For what it's worth, the addon functions fine while the game is running. |
I found the culprit in https://github.com/godot-rust/gdnative README
building yourself will not solve the issue (i would have provided guidance tho, don't worry) Although this might be an working option https://godot-rust.github.io/book/gdnative/advanced/custom-godot.html otherwise maybe getting 3.5.1 if it's acceptable for you ! |
I can see if i can reproduce the issue in 3.5.1. The crashes have been going on long enough, I'm skeptical that's the issue. But I only checked the log recently and saw the "dijkstra_map_gd::Interface has already been registered as Interface" error, so it's possible older crashes were unrelated. Does it make sense that building for a different maintenance version of Godot could cause this? Thanks for your assistance, by the way! |
To me it doesn't make much sense, I would expect errors of crashing because wrong types or number of argument were passed (cause that's mostly whats changing) Your welcome! I love to help ^^ |
What's your OS btw? |
I'm on Windows 10 |
I had to try several times, but I managed to reproduce it on 3.5.1. This was on opening the project:
So it's not just on 3.5.2, although it might crash more on the newer version -- it's hard to tell, since it's pretty random. |
I'm very unsure what's happening :/ |
I'm running an experiment now on 3.5.2 where I've changed the Run > Main Scene to a random test scene that doesn't reference anything, by script or by instance, that references the DijkstraMap addon. That means that when I load the project from the splash menu, it won't be loading a game level scene that references the addon like it had been. If I can't get it to crash this way, maybe it has something to do with opening the project to a scene that uses the plugin. Perhaps there's a race condition involving load order or static type class names that causes it to sometimes register twice. Edit: Godot 3 regularly spits out errors about an "type (Foo) not matching argument type (Foo)", or something like that, because it gets confused on static typing and thinks a class script is busted. (But then it works fine when I run the game.) So while I'm not seeing that error when I get the rust crashes (because the rust crash happens early), basically, I don't trust it to be loading a scene with a bunch of scripts that reference each other's types without doing something weird. Update: Well, there goes that workaround. I left it open for awhile and clicked back into the Godot window to try another reload, and it immediately crashed with the same error. This one wasn't even on project load. I guess the next experiment will be to remove the static typing references to DijkstraMap and see if it somehow stops crashing. So weird. |
https://github.com/godot-rust/gdnative/blob/3731a64f441fcd87ac5010f296fd9fc03763c490/gdnative-core/src/init/init_handle.rs#L79 appears to be the line in 0.11.0 It looks like the latest, 0.11.3, changes that function quite a bit: godot-rust/gdnative@0.11.0...0.11.3#diff-862a5680ed5c09514682c79a5aa2cfda611f6cbbf7a28f47d0cf5ec695b3584cR122 Notably, the panic line has been replaced with what looks to me as a non-rust-user like a more permissive check.
After:
So your suggestion of building it myself might actually do the trick after all! If you can walk me through installing the GDNative dependencies (step 3) and where to run the cargo command from in step 4, then I'll give that a try. If it works, maybe you'll be able to update the prebuilt binaries for 3.5.1 (or maybe even 3.5.2) the same way. |
Yea, maybe godot tried to register more agressively and gdnative allowed it, anyway ~~~ if it does build in release and proceed with the guide ;) was this detailed enough? |
I still can't get over how much space Visual Studio and Clang tools take, which is what stopped me from building myself back in October. (It does not allow you to change the install location for everything, so several gigs still end up in my tiny, almost full system drive!) Googling doesn't really find any other ways of installing Clang either, so I have it (slowly) installing now. It turns out I already had rust from last time, and I found how to add tag 0.11.3 to the cargo file line you mentioned, so hopefully it will succeed at building once this finishes installing. |
It worked! (So far.) Thanks for the guidance! The addon still seems functional, and I haven't seen crashes on load yet, although I've only tried loading/reloading the project a few times. The new dll is only 0.5mb for some reason instead of 2mb. For reference for the next person new to rust who has to do this on Windows 10:
With all that, going to the root of the cloned repo and running |
Amazing! :D |
Before you did that, I wanted to try a few more times and see if the error happened again. I got lucky the first try today with what I think is the expected error from the updated gdnative code:
However, the project continued to load in its default scene, and when I run the game from the editor, pathfinding using this addon seems to be working! I have not tested exporting the game. It's not clear why this error is/was happening several times in a row sometimes, once in awhile other times, and not happening many times in a row at other times. Probably some kind of race condition with the order things finish loading, I'd guess. |
At least it doesn't crash anymore! |
Indeed! Seems to have made the issue harmless, which makes me pretty happy. Thanks for your help :) |
You're welcome :) |
On Godot 3.5.2, I get this error. I was running via the
Godot_v3.5.2-stable_win64_console.cmd
version to try to see crash logs, since I've noticed the editor being unstable and not logging anything when started normally.I can't tell what version of the addon I'm on, but I think 1.3. I installed it late October.
I've found at least two cases where this happened:
This is intermittent.
I'll add more if I see more editor crashes that mention rust or Dijkstra map. Usually when the editor crashes for me in general, it's either during or seconds after project load.
The text was updated successfully, but these errors were encountered: