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

App terminate on iOS 11 when enter to background #11623

Closed
alexzheng opened this issue Sep 27, 2017 · 55 comments
Closed

App terminate on iOS 11 when enter to background #11623

alexzheng opened this issue Sep 27, 2017 · 55 comments

Comments

@alexzheng
Copy link

alexzheng commented Sep 27, 2017

Operating system or device, Godot version, GPU Model and driver (if graphics related):
godot 2.1
iOS 11.0.1

Issue description:

Run any Godot app on a device of iOS 11, then press home button to enter to background, it will crash
This only happens on iOS 11, before iOS 11 it work well.

here is the backtrace:

iphone_finish
�[1;33mWARNING: cleanup: �[0m�[1mObjectDB Instances still exist!
�[0;33m   At: core/object.cpp:1845.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m   At: core/os/memory.cpp:59.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m   At: core/os/memory.cpp:59.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m   At: core/os/memory.cpp:59.�[0m
(lldb) bt
* thread #13, name = 'AURemoteIO::IOThread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000001027756d4 godot_opt.iphone`AudioDriverIphone::output_callback(void*, unsigned int*, AudioTimeStamp const*, unsigned int, unsigned int, AudioBufferList*) + 304
    frame #1: 0x000000018a71d2a8 AudioToolbox`AUInputElement::PullInput(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) + 176
    frame #2: 0x000000018a4a8e00 AudioToolbox`AUInputFormatConverter2::InputProc(OpaqueAudioConverter*, unsigned int*, AudioBufferList*, AudioStreamPacketDescription**, void*) + 220
    frame #3: 0x000000018a40fdd4 AudioToolbox`AudioConverterChain::CallInputProc(unsigned int) + 596
    frame #4: 0x000000018a40fa64 AudioToolbox`AudioConverterChain::FillBufferFromInputProc(unsigned int*, CABufferList*) + 128
    frame #5: 0x000000018a3ebe38 AudioToolbox`BufferedAudioConverter::GetInputBytes(unsigned int, unsigned int&, CABufferList const*&) + 192
    frame #6: 0x000000018a375538 AudioToolbox`CBRConverter::RenderOutput(CABufferList*, unsigned int, unsigned int&, AudioStreamPacketDescription*) + 120
    frame #7: 0x000000018a3ebcc8 AudioToolbox`BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 800
    frame #8: 0x000000018a3ebe08 AudioToolbox`BufferedAudioConverter::GetInputBytes(unsigned int, unsigned int&, CABufferList const*&) + 144
    frame #9: 0x000000018a6506f8 AudioToolbox`Resampler2Wrapper::RenderOutput(CABufferList*, unsigned int, unsigned int&) + 192
    frame #10: 0x000000018a412a7c AudioToolbox`SampleRateConverter::RenderOutput(CABufferList*, unsigned int, unsigned int&, AudioStreamPacketDescription*) + 48
    frame #11: 0x000000018a3ebcc8 AudioToolbox`BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 800
    frame #12: 0x000000018a40f65c AudioToolbox`AudioConverterChain::RenderOutput(CABufferList*, unsigned int, unsigned int&, AudioStreamPacketDescription*) + 120
    frame #13: 0x000000018a3ebcc8 AudioToolbox`BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 800
    frame #14: 0x000000018a5fec98 AudioToolbox`AudioConverterFillComplexBuffer + 1048
    frame #15: 0x000000018a4a864c AudioToolbox`AUConverterBase::RenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) + 640
    frame #16: 0x000000018a38d07c AudioToolbox`AURemoteIO::RenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) + 104
    frame #17: 0x000000018a722a20 AudioToolbox`AUBase::DoRenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, AUOutputElement*, unsigned int, AudioBufferList&) + 172
    frame #18: 0x000000018a7221ac AudioToolbox`AUBase::DoRender(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int, AudioBufferList&) + 948
    frame #19: 0x000000018a38cd28 AudioToolbox`AURemoteIO::PerformIO(unsigned int, unsigned int, unsigned int, AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, AudioBufferList*, int&) + 756
    frame #20: 0x000000018a38e1a0 AudioToolbox`AURIOCallbackReceiver_PerformIO + 356
    frame #21: 0x000000018a520018 AudioToolbox`_XPerformIO + 104
    frame #22: 0x000000018a70a5ec AudioToolbox`mshMIGPerform + 232
    frame #23: 0x000000018a70a804 AudioToolbox`MSHMIGDispatchMessage + 36
    frame #24: 0x000000018a38d4c0 AudioToolbox`AURemoteIO::IOThread::Run() + 288
    frame #25: 0x000000018a391a40 AudioToolbox`AURemoteIO::IOThread::Entry(void*) + 160
    frame #26: 0x000000018a712630 AudioToolbox`CAPThread::Entry(CAPThread*) + 84
    frame #27: 0x000000018658432c libsystem_pthread.dylib`_pthread_body + 308
    frame #28: 0x00000001865841f8 libsystem_pthread.dylib`_pthread_start + 312
    frame #29: 0x0000000186582c38 libsystem_pthread.dylib`thread_start + 4
(lldb) 

Steps to reproduce:

Link to minimal example project:

@alexzheng
Copy link
Author

All these crash issues on iOS 11 prevent the stable 2.1 from be readying for publishing apps.

@volzhs
Copy link
Contributor

volzhs commented Sep 27, 2017

I think this should be fixed on 2.1 also.

@volzhs
Copy link
Contributor

volzhs commented Sep 27, 2017

@alexzheng
Copy link
Author

not work.

@marcelofg55
Copy link
Contributor

Can you show the output of 'bt full'?

@alexzheng
Copy link
Author

nothing more for bt full

(lldb) bt full
error: _regexp-bt

@alexzheng
Copy link
Author

Cann't you reproduce it?
It crash for each simple demo project on iOS 11 device.

@marcelofg55
Copy link
Contributor

Try this patch, it's not crashing for me anymore with it:
iphone_crashfix.patch.zip

@alexzheng
Copy link
Author

Still crash.
Am I miss some code?

void AudioDriverIphone::finish() {
AURenderCallbackStruct callback;
zeromem(&callback, sizeof(AURenderCallbackStruct));
OSStatus result = AudioUnitSetProperty(audio_unit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &callback, sizeof(callback));
if (result != noErr) {
ERR_PRINT("AudioUnitSetProperty failed");
}

memdelete_arr(samples_in);

};

void OSIPhone::finalize() {

audio_driver->finish();

if (main_loop) // should not happen?
	memdelete(main_loop);

visual_server->finish();
memdelete(visual_server);
memdelete(rasterizer);

physics_server->finish();
memdelete(physics_server);

physics_2d_server->finish();
memdelete(physics_2d_server);

spatial_sound_server->finish();
memdelete(spatial_sound_server);

memdelete(input);

spatial_sound_2d_server->finish();
memdelete(spatial_sound_2d_server);

};

@alexzheng
Copy link
Author

My device is a iPhone 7 plus.

@marcelofg55
Copy link
Contributor

That's weird, code you posted seems fine, did it crash on the same place as before? And can you add a print_line("AudioDriverIphone::finish"); on AudioDriverIphone::finish() to see if it's getting called.
I tested it on an iPhone 6 with iOS 11.0.1. I don't have a 7 plus one sadly :(.

@alexzheng
Copy link
Author

the same place.
output:

iphone_finish
AudioDriverIphone::finish
�[1;33mWARNING: cleanup: �[0m�[1mObjectDB Instances still exist!
�[0;33m At: core/object.cpp:1845.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m At: core/os/memory.cpp:59.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m At: core/os/memory.cpp:59.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m At: core/os/memory.cpp:59.�[0m
(lldb) bt

@marcelofg55
Copy link
Contributor

marcelofg55 commented Oct 1, 2017

Seems to be a different crash actually, it's crashing on _thread_func now.
Try this on platform/iphone/os_iphone.cpp:

diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 10dc296..1754496 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -368,9 +368,14 @@ void OSIPhone::delete_main_loop() {

 void OSIPhone::finalize() {

+       audio_driver->finish();
+
        if (main_loop) // should not happen?
                memdelete(main_loop);

+       audio_server->finish();
+       memdelete(audio_server);
+
        visual_server->finish();
        memdelete(visual_server);
        memdelete(rasterizer);

And this on servers/audio/audio_server_sw.cpp:

diff --git a/servers/audio/audio_server_sw.cpp b/servers/audio/audio_server_sw.cpp
index 28da2c1..841552d 100644
--- a/servers/audio/audio_server_sw.cpp
+++ b/servers/audio/audio_server_sw.cpp
@@ -726,7 +726,8 @@ void AudioServerSW::_thread_func(void *self) {

        while (!as->exit_update_thread) {
                as->_update_streams(true);
-               OS::get_singleton()->delay_usec(5000);
+               if (OS::get_singleton())
+                       OS::get_singleton()->delay_usec(5000);
        }
 }

@alexzheng
Copy link
Author

this stop the crash,but freezes the app when enter to foreground and then crash

@egorh1
Copy link

egorh1 commented Oct 2, 2017

I had the same crash as @alexzheng described in his initial post. However, I think that the problem is not the crash after iphone_finish gets called:

iphone_finish
�[1;33mWARNING: cleanup: �[0m�[1mObjectDB Instances still exist!
�[0;33m At: core/object.cpp:1845.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m At: core/os/memory.cpp:59.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m At: core/os/memory.cpp:59.�[0m
�[1;31mERROR: free_static: �[0m�[1mCondition ' !MemoryPoolStatic::get_singleton() ' is true.
�[0;31m At: core/os/memory.cpp:59.�[0m

The problem is why the app gets terminated in the first place after the home button press.

...
console: ********************* will resign active
console: ******** stop animation!
console: ********************* did enter background
(something happens here that causes iOS 11 to terminate the app)
console: ********************* will terminate
console: iphone_finish
...

I also tested the same app on an iOS 10 simulator and it wasn't terminated, and therefore, it stayed in its background state.

...
console: ********************* will resign active
console: ******** stop animation!
console: ********************* did enter background
...

I also tried to set the "Application does not run in background (UIApplicationExitsOnSuspend)" Boolean to "NO" in the project's info.plist but it did not help.

@marcelofg55
Copy link
Contributor

marcelofg55 commented Oct 2, 2017

this stop the crash,but freezes the app when enter to foreground and then crash

and where does it crashes after entering foreground?

I also tried to set the "Application does not run in background (UIApplicationExitsOnSuspend)" Boolean to "NO" in the project's info.plist but it did not help.

I think iOS11 is just ignoring UIApplicationExitsOnSuspend and quitting the application anyways. Maybe UIBackgroundModes could help.

@egorh1
Copy link

egorh1 commented Oct 2, 2017

I tested UIApplicationExitsOnSuspend with a demo Unity project on iOS 11 device and it behaves appropriately.
With NO:

-> applicationWillResignActive()
-> applicationDidEnterBackground()

With YES:

-> applicationWillResignActive()
-> applicationDidEnterBackground()
-> applicationWillTerminate()

Therefore, I do not think that iOS 11 ignores this setting. UIBackgroundModes are for background services, in our case the app should just stay in its background state without any further code execution after applicationDidEnterBackground.

@marcelofg55
Copy link
Contributor

marcelofg55 commented Oct 2, 2017

I see, maybe our applicationDidEnterBackground is the problem.

@alexzheng
Copy link
Author

It does not stop crash, it just delay the crash after enter to background.
And the AudioDriverIphone::finish called twice.

AudioDriverIphone::finish
AudioDriverIphone::finish
(lldb) bt

  • thread adding global doesn't automatically flush to engine.cfg and is confusing. #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xeaeaeaeaeaeaeafa)
    • frame #0: 0x0000000104f7f740 godot_opt.iphoneMemoryPoolStaticMalloc::_free(this=0x00000001c027bac0, p_ptr=0x000000010806c420) at memory_pool_static_malloc.cpp:294 frame #1: 0x0000000104f7f630 godot_opt.iphoneMemoryPoolStaticMalloc::free(this=0x00000001c027bac0, p_ptr=0x000000010806c420) at memory_pool_static_malloc.cpp:230
      frame if you update texture file, it would be good if it reflects in the engine #2: 0x0000000105ae2428 godot_opt.iphoneMemory::free_static(p_ptr=0x000000010806c420) at memory.cpp:60 frame #3: 0x0000000104bf0790 godot_opt.iphonevoid memdelete_arr(p_class=0x000000010806c428) at memory.h:351
      frame Audio is unsynced in VideoPlayer node #4: 0x0000000104bf0734 godot_opt.iphoneAudioDriverIphone::finish(this=0x00000001c00cd680) at audio_driver_iphone.cpp:186 frame #5: 0x000000010592474c godot_opt.iphoneAudioServerSW::finish(this=0x00000001114a0020) at audio_server_sw.cpp:779
      frame set_video_mode not implemented on any platform #6: 0x0000000104bed5a4 godot_opt.iphoneOSIPhone::finalize(this=0x000000010805b000) at os_iphone.cpp:376 frame #7: 0x0000000104c2c12c godot_opt.iphoneMain::cleanup() at main.cpp:1671
      frame Unable to export to Linux platform #8: 0x0000000104beb980 godot_opt.iphoneiphone_finish() at godot_iphone.cpp:88 frame #9: 0x0000000104bf8288 godot_opt.iphone::-[AppDelegate applicationWillTerminate:](self=0x00000001c422b0a0, _cmd="applicationWillTerminate:", application=0x0000000107a04c40) at app_delegate.mm:681
      frame stretch_2d breaks touchscreenbutton in android #10: 0x000000018fdefbfc UIKit-[UIApplication _terminateWithStatus:] + 228 frame #11: 0x000000019025eb04 UIKit__98-[__UICanvasLifecycleMonitor_Compatability deactivateEventsOnly:withContext:forceExit:completion:]_block_invoke.271 + 344
      frame Windows 7 build failure #12: 0x000000018ffd8680 UIKit_runAfterCACommitDeferredBlocks + 292 frame #13: 0x000000018ffcbb24 UIKit_cleanUpAfterCAFlushAndRunDeferredBlocks + 288
      frame Move godotengine.org wiki to GitHub #14: 0x000000018fd5a808 UIKit_afterCACommitHandler + 132 frame #15: 0x00000001868ff8b8 CoreFoundationCFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 32
      frame Build failure on Debian testing (jessie) #16: 0x00000001868fd270 CoreFoundation__CFRunLoopDoObservers + 412 frame #17: 0x00000001868fd82c CoreFoundation__CFRunLoopRun + 1292
      frame Tetris demo fails to run on OSX after export #18: 0x000000018681e2d8 CoreFoundationCFRunLoopRunSpecific + 436 frame #19: 0x00000001886aff84 GraphicsServicesGSEventRunModal + 100
      frame OS X "Retina" support in editor GUI #20: 0x000000018fdcb880 UIKitUIApplicationMain + 208 frame #21: 0x0000000104bf4d6c godot_opt.iphonemain(argc=1, argv=0x000000016b34f858) at main.m:45
      frame Need Android and Ouya gamepad support.  #22: 0x000000018634256c libdyld.dylib`start + 4
      (lldb)

@alexzheng
Copy link
Author

It seems the code in the patch has free the same memory multiple times.

@marcelofg55
Copy link
Contributor

It does not stop crash, it just delay the crash after enter to background.
And the AudioDriverIphone::finish called twice.

Try this, remove the audio_driver->finish(); line at OSIPhone::finalize().

@alexzheng
Copy link
Author

I have tried it hours ago.

@alexzheng
Copy link
Author

alexzheng commented Oct 2, 2017

The crash is triggered in this method:

  • (void)applicationWillTerminate:(UIApplication *)application {

    printf("********************* will terminate\n");

    [self deinitGameControllers];

    if (motionInitialised) {
    ///@todo is this the right place to clean this up?
    [motionManager stopDeviceMotionUpdates];
    [motionManager release];
    motionManager = nil;
    motionInitialised = NO;
    };

    iphone_finish();
    };

Because when enter to background on iOS 10, this callback will not called, but on iOS 11 it is called.
You can mimic to call this method on iOS 10 to debug it.

@alexzheng
Copy link
Author

Maybe some memory has already been corrupted when enter to background cause the application I’llterminate get called.

@BastiaanOlij
Copy link
Contributor

I haven't dived far enough into things but I think the problem with the iOS setup is that Apple has changed the way this worked several times over time and some of the Godot iOS code seems to be from an earlier time.

Originally until the iPhone 4 (I think it was) came out an application that goes into the background would be terminated as multitasking wasn't supported. Then when you went back to the application it would reload and you as a developer where tasks to bring it back into the state it was before it closed.

When multitasking got added they added new methods that signal your application that it would go into the background but wouldn't terminate your application. Many applications never implemented those keeping the application running at full steam in a background thread waisting your battery in no time so Steve Jobs could tell us "see, this is why we were against multitasking on a phone".

My guess is that they've probably introduced a new keyword in the plist that tells the OS whether to terminate an app when it goes into the background or whether it can keep a background thread alive. Dunne know, guessing here.

Be as it may, I've noticed cleanup isn't Godots strong point here. It's probably worth having a closer look at all the notifications that main application delegate gets and moving things around into the right place so things that need to get paused get paused and things that need to terminate get properly stopped and deallocated.

@fuzzeemic
Copy link

TEMPORARY FIX
The solution in this forum post actually works for Godot as well.
https://forums.adobe.com/thread/2387025

No code changes are needed to make this work on compile.

Run the following (tested on 2.1 & 2.1.4-stable branches):
scons p=iphone -j 4 target=release tools=no arch=arm64 bits=64 IPHONESDK="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/"

The important part is pointing the iPhoneSDK to the symlinked location instead.

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/

Now when the app is suspended/backgrounded, it will not crash and resumes as expected :)

@alexzheng
Copy link
Author

Yes, amazing.
It's fixed now!

@alexzheng
Copy link
Author

alexzheng commented Oct 31, 2017

@fuzzeemic, Thanks very much, you are the hero!

It's really amazing.
All the orientation issues are also fixed by this.

@volzhs
Copy link
Contributor

volzhs commented Oct 31, 2017

image

@akien-mga
Copy link
Member

So should we change the default IPHONESDK value, or will that break templates for iOS 10?

@fuzzeemic
Copy link

@akien-mga I think it's a safe change to make as it fixes most peoples current problems with the latest xcode and you can always override it on the command line back to whatever you want for older builds. (But I am only new here, so not sure on peoples workflow yet)

@egorh1
Copy link

egorh1 commented Oct 31, 2017

Yes, it works now!

Thank you @fuzzeemic !!!

@akien-mga
Copy link
Member

@marcelofg55 @BastiaanOlij Thoughts on bumping the IPHONESDK value?

@alexzheng
Copy link
Author

alexzheng commented Oct 31, 2017

I think these two headache issues have also been fixed by this magic.
At least I have tested on some iOS 11 and iOS 10 devices.
#11628
#11547

@volzhs
Copy link
Contributor

volzhs commented Oct 31, 2017

I'm trying to compile ios template on ubuntu.

now I got error below.

$ scons -j 1 platform=iphone arch=arm64 IPHONESDK="/mnt/2TB/Development/iPhoneSDK/iPhoneOS11.0.sdk" IPHONEPATH="/mnt/2TB/Development/iostoolchain" ios_triple="arm-apple-darwin11-"
scons: done reading SConscript files.
scons: Building targets ...
[  5%] Compiling ==> platform/iphone/gl_view.mm
In file included from platform/iphone/gl_view.mm:30:
In file included from platform/iphone/gl_view.h:31:
In file included from /mnt/2TB/Development/iPhoneSDK/iPhoneOS11.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:22:
In file included from /mnt/2TB/Development/iPhoneSDK/iPhoneOS11.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAnimation.h:11:
In file included from /mnt/2TB/Development/iPhoneSDK/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:128:
/mnt/2TB/Development/iPhoneSDK/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUUID.h:26:49: error: nullability specifier '_Nullable' cannot be applied to non-pointer type 'uuid_t' (aka 'unsigned char [16]') [17]
 - (instancetype)initWithUUIDBytes:(const uuid_t _Nullable)bytes;
                                                 ^
/mnt/2TB/Development/iPhoneSDK/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUUID.h:29:30: error: nullability specifier '_Nonnull' cannot be applied to non-pointer type 'uuid_t' (aka 'unsigned char [16]') [17]
 - (void)getUUIDBytes:(uuid_t _Nonnull)uuid;
                              ^
2 errors generated.
scons: *** [platform/iphone/gl_view.iphone.opt.debug.arm64.o] Error 1
scons: building terminated because of errors.

I found somethings are changed from 10.x to 11
http://codeworkshop.net/objc-diff/sdkdiffs/ios/11.0/Foundation.html
how can I fix it? nobody suffers this issue?

@volzhs
Copy link
Contributor

volzhs commented Oct 31, 2017

compiling problem is gone after updating clang to 4.0 (rc1) :)

@haxpor
Copy link

haxpor commented Jan 7, 2018

@fuzzeemic That's promising. By the way, is it possible to include list of architecture to build for at the same time in scons i.e. scons p=iphone -j 4 target=release tools=no bits=64 arch=arm64,armv7 ? So we could save time to just execute command for one time and have fat binary for both architecture at the end? cc: @akien-mga

@akien-mga
Copy link
Member

Is this still valid in the current master branch? How can we fix this properly?

@haxpor
Copy link

haxpor commented Jan 8, 2018

@akien-mga I have an idea as follows assumed that machine that proceeds with this should be macOS. Anyway can we build iOS build with Windows or Linux anyway?

  • We can detect the active path to SDK in question via xcode-select -p. It will output something like this /Volumes/Slave/Applications/Xcode9/Xcode.app/Contents/Developer.
  • From there we just follow through the path, and slightly do iOS version checking as Xcode 8 cannot build against iOS 11, but only Xcode 9 onwards. Thus checking iOS version number as shown inside the directory /Volumes/Slave/Applications/Xcode9/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ which will have iPhoneOS11.2.sdk/ or other versions.
  • Now it's done, we have the path to supply as parameters properly for scons.

PS. As well we could force changing the active SDK path via sudo xcode-select -s /Volumes/Slave/Applications/Xcode8/Xcode.app/Contents/Developer but it needs administrator permission. Just in case, if we ever need this to do any customized stuff.

@akien-mga akien-mga modified the milestones: 3.0, 3.1 Jan 24, 2018
groscalin pushed a commit to groscalin/godot that referenced this issue Apr 29, 2018
- admob module add, remove firebase admob
groscalin pushed a commit to groscalin/godot that referenced this issue Jun 6, 2018
@reduz
Copy link
Member

reduz commented Sep 5, 2018

@akien-mga and others, what is the status of this?

@volzhs
Copy link
Contributor

volzhs commented Jan 9, 2019

I can't reproduce it with iPhone 4s with 9.3.5 (can't get ios 11)
does anyone suffer this issue?

@akien-mga
Copy link
Member

According to @BastiaanOlij it seems to work fine in 3.1 beta 2. I guess this issue might be specific to 2.1.x now.

@akien-mga akien-mga modified the milestones: 3.1, 2.1 Jan 19, 2019
@KoBeWi
Copy link
Member

KoBeWi commented Jun 13, 2020

Is it important to fix this for 2.1, or the issue can be closed?

@akien-mga
Copy link
Member

It would still be important to fix for 2.1, but there hasn't been any recent confirmation that Godot 2.1 projects crash on recent iOS (apart from the fix for #7966, which was cherry-picked), so I think we can close this old issue.

If anyone uses 2.1.6+ and experiences a similar crash on iOS, please open a new issue.

@akien-mga akien-mga modified the milestones: 2.1, 3.1 Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants