I compiled ios can not run directly flash back please help me!

  • Problems such as:

  • i used fpcupdeluxe to let it automatically download FPC 3.2.2 and lazarus 2.2.2 and download the compiler :arm(ios) aarch64(ios) x86_64 (I-SIM)

  • And using castle-editor successfully compiled arm 32bit and arm 64bit Mach-O(a) files automatically generated a freetype third-party library Xcode project

  • But when I used it for real debugging my program exited without using Xcode’s (main.m) entry function and reported the following exception message

An unhandled exception occurred at $000000010447AA74:

EStackOverflow: Stack overflow



  • I’m using xocde with the latest version of xcode15 and my ios phone is ios16.6.1

  • I have tried my best to find information to solve this problem. But I can’t help it. I don’t know much about mac and ios. I hope you can help me

Thanks for reporting! Can you try building in “release” mode? If you build using CGE editor, just select “Run → Release Mode” from menu before packaging for iOS. Then package and run the game as before on iOS device.


I just tested building and running application with the latest CGE on iPhone. I used our example “examples/mobile/simple_3d_demo/”, tested in release and debug modes, build as IPA and deployed on my device using TestFairy. In release mode, the application runs perfectly. In debug mode, I experience a crash.

I’m not sure whether it’s the same issue as you experience, as I have a bit weird setup (I didn’t connect my device physically to mac, I only debug remotely using TestFairy, and it seems it crashed before receiving any log). It may be the same issue.

I wasn’t able today to debug the crash and I have to fall to sleep very soon :), so I’ll leave this for now, and will get back to it later in the week.

I’m testing with Xcode 13.4.1 on macOS 12.4 (Intel-based mac).

I’ll test later:

  • Can I get any logs through TestFairy; failing that, get my hands on physical mac machine to debug
  • Do other CGE examples also exhibit the same behavior (debug crashes, release works)
  • You send me privately Xcode project; thank you, I’ll test that too
  • I thought of a bunch of ways but did not think that the debug mode and release mode would affect its crash. Thank you very much for your patience and help. I can now enter the game screen
  • But I have encountered some other problems, I plan to rely on my own to solve for the time being, if not, I will post a request for help!
1 Like

Cool, I’m happy that it helped.

This is still something I definitely want to fix in CGE – we don’t want debug builds on iOS to crash. But at least for now we have a workaround: run a release build.

I’ll let here know when I’ll investigate more and/or solve the crash with debug builds.

If you get stuck, you’re welcome to post other questions :slight_smile: