hxgodot-cpp icon indicating copy to clipboard operation
hxgodot-cpp copied to clipboard

crash running example project on mac (arm64 and x86_64)

Open shakesoda opened this issue 9 months ago • 2 comments

I modified my SConstruct to have appropriate flags for arm (-march=armv8.5-a and -D HXCPP_ARM64) respectively, tried running both with native arch and in rosetta with arch -x86_64 godot main.tscn on the example project (godot 4.2 stable), got good prints until "was geht", then it crashes and reports heap corruption. i haven't dug into it but test_vector4i is next in the gdscript, so i assume that's failing. bindings generated with haxe 4.3.2, since i saw 4.3.3 doesn't work.

filed separately from #28 and #53 because it seems to be a different issue

shakesoda avatar Nov 30 '23 23:11 shakesoda

update: i was able to get a working result with a quick hack by switching HXCPP_M64 to HXCPP_ARM64 at RunMain.hx:243 (doGenerateBindings)

seems another path is needed in the generator, i assume my problem for both x86_64 and arm64 crashing is that it didn't match my bindings properly.

needing to regenerate the bindings per arch seems a bit problematic, i'll need to have a few different copies of them for different arch builds i suppose.

with a little more poking around squash the creeps runs, but unhandled input crashes / #53 applies, making it unusable.

shakesoda avatar Dec 01 '23 17:12 shakesoda

Hi there!

Yes, generating arm64 builds can be a bit challenging since I dont have a M1 machine available most of the time.

Concerning different copies of the bindings: I will give this some thought, maybe we can macro this in a smart way

dazKind avatar Dec 05 '23 00:12 dazKind