mohsenph69 / Godot-MTerrain-plugin

A GDExtension plugin which give godot the ability to produce highly optimized Terrain for Open world games
MIT License
427 stars 23 forks source link

mac os #23

Open vondragh opened 9 months ago

vondragh commented 9 months ago

Is it possible to use the addon on Mac OS? If this is not possible, please provide support for Mac OS :)

vondragh commented 9 months ago

Unable to load addon script at path: 'res://addons/m_terrain/m_terrain.gd'. This may be due to an error in the script code. Disabling addon 'res://addons/m_terrain/plugin.cfg' to prevent further errors.

mohsenph69 commented 9 months ago

Off-course it is possible, unfortunately I don't have a mac os but obviously this should work also on mac os.

I will try to install Mac Os on a virtual box and see if I can make this running! anyway I will write some instruction about how you can build this library down bellow, see if you can make this running, if you can not wait until I will figure out how can I make this run on Mac Os!

Regarding of error your talking about, does this give any error message, if yes please past that here! (But obviously this error can be because the library for mterrain is not build for mac os and because of that it can not recognize MTerrain and other classes in MTerrain library, So it can not be activated, and if you build the library it will work)

You need to install, git, python, scons and a c++ compiler! After that clone M Terrain repo inside addon folder in Godot project!

run this command inside addon folder git clone https://github.com/mohsenph69/Godot-MTerrain-plugin.git

Then change the name of the repo folder to m_terrain

go inside that folder and run this command

git submodule update --init --recursive This will download godot-cpp and it put it inside gdextension folder

After that go inside Gdextension folder and run scons command, This should build for debug version of M Terrain plugin

for release version you should run scons target=template_release

This will add terrain library inside lib folder in addon directory, you also need to set the path of lib inside MTerrain.gdextension like this

macos.debug = "res://addons/m_terrain/libs/libMTerrain.macos.template_debug.framework"
macos.release = "res://addons/m_terrain/libs/libMTerrain.macos.template_release.framework"

Also please note this will not work on Godot 4.0, But it will work on Godot 4.1 , 4.2

If you can make that running let me know, also if you got any error let me know

x3haloed commented 9 months ago

@vondragh Did you get it working?

I too would love to having this working for macOS. I'm encountering the following error: core/extension/gdextension.cpp:911 - No GDExtension library found for current OS and architecture (macos.arm64) in configuration file: res://addons/m_terrain/libs/MTerrain.gdextension

x3haloed commented 9 months ago

Oh no. Build failed!

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdlib.h:131:1: note: candidate function
abs(long double __lcpp_x) _NOEXCEPT {
^
src/grass/mgrass.cpp:501:30: error: call to 'abs' is ambiguous
            uint32_t dif_y = UABS_DIFF(y,brush_px_pos_y);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/grass/../mconfig.h:42:25: note: expanded from macro 'UABS_DIFF'
#define UABS_DIFF(a, b) abs(a-b)
                        ^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:132:6: note: candidate function
int      abs(int) __pure2;
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdlib.h:113:61: note: candidate function
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
                                                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdlib.h:116:66: note: candidate function
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {
                                                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdlib.h:122:62: note: candidate function
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
                                                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdlib.h:126:63: note: candidate function
_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT {
                                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdlib.h:131:1: note: candidate function
abs(long double __lcpp_x) _NOEXCEPT {
^
2 errors generated.
scons: *** [src/grass/mgrass.os] Error 1
scons: building terminated because of errors.
vondragh commented 9 months ago

I have the same thing during the collection, when it is assembled and when it ends, some .os files are not created, but only some say that there is an error

mohsenph69 commented 8 months ago

I will install mac os on virtuall machine, and I see if I can fix that!

mohsenph69 commented 8 months ago

And I could not install MacOs on virtual machine, But I will try that later!

But I solve the problem which cause the error you sended me!

x3haloed commented 8 months ago

More issues, unfortunately 😢

clang++ -o src/mterrain_material.os -c -std=c++17 -arch x86_64 -arch arm64 -O2 -fPIC -DMACOS_ENABLED -DUNIX_ENABLED -DDEBUG_ENABLED -DDEBUG_METHODS_ENABLED -DNDEBUG -Igodot-cpp/gdextension -Igodot-cpp/include -Igodot-cpp/gen/include -Isrc src/mterrain_material.cpp
src/height_brushes/mtoheight.cpp:42:15: error: use of overloaded operator '=' is ambiguous (with operand types 'Variant' and 'long')
    p3["min"] = -10000000000;
    ~~~~~~~~~ ^ ~~~~~~~~~~~~
godot-cpp/include/godot_cpp/variant/variant.hpp:252:11: note: candidate function
        Variant &operator=(const Variant &other);
                 ^
godot-cpp/include/godot_cpp/variant/variant.hpp:253:11: note: candidate function
        Variant &operator=(Variant &&other);
                 ^
src/height_brushes/mtoheight.cpp:43:15: error: use of overloaded operator '=' is ambiguous (with operand types 'Variant' and 'long')
    p3["max"] = 100000000000;
    ~~~~~~~~~ ^ ~~~~~~~~~~~~
godot-cpp/include/godot_cpp/variant/variant.hpp:252:11: note: candidate function
        Variant &operator=(const Variant &other);
                 ^
godot-cpp/include/godot_cpp/variant/variant.hpp:253:11: note: candidate function
        Variant &operator=(Variant &&other);
                 ^
2 errors generated.
scons: *** [src/height_brushes/mtoheight.os] Error 1
scons: building terminated because of errors.
mohsenph69 commented 7 months ago

So with the new release I also build for MacOs!

See if that work!

cabarius commented 5 months ago

I am trying to bring up m_terrain on a new project on mac in godot 4.2 and I am getting


  Couldn't open MTL file 'res://addons/m_terrain/gui/human_male.mtl', it may not exist or not be readable.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  res://addons/m_terrain/gui/image_creator_window.gd:77 - Compile Error: Identifier not found: MResource
  modules/gdscript/gdscript.cpp:2788 - Failed to load script "res://addons/m_terrain/gui/image_creator_window.gd" with error "Compilation failed". (User)
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  res://addons/m_terrain/gui/import Godot res.gd:170 - Compile Error: Identifier not found: MResource
  modules/gdscript/gdscript.cpp:2788 - Failed to load script "res://addons/m_terrain/gui/import Godot res.gd" with error "Compilation failed". (User)
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  res://addons/m_terrain/gui/import_window.gd:221 - Compile Error: Identifier not found: MResource
  modules/gdscript/gdscript.cpp:2788 - Failed to load script "res://addons/m_terrain/gui/import_window.gd" with error "Compilation failed". (User)
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MBrushManager" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MBrushManager" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MBrushManager" not found.
  res://addons/m_terrain/gui/paint_panel.gd:33 - Compile Error: Identifier not found: MBrushManager
  modules/gdscript/gdscript.cpp:2788 - Failed to load script "res://addons/m_terrain/gui/paint_panel.gd" with error "Compilation failed". (User)
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MResource" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.
  modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class "MTerrain" not found.```

Did human_male.mtl get removed or renamed?
arimus commented 1 month ago

I tried to fetch the latest build and I see no Mac libs.

I was able to follow the build instructions with a little bit of help from #42. I successfully compiled the libraries and tried to drop these in the latest builds lib folder (and tried to copy the whole project over as well), but then I just get crashes. @mohsenph69 I am available to help sort through these issues on my Mac if you get a chance and need some help getting to the bottom of the issues. Can discord / google chat / zoom / whatever if a working session helps.

Thanks for all the help!

Stack trace if it helps:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Godot [46363]
Path:                  /Applications/Godot 4.app/Contents/MacOS/Godot
Identifier:            org.godotengine.godot
Version:               4.2.2 (4.2.2)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-08-10 15:02:18.6444 -0600
OS Version:            macOS 14.4 (23E214)
Report Version:        12
Anonymous UUID:        70A08549-97A8-071A-0785-A71A25F09906

Sleep/Wake UUID:       623E8349-FC80-46F5-BC3D-98AA6D3A1EBE

Time Awake Since Boot: 3500000 seconds
Time Since Wake:       15787 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000438
Exception Codes:       0x0000000000000001, 0x0000000000000438

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   Godot [46363]

VM Region Info: 0x438 is not in any region.  Bytes before following region: 4344413128
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      102f28000-108a30000    [ 91.0M] r-x/r-x SM=COW  /Applications/Godot 4.app/Contents/MacOS/Godot

Application Specific Information:
abort() called

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                 0x188fe6a60 __pthread_kill + 8
1   libsystem_pthread.dylib                0x18901ec20 pthread_kill + 288
2   libsystem_c.dylib                      0x188f2ba20 abort + 180
3   Godot                                  0x1036632cc 0x102f28000 + 7582412
4   libsystem_platform.dylib               0x18904f584 _sigtramp + 56
5   libMTerrain.macos.template_debug.universal.dylib           0x1199f3a1c godot::Timer::stop() + 92
6   libMTerrain.macos.template_debug.universal.dylib           0x1199f3a1c godot::Timer::stop() + 92
7   libMTerrain.macos.template_debug.universal.dylib           0x1197fbf3c MTerrain::remove_grid() + 24
8   libMTerrain.macos.template_debug.universal.dylib           0x1197fff10 MTerrain::~MTerrain() + 32
9   libMTerrain.macos.template_debug.universal.dylib           0x11982d838 MTerrain::free(void*, void*) + 36
10  Godot                                  0x106c37194 0x102f28000 + 64024980
11  Godot                                  0x106c18308 0x102f28000 + 63898376
12  Godot                                  0x1044e6e00 0x102f28000 + 22801920
13  Godot                                  0x1044dfd54 0x102f28000 + 22773076
14  Godot                                  0x106c23350 0x102f28000 + 63943504
15  Godot                                  0x106c23898 0x102f28000 + 63944856
16  Godot                                  0x105084148 0x102f28000 + 34980168
17  Godot                                  0x1036b50e4 0x102f28000 + 7917796
18  Godot                                  0x10365f714 0x102f28000 + 7567124
19  Godot                                  0x103690d38 0x102f28000 + 7769400
20  dyld                                   0x188c960e0 start + 2360

Thread 1:
0   libsystem_pthread.dylib                0x189019d20 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib                0x189019d20 start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib                0x189019d20 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib                0x189019d20 start_wqthread + 0

Thread 5:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x10683e998 _IP_ResolverPrivate::_thread_function(void*) + 152
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 6:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 7:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 8:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 9:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 10:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 11:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 12:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 13:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 14:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 15:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x106c6e2fc 0x102f28000 + 64250620
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 16:: com.apple.NSEventThread
0   libsystem_kernel.dylib                 0x188fde1f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x188ff0b24 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x188fe6e34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib                 0x188fde578 mach_msg + 24
4   CoreFoundation                         0x1890fe058 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x1890fc91c __CFRunLoopRun + 1208
6   CoreFoundation                         0x1890fbe0c CFRunLoopRunSpecific + 608
7   AppKit                                 0x18ca7dcb4 _NSEventThread + 144
8   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
9   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 17:: caulk.messenger.shared:17
0   libsystem_kernel.dylib                 0x188fde170 semaphore_wait_trap + 8
1   caulk                                  0x19358f624 caulk::semaphore::timed_wait(double) + 212
2   caulk                                  0x19358f4d8 caulk::concurrent::details::worker_thread::run() + 36
3   caulk                                  0x19358f1d8 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 96
4   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
5   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 18:: caulk.messenger.shared:high
0   libsystem_kernel.dylib                 0x188fde170 semaphore_wait_trap + 8
1   caulk                                  0x19358f624 caulk::semaphore::timed_wait(double) + 212
2   caulk                                  0x19358f4d8 caulk::concurrent::details::worker_thread::run() + 36
3   caulk                                  0x19358f1d8 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 96
4   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
5   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 19:: caulk::deferred_logger
0   libsystem_kernel.dylib                 0x188fde170 semaphore_wait_trap + 8
1   caulk                                  0x19358f624 caulk::semaphore::timed_wait(double) + 212
2   caulk                                  0x19358f4d8 caulk::concurrent::details::worker_thread::run() + 36
3   caulk                                  0x19358f1d8 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 96
4   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
5   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 20:: com.apple.audio.IOThread.client
0   libsystem_kernel.dylib                 0x188fde1f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x188ff0b24 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x188fe6e34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib                 0x188fde578 mach_msg + 24
4   CoreAudio                              0x18b9b7898 HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 96
5   CoreAudio                              0x18b88bb44 HALC_ProxyIOContext::IOWorkLoop() + 4272
6   CoreAudio                              0x18b88a35c invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 108
7   CoreAudio                              0x18ba104e4 HALC_IOThread::Entry(void*) + 88
8   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
9   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 21:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x103f2f0a8 0x102f28000 + 16806056
4   Godot                                  0x103f2ef54 0x102f28000 + 16805716
5   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
6   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 22:
0   libsystem_kernel.dylib                 0x188fe17e8 __semwait_signal + 8
1   libsystem_c.dylib                      0x188ec2274 nanosleep + 220
2   Godot                                  0x1041e65c4 0x102f28000 + 19654084
3   Godot                                  0x104339adc 0x102f28000 + 21043932
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 23:
0   libsystem_kernel.dylib                 0x188fe17e8 __semwait_signal + 8
1   libsystem_c.dylib                      0x188ec2274 nanosleep + 220
2   Godot                                  0x1041e65c4 0x102f28000 + 19654084
3   Godot                                  0x10438fd34 0x102f28000 + 21396788
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 24:
0   libsystem_kernel.dylib                 0x188fe17e8 __semwait_signal + 8
1   libsystem_c.dylib                      0x188ec2274 nanosleep + 220
2   Godot                                  0x1041e65c4 0x102f28000 + 19654084
3   Godot                                  0x10440611c 0x102f28000 + 21881116
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 25:
0   libsystem_kernel.dylib                 0x188fe19ec __psynch_cvwait + 8
1   libsystem_pthread.dylib                0x18901f55c _pthread_cond_wait + 1228
2   libc++.1.dylib                         0x188f44b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   Godot                                  0x104f683d8 0x102f28000 + 33817560
4   Godot                                  0x106748d0c 0x102f28000 + 58854668
5   Godot                                  0x106749074 0x102f28000 + 58855540
6   libsystem_pthread.dylib                0x18901ef94 _pthread_start + 136
7   libsystem_pthread.dylib                0x189019d34 thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000000   x5: 0x0000000017a00000   x6: 0x0000600003cacf80   x7: 0x0000000000000000
    x8: 0xf2c4caf1f97198bd   x9: 0xf2c4caf009a3227d  x10: 0x0000000000000002  x11: 0x00000000fffffffd
   x12: 0x0000010000000000  x13: 0x0000000000000000  x14: 0x0000000000000000  x15: 0x0000000000000000
   x16: 0x0000000000000148  x17: 0x00000001fb096c30  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x00000001f0d2bac0  x21: 0x0000000000000103  x22: 0x00000001f0d2bba0  x23: 0x0000000000000012
   x24: 0x000000010879b80f  x25: 0x000000010879b82f  x26: 0x000000016ced4eb8  x27: 0x000000010879b824
   x28: 0x0000000000000000   fp: 0x000000016ced45b0   lr: 0x000000018901ec20
    sp: 0x000000016ced4590   pc: 0x0000000188fe6a60 cpsr: 0x40001000
   far: 0x0000000000000000  esr: 0x56000080  Address size fault

Binary Images:
       0x119f50000 -        0x11a087fff com.apple.audio.units.Components (1.14) <261ddb64-4aeb-3916-961f-46dad090dd47> /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio
       0x119790000 -        0x119a77fff libMTerrain.macos.template_debug.universal.dylib (*) <e2659e4f-678e-3383-a846-9df5e61e4d60> /Users/USER/*/libMTerrain.macos.template_debug.universal.dylib
       0x10d4b0000 -        0x10d4bbfff libobjc-trampolines.dylib (*) <e8a1b184-0349-3c61-a119-6543eb038317> /usr/lib/libobjc-trampolines.dylib
       0x102f28000 -        0x108a2ffff org.godotengine.godot (4.2.2) <7a2d9d8b-a941-35f2-9c8e-c9ce84acd78f> /Applications/Godot 4.app/Contents/MacOS/Godot
       0x188fdd000 -        0x189017ffb libsystem_kernel.dylib (*) <1889ce0a-52e7-3122-8907-81af920ac472> /usr/lib/system/libsystem_kernel.dylib
       0x189018000 -        0x189024fff libsystem_pthread.dylib (*) <45239f06-cc53-36d0-9933-7776ac7ea2fa> /usr/lib/system/libsystem_pthread.dylib
       0x188eb5000 -        0x188f33ff3 libsystem_c.dylib (*) <49477e07-e77b-332f-b98d-79ca210a866d> /usr/lib/system/libsystem_c.dylib
       0x18904b000 -        0x189052fe7 libsystem_platform.dylib (*) <031f3e8c-5227-3138-a444-68174c1c28cf> /usr/lib/system/libsystem_platform.dylib
       0x188c90000 -        0x188d189db dyld (*) <8e1e5ee2-f89a-33a7-bb0a-74bdc06b7828> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x188f34000 -        0x188fc0ff7 libc++.1.dylib (*) <08c4329e-407f-310b-b037-75a8020b2963> /usr/lib/libc++.1.dylib
       0x189080000 -        0x189558fff com.apple.CoreFoundation (6.9) <33908a83-098f-3437-973e-fb848c4f39df> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x18c91a000 -        0x18dc56fff com.apple.AppKit (6.9) <8b85317d-d56a-3370-8b78-da6c1d0fb53c> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x19358d000 -        0x1935b6fff com.apple.audio.caulk (1.0) <e15b7222-ecda-3de9-bfa0-07c070986d41> /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk
       0x18b6a0000 -        0x18bda0fff com.apple.audio.CoreAudio (5.0) <82edac97-3b60-3b67-8ca4-08d3acd21c1a> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=994.3M resident=0K(0%) swapped_out_or_unallocated=994.3M(100%)
Writable regions: Total=3.5G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=3.5G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
CG image                           240K        8 
ColorSync                          560K       26 
CoreAnimation                      240K       15 
CoreGraphics                        32K        2 
CoreUI image data                 1328K        9 
Foundation                          16K        1 
Foundation (reserved)               16K        1         reserved VM address space (unallocated)
Kernel Alloc Once                   32K        1 
MALLOC                             3.5G      150 
MALLOC guard page                  384K       24 
MALLOC_LARGE (reserved)             16K        1         reserved VM address space (unallocated)
STACK GUARD                       56.4M       26 
Stack                             21.3M       26 
VM_ALLOCATE                        368K       16 
VM_ALLOCATE (reserved)              32K        1         reserved VM address space (unallocated)
__AUTH                            1032K      222 
__AUTH_CONST                      17.5M      391 
__CTF                               824        1 
__DATA                            6277K      381 
__DATA_CONST                      22.4M      397 
__DATA_DIRTY                      1028K      125 
__FONT_DATA                          4K        1 
__LINKEDIT                       533.0M        5 
__OBJC_RO                         71.7M        1 
__OBJC_RW                         2195K        1 
__TEXT                           461.3M      412 
dyld private memory                656K        4 
mapped file                      198.2M       27 
shared memory                      960K       16 
===========                     =======  ======= 
TOTAL                              4.9G     2292 
TOTAL, minus reserved VM space     4.9G     2292 
arimus commented 1 month ago

FWIW, I also upgraded to the 4.2 branch of godot-cpp and rebuilt. Everything compiled fine without modifications to the scripts, but same deal with a crash on opening.