Fails With Useless Error Message

Okay so Xojo for iOS isn’t doing anything useful at all right now.

[quote]Compilation of app failed.
An error occurred when attempting to launch the application.[/quote]

That’s all I’ve got.
Xcode and iOS Sim are open right now, iOS Sim is running fine.
I’ve even made a test helloworld with Xcode and it works brilliantly.

Why is Xojo failing so hard?

No, there’s no existing build. I’ve moved the project around to several locations to try that.
Log messages? Nope. This is all that’s in system.log relating to Xojo (and wow this is a mess too)

Feb 1 01:04:11 Xojo[826]: objc[826]: Class XOJBevelButton is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined. Feb 1 01:04:11 Xojo[826]: objc[826]: Class XOJImageWell is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined. Feb 1 01:04:11 Xojo[826]: objc[826]: Class XOJChasingArrows is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined. Feb 1 01:04:11 Xojo[826]: objc[826]: Class XOJDisclosureTriangle is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined. Feb 1 01:04:11 Xojo[826]: objc[826]: Class XOJLittleArrows is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined. Feb 1 01:04:11 Xojo[826]: objc[826]: Class XOJSeparator is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBAppearancePak.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBAppearancePak.xojo_plugin/Appearance Pak/Build Resources/Mac Cocoa/AppearancePakCocoa.dylib. One of the two will be used. Which one is undefined. Feb 1 01:04:13 Xojo[826]: objc[826]: Class XOJSegmentedControl is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBGUIKit.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBGUIKit.xojo_plugin/GUIKit/Build Resources/Mac Cocoa/GUIKitCocoa.dylib. One of the two will be used. Which one is undefined. Feb 1 01:04:13 Xojo[826]: objc[826]: Class XOJGUIKit_ActionTarget is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBGUIKit.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBGUIKit.xojo_plugin/GUIKit/Build Resources/Mac Cocoa/GUIKitCocoa.dylib. One of the two will be used. Which one is undefined. Feb 1 01:04:13 Xojo[826]: objc[826]: Class XOJWebKitDelegate is implemented in both /Applications/Xojo/Xojo.app/Contents/Frameworks/RBHTMLViewer.xojo_plugin_0.dylib and /Applications/Xojo/Xojo.app/Contents/Resources/Internal Plugins/RBHTMLViewer.xojo_plugin/HTMLViewer/Build Resources/Mac Cocoa/HTMLViewerCocoa.dylib. One of the two will be used. Which one is undefined.

Any secrets for getting Xojo iOS to play friendly?

I take it there’s nothing about XOJSimulatorLauncher in console?

There is not
:confused:

[quote=163735:@Tim Parnell]Compilation of app failed.
An error occurred when attempting to launch the application.
That’s all I’ve got.
Xcode and iOS Sim are open right now, iOS Sim is running fine.
I’ve even made a test helloworld with Xcode and it works brilliantly.

Why is Xojo failing so hard?

No, there’s no existing build. I’ve moved the project around to several locations to try that.
Log messages? Nope. This is all that’s in system.log relating to Xojo (and wow this is a mess too)[/quote]

I have seen such programs exploding in flight with little information before. First, you want to open the simulator console and (Debug menu/Open System Log) so you will have the information from the horse’s mouth. In particular, you will get more information about the crash. It is extremely verbose, and will tell you tons of things.

I suppose you have set something in app.UnhandledException ?

In the regular console, you should have at least the events concerning the launch of your app. Here is what I get from a small do nothing app :

2/1/15 1:40:51.004 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: launch start for 'file:///private/var/folders/sw/q9mqn7gd0jbg24kmdzxnv5qw0000gn/T/TemporaryItems/My%20iOS%20App.debug.app/' 2/1/15 1:40:51.039 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: checking simulator status 'file:///Applications/Xcode.app/Contents/Developer/Applications/iOS%20Simulator.app/' 2/1/15 1:40:51.078 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: no running simulator found 2/1/15 1:40:51.364 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: simulator launching 2/1/15 1:40:56.706 PM launchd_sim[1796]: assertion failed: 14C109: libxpc.dylib + 29453 [464E62EA-4CF2-3FEF-9C17-692AD8D66AA8]: 0x8d 2/1/15 1:40:56.964 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: simulator ready (com.apple.iphonesimulator.running) 2/1/15 1:40:56.965 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: installApplication 2/1/15 1:41:36.435 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: install attempt completed. 0 [<>, <>] 2/1/15 1:41:36.435 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: launch application com.matchsoftware.myapp 2/1/15 1:41:46.690 PM Xojo[1788]: <XOJSimulatorLauncher 0x139bec80; device = '0B3D6660-CD33-44C2-B62D-212CCB95EAB4'>: launch attempt completed. 0 [<636f6d2e 6d617463 68736f66 74776172 652e6d79 6170703a 20313833 370a>, <>]

If you do not get any XOJSimulator stuff, then it means the Xojo IDE probably caught its feet in the carpet…

Most often, the crashes I see are in the running program inside of the simulator.

It’s not crashing - it’s not even launching. Nothing ever appears in the Console (system.log) except the framework conflicts.

I’ve cleared the Xojo cache, the temporary folder, and restarted and it still won’t launch.

Where/how does Xojo get the iOS Sim path, because I bet that’s where the problem is. I had to do some cleanup because Xojo insisted on using a very old/broken installation I didn’t even know I had (that very clearly didn’t work anymore.) Now after removing the old crud Xojo won’t work.

All of the logic about launching the simulator lives in the XOJSimulator class, which has a good amount of logging in it. It’s definitely not related to being unable to find the simulator path.

Is it possible you don’t have a simulator device selected in the iOS build settings?

It might be that your app cannot be compiled because there is still an executable in the app bundle in memory. Check the Activity Monitor and if there is an instance running, kill it.

Well now we’re on to something.

Simulator Device is blank. However I can’t change it. It’s not disabled, it just isn’t responding to clicks?
Also, even new projects display this behavior.

Aha, okay. Try these commands in Terminal and post the output:

xcode-select -p xcodebuild -version xcrun simctl list

It seems the path was still the old one!
When/how was that supposed to get updated? Xcode built and launched HelloWorld just fine.

Can you post the output of the commands? I’d like to see if any of them get an error I can key off of and present something meaningful to users.

It gets updated either by explicitly using the xcode-select command line tool or going into the Locations section of Xcode’s preferences and changing what the command line tools refer to.

Xcode ‘cheats’ and talks directly to private frameworks that control the simulator. We have to go through semi-stable command line tools and some other hoops to get things to work.

You could just ask “Please select Xcode.app”

Zane:~ tim$ xcode-select -p /Developer/Applications/Xcode.app/Contents/Developer Zane:~ tim$ xcodebuild -version xcrun: error: active developer path ("/Developer/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select to change Zane:~ tim$ xcrun simctl list xcrun: error: active developer path ("/Developer/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select to change

Thanks for the output. I’ve created case #37993 to track this issue.