XCode crash when running app in simulator

Hello there!
I’ve recently switched to the master github branch and all of a sudden discovered that it’s now possible to run app in simulator (I’ve always had problem with that and stopped trying around a year ago). In XCode 6.3 the app started, but XCode immediately crashed. Anyone knows if it’s fixable?

1 Like

I haven’t figured out why, but I can confirm this is an issue for me as well.

@danoli3 ideas?

Not completely sure. I’ll have a look with a friends laptop with a new checkout see if it happens.

Yeah my friend had the same problem.
Also he had in the past previously run the iOS simulator before on an older Xcode version.

Possible Solution’s

Reset Content and Settings

  • You will need to do this on each simulator device if you have previously run against a different Xcode / LLDB / LLVM build.

Install updated command line tools

  • Run the following command in terminal
  • xcode-select --install

An alternative fix:

Hey @danoli3 thanks for the tips! I tried all … no success.

  • Resetting Content and Settings didn’t work for me. (well, it reset the content / settings, but it didn’t fix the crash).
  • xcode-select -install Already up-to-date.
  • I’ve got a normal (unmodified) /etc/hosts file.

Any other ideas? :smile:

this might be related with the fix for liburi, @danoli3 did you applied the patch for osx to ios too?

Make sure you have your apple developer account associated with Xcode.
I think it may be related to the Code Signing.

iOS Simulator might be failing to acquire a positive code sign (it really doesn’t need to, but currently I notice it only has 1 target).
I’ll PR a fix.

Yeah those patches went into master.
https://github.com/openframeworks/openFrameworks/pull/3951
https://github.com/openframeworks/openFrameworks/pull/3952

Also, just for reference, the ios simulator isn’t crashing – in fact it’s running the app. Xcode (and it’s monitoring capabilities) is crashing.

It should be noted that if you go back to e9793dc1cf7fb5ff5f7d8553571e4e43e5eb2dbb it quite reliably doesn’t crash at all on my friends laptop. (pre-boost).

what examples are you trying? can you try if it crashes with an empty example? in osx it wouldn’t crash before the fix unless there was code from liburi involved, which is only used in ofImage and ofLaunchBrowser i think

@bakercp try and do a Release build. If that works 100% we are looking at an optimisation issue. Either that or we are just exposing it.

I wonder if it is the GCC_OPTIMIZATION_LEVEL = 0 change caused this.
Could be too much data for some Mac’s to handle.

Sadly it’s still crashing for me using a release build … it could also be an xcode bug of some kind.

@bakercp can you try and checkout the following SHA ( back a month ago ) @

e9793dc1cf7fb5ff5f7d8553571e4e43e5eb2dbb

https://github.com/openframeworks/openFrameworks/commit/e9793dc1cf7fb5ff5f7d8553571e4e43e5eb2dbb

See if a clean build / and if this is not happening. We have to slowly track it down.

If it’s any help - I’m experiencing the same issue on my project. Pulling latest master crashes xCode (not the simulator or the app that runs without an issue). It doesn’t seem to be environment related or related to a specific project - just pulling the latest master causes this.

I went back to my previous base, commit cd74822caac95e12bc9c67fc2447b2614fe6eed4 and it works there. It’s a commit only two week old, so I hope it helps to narrow this thing down.

Tal

@bakercp the error is the same that i reported a few days ago for the OSX builds after the poco removal
https://github.com/openframeworks/openFrameworks/issues/3943

@arturo solved it with a change in liburi, but maybe that fix not work for iOS?

The quickest way to check it is to comment the URI check part on ofImage.cpp load function, specifically this part, in line 177:

    try {
        uri = network::uri(fileName);
    } catch(const std::exception &){
    }

If commenting that resolves the crash, it is related to the same issue.

@drakko Sadly, It doesn’t seem to help.

@yeswecan

Can you try with an empty project to see it the crash happens? In my case, didn’t, so I had that time to comment all the code and start to activate it line by line to figure out the class that was creating the crash.

It does crash with empty example.