Skip to content
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

Mac crash - fyi #139

Closed
fblair02 opened this issue Sep 18, 2024 Discussed in #138 · 14 comments
Closed

Mac crash - fyi #139

fblair02 opened this issue Sep 18, 2024 Discussed in #138 · 14 comments
Labels
bug Something isn't working Waiting for Godot

Comments

@fblair02
Copy link

Discussed in #138

Originally posted by fblair02 September 18, 2024
May or may not be of interest b/c Mac. Godot 4.3 mono - Mac w/.NET) was rebooting randomly and hanging on save. Finally got a clean import to load, but when running the demo project/scene got this:


Godot Engine v4.3.stable.mono.official.77dcf97d8 - https://godotengine.org
Vulkan 1.2.283 - Forward+ - Using Device #0: Apple - Apple M1 Max

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.mono.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] invoke_previous_action(sigaction*, int, __siginfo*, void*, bool)
[2] 2 libsystem_platform.dylib 0x000000018b67e584 _sigtramp + 56
[3] ResourceLoader::_thread_load_function(void*) (in Godot) + 1560
[4] WorkerThreadPool::_process_task(WorkerThreadPool::Task*) (in Godot) + 580
[5] WorkerThreadPool::_thread_function(void*) (in Godot) + 256
[6] Thread::callback(unsigned long long, Thread::Settings const&, void ()(void), void*) (in Godot) + 120
[7] Thread::~Thread()
[8] 8 libsystem_pthread.dylib 0x000000018b64df94 _pthread_start + 136
[9] 9 libsystem_pthread.dylib 0x000000018b648d34 thread_start + 8
-- END OF BACKTRACE --

--- Debugging process stopped ---

@spimort
Copy link
Owner

spimort commented Sep 19, 2024

Oh wow ok! 😮

So, were you able to see the scene in the editor before running it?
Were you able to use the tools?
I don't have a mac myself, so it will be hard to investigate for sure, but if it's something I can fix with your help, I'm down!

Let me know 🙂!

@fblair02
Copy link
Author

fblair02 commented Sep 19, 2024

I played around with it for a bit yesterday. I can't get the demo scene/project to consistently allow me to get to the point of building the C# project - when I load it in the editor starts to render and it kills Godot.

I can get it to work to a degree if I start a new project and copy the addon into it. When I get the project set up and add a Terrabrush node, the terrain is black to transparent. I can't get it to paint textures or add objects or foliage, but it does appear to make the height deformations (it takes some maneuvering to see it, but it's there.).

I can save the scene, but when I try to exit Godot - either fully or out to the Project menu - it hangs and has to be force-quit. Once I do that, the project is corrupted or something - it crashes Godot before I can get the editor fully loaded.

I'll fire it up later and capture some video of the behavior - apart from that error, I'm not getting anything in the logs or on the console.

Also, I'm happy to help if I can.

@fblair02
Copy link
Author

I've attached MSBuild logs - some deprecation warnings, but no issues on the project build.

msbuild_issues.csv
msbuild_log.txt

@fblair02
Copy link
Author

fblair02 commented Sep 20, 2024

Alrighty - sorry for the delay; day job decided to get 'colicky'.

Here's some videos of project stuff. Should be fairly self-explanatory. DemoProject = working with the demo project; NewProject is just creating a new project and copying some things in. The big 'DemoProject' video is from the start; the smaller one is after the demo has crashed and trying to reopen it. Still nothing in logs.

https://drive.google.com/drive/folders/1L7mTt-tCtbt3SD5nDAhnSNvPJGRRTsJU?usp=sharing

Also, just as an aside, I'm very open to the idea that I'm doing something wrong; so let me know.

@spimort
Copy link
Owner

spimort commented Sep 21, 2024

No problem for the delay, I have a full time job as well, I know what it is! 🙂

Ok, so for the first two vids, I don't know why it crashes. What I would recommend is to start the Godot with the console (does it exists on mac?).
On Windows, I have another executable file called "Godot_v4.3-stable_mono_win64_console.exe". It allows me to start Godot from a terminal and have more logs. Maybe that would help to see what happens.

For the last vid, it's the most promising one!
One thing I did notice is that you don't choose the right texture file for the Albedo. Take "Grass004_1K-JPG_Color.jpg" instead of "Grass004.png". The "Grass004.png" is just the preview of the result texture that comes from the website.

If you don't want the grass to be glowy, you can also take the inverted roughness.

Also, the crashes you got while painting comes from this I think.
godotengine/godot#95420
#133

I'm waiting for a new version of Godot to make sure it works.

Also, when you do a modification on the properties of TerraBrush, make sure you hit the "Update Terrain" button (if the terrain is already created) located in the toolbar at the top. This will apply the modifications to the current Terrain.

Apart from that, I think that in a new project it kinda works, right?

Let me know if that helps! 🙂

@spimort spimort added bug Something isn't working Waiting for Godot labels Sep 21, 2024
@fblair02
Copy link
Author

fblair02 commented Sep 21, 2024

Heya - thanks for that.

With a new project, it mostly works-ish. If it doesn't crash, Godot will hang on exit - either closing the project to go back to the Project menu or trying to exit altogether.

I can run from the console, but the output is pretty unsatisfying - basically, as soon as I edit a project, I lose console and it goes back to the terminal prompt:

Franks-MacBook-Pro-3:Godot_Plugins frankblair$ /Applications/Godot_mono.app/Contents/MacOS/Godot 
Godot Engine v4.3.stable.mono.official.77dcf97d8 - https://godotengine.org
OpenGL API 4.1 Metal - 88.1 - Compatibility - Using Device: Apple - Apple M1 Max

Project is missing: /Users/frankblair/GodotProjects/terrabrushtest/project.godot
Project is missing: /Users/frankblair/GodotProjects/TerraBrush/project.godot
Editing project: /Users/frankblair/GodotProjects/terrabrushtest-new
Franks-MacBook-Pro-3:Godot_Plugins frankblair$ 

Choosing the right albedo makes the texture look better, that's for certain - oopsie.

Unfortunately, any time I hit 'Update Terrain', the terrain disappears and it crashes out of Godot.

If I have a texture set up at the start, and hit 'Create Terrain' it will take that texture (looks nice) and I can deform it (even nicer). But if I don't - if I create the terrain first and then add textures - it won't paint the textures on the numeric grid. I can deform it, but no textures appear and 'Update Terrain' crashes out. It doesn't appear to corrupt the project file, though - I can go back in. Until I try to save and quit - it hangs on quit.

I also found that if I set up the project fresh - through building and enabling the plugin - but don't add the TerraBrush node - it still hangs on exit. TBH, I'm leaning toward the root problem being something with .NET and the Mac. In the interest of being useful, as well as ornamental, here's a dump from when I killed the hung Godot process:

KillProcessDump-2024_09_21.txt

This is the only C# project I've attempted on the Mac (I actually got the .NET version just for this plugin). I'll fire up a 'Hello world' C# project on the Mac to test the '.NET not paying nice with Mac' theory.

[UPDATE:] regarding - "TBH, I'm leaning toward the root problem being something with .NET and the Mac. "... it doesn't appear to be that. I found a sample project, imported it, built it, and it seems to work fine including quitting out. But it's not a plugin with tooling.

@fblair02
Copy link
Author

Also, as a followup - I mentioned getting a Windows laptop earlier - I set it up there and (spoiler alert:) it works great.

@spimort
Copy link
Owner

spimort commented Sep 22, 2024

damn ok!
I'm not surprised that it works on Windows since this is the OS I use, but I'm surprised about the Mac version.

Maybe something to do with the shaders/vulkan?

I wish I could test it on a mac but It's not something possible at the moment.

Can you try other plugins for godot in C#? Maybe from here : https://github.com/godotengine/awesome-godot

@fblair02
Copy link
Author

fblair02 commented Sep 22, 2024

Well, it is not limited to this plugin. I picked up this C# plugin - b/c it looked useful, too - and installed it. It does the same thing re: hang on exit, even without actually using it. I can get further with it and as long as I save regularly it doesn't appear to harm anything; but I have to force-quit it when I exit the project.

https://cookiebadger.github.io/assetplacer-docs/index.html

It also doesn't appear to be plugins in general - SimpleGrass and Terrain3D both appear to work, separately and together. But there is some form of toxicity in the relationship between C# plugins and the C# Godot_mono on the Mac.

@spimort
Copy link
Owner

spimort commented Sep 25, 2024

Oh ok !
I'm happy to hear that this is not my plugin, but I'm sad to see that this happens on mac!

I wonder if there is anything logged on the Godot Github Issues?

@spimort
Copy link
Owner

spimort commented Sep 25, 2024

Maybe this?
godotengine/godot#94631 (comment)

@fblair02
Copy link
Author

fblair02 commented Oct 7, 2024

So, I don't think it's that issue b/c that's related to exporting a project to run on MacOS. My issues are in the editor and I can't find a comparable setting in project settings.

@spimort
Copy link
Owner

spimort commented Oct 8, 2024

ok I see! Have you tried to post this issue on the Github of Godot? Maybe they have ideas.

@spimort
Copy link
Owner

spimort commented Dec 1, 2024

I'll close this issue for now, let me know if there is any progress with the Mac side (feel free to open a new one if needed)!

@spimort spimort closed this as completed Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting for Godot
Projects
None yet
Development

No branches or pull requests

2 participants