robovm / robovm-idea

GNU General Public License v2.0
18 stars 18 forks source link

Default project not loading in Simulator #60

Closed zwhitten closed 9 years ago

zwhitten commented 9 years ago

Using IntelliJ IDEA 14 CE 1.8 JDK Latest RoboVM Plugin

Create a new Project using the "RoboVM iOS App without storyboards" Create a run configuration for iPhone 6 - iOS 8.3 x86

If you run the default created application in the simulator, the RoboVM logo shows for about 30 seconds before the application exits without any messages or errors.

badlogic commented 9 years ago

The simulator will kill the app after 30 seconds if it doesn't hit the UIApplicationDelegate. What machine are you running the simulator on?

zwhitten commented 9 years ago

@badlogic I've actually hit the same issue on two different machines

badlogic commented 9 years ago

Hm, both machines should be more than capable to load the app within 30 seconds. What's your CPU load before you start running the app? Could you try the default project with storyboard? Could you check the simulator logs and post them here? Finally, could you try a run via the command line plus Gradle?

Generate the project via IDEA, select Gradle as the build system. Drop the the folder of the project in your terminal and run ./gradle compileJava launchIPhoneSimulator

zwhitten commented 9 years ago

So after further investigation it seems to be much more intermittent than I thought initially.

On the macbook pro (better computer), the failure happened only initially from a cold start. ie Just booted up IntelliJ, created the project, created the runner and launched it. Subsequent runs on this computer worked fine.

On the mac mini (worse computer), I was not running the "RoboVM Ram Disk" as suggested in the compilation warning which seems to be the cause. (User error ?) After mounting the RAM space as a drive for the tmp files it seemed to launch fine. Is this the expected behavior?

Closing out since it seems to be my error.

Here are my system logs during one of the failures on the mac mini:

May 12 11:13:34 zachwhitensmini CoreSimulatorBridge[84786]: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x7fc49a445280> com.mycompany.myapp May 12 11:13:34 zachwhitensmini CoreSimulatorBridge[84786]: LaunchServices: Not creating progress for <LSApplicationProxy: 0x7fc49a445280> com.mycompany.myapp since it is not a placeholder. May 12 11:13:34 zachwhitensmini installd[84774]: 0x11379d000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/Users/zwhitten/Projects/RoboVmTest/robovm-build/tmp/Simulator/ios/x86/Main.app" type Developer requested by CoreSimulatorBridge (pid 84786) May 12 11:13:35 zachwhitensmini installd[84774]: 0x11379d000 MDMCreateDeltaDirectory: calling MDMDirectoryDiff with: state->old_bundle: /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Containers/Bundle/Application/7036C5F5-8D32-4C74-B618-98357EE23234/Main.app state->new_bundle: /Users/zwhitten/Projects/RoboVmTest/robovm-build/tmp/Simulator/ios/x86/Main.app state->dst_bundle: /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Library/Caches/com.apple.mobile.installd.staging/temp.afhWqs/extracted/Payload//Main.app, binaryDiff flag: FALSE dst_ipa: /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Library/Caches/com.apple.mobile.installd.staging/temp.afhWqs/extracted May 12 11:13:35 zachwhitensmini installd[84774]: 0x11379d000 createDictFromFile: open failed for /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Containers/Bundle/Application/7036C5F5-8D32-4C74-B618-98357EE23234/ManifestCache.plist : No such file or directory May 12 11:13:35 zachwhitensmini installd[84774]: 0x113860000 __MDMDirectoryDiff_block_invoke29: calling writeDictToFile with: /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Library/Caches/com.apple.mobile.installd.staging/temp.afhWqs/extracted/ManifestCache.plist May 12 11:13:35 zachwhitensmini installd[84774]: 0x113860000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Library/Caches/com.apple.mobile.installd.staging/temp.afhWqs/extracted/ManifestCache.plist May 12 11:13:46 zachwhitensmini installd[84774]: 0x11379d000 -[MIInstaller performInstallationWithError:]: Installing May 12 11:13:46 zachwhitensmini installd[84774]: 0x11379d000 -[MIInstallableBundlePatch applyPatchWithError:]: Attempting patch update of com.mycompany.myapp from 1 (1.0) to 1 (1.0) May 12 11:13:47 zachwhitensmini SpringBoard[84778]: Killing com.mycompany.myapp for termination assertion May 12 11:13:47 zachwhitensmini pkd[84793]: releasing plug-in hold 424A5FA3-FFE3-41F9-876E-3FF0B8EFF479 for dead client pid 84778 May 12 11:13:49 zachwhitensmini installd[84774]: 0x11379d000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.mycompany.myapp is now at /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Containers/Data/Application/83F25E49-AAF5-4584-A2A2-71BB72E635A5 May 12 11:13:50 zachwhitensmini installd[84774]: 0x11379d000 -[MIContainer makeContainerLiveReplacingContainer:withError:]: Made container live for com.mycompany.myapp at /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Containers/Bundle/Application/8FBC6B58-35FB-475A-85EE-20EF4CD0C101 May 12 11:13:50 zachwhitensmini installd[84774]: 0x11379d000 -[MIInstaller performInstallationWithError:]: Staging: 11.67s; Waiting: 0.00s; Installation: 4.28s; Overall: 16.09s May 12 11:13:51 zachwhitensmini CoreSimulatorBridge[84786]: LaunchServices: NotifiedObservers <LSApplicationProxy: 0x7fc49a4460f0> com.mycompany.myapp was installed May 12 11:13:51 zachwhitensmini lsd[84798]: LaunchServices: Updating identifier store May 12 11:13:51 zachwhitensmini SpringBoard[84778]: libMobileGestalt MobileGestalt.c:841: still-camera is static and will never generate a notification May 12 11:13:51 zachwhitensmini SpringBoard[84778]: libMobileGestalt MobileGestalt.c:841: stand-alone-contacts is static and will never generate a notification May 12 11:13:52 zachwhitensmini /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/libexec/lsd[84798]: LaunchServices: Failed to set the data protection class for /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/tmp/com.apple.IconsCache/com.mycompany.myapp_CFBundleIcon[15] May 12 11:13:52 zachwhitensmini SpringBoard[84778]: Installed apps did change. Added: {( )} Removed: {( )} Modified: {( "com.mycompany.myapp" )} May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.MobileSMS May 12 11:13:52 zachwhitensmini SpringBoard[84778]: throwing out icon because its isn't visible in the model : node=<SBApplicationIcon: 0x7fd8a0739b10; nodeID: "com.apple.camera"> com.apple.camera May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.weather May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.mobiletimer May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.videos May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.mobilenotes May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.reminders May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.stocks May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.iBooks May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.MobileStore May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.AppStore May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.Bridge May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.facetime May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.calculator May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.podcasts May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.compass May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.tips May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.VoiceMemos May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.mobilephone May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.mobilemail May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.Music May 12 11:13:54 zachwhitensmini assertiond[84782]: assertion failed: 13F1077 12D508: assertiond + 12446 [6756D728-8EE6-3DA2-B069-3EA61C107DF8]: 0x1 May 12 11:14:16 zachwhitensmini com.apple.CoreSimulator.SimDevice.ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD.launchd_sim84765: Service exited due to signal: Killed: 9 May 12 11:14:16 zachwhitensmini SpringBoard[84778]: Application 'UIKitApplication:com.mycompany.myapp[0xfcce]' exited abnormally via signal. May 12 11:14:16 zachwhitensmini assertiond[84782]: assertion failed: 13F1077 12D508: assertiond + 12446 [6756D728-8EE6-3DA2-B069-3EA61C107DF8]: 0x1

badlogic commented 9 years ago

I wouldn't say it's your error, we don't state the RAM disk "solution" prominently enough on our web page.

When the simulator gets started for the first time, it has to load a lot of additional shared libraries, which slows down startup times of your app. Subsequent launches in the same instance can link to the already loaded shared libraries, which makes startup times a lot faster. We don't have a good solution for this problem yet, other than making the startup time of RoboVM apps faster. We don't have control over the other part, that is, loading required system libraries before your app gets started.

Thanks for reporting and getting to the root of the issue!

On Wed, May 13, 2015 at 3:16 PM, zwhitten notifications@github.com wrote:

So after further investigation it seems to be much more intermittent than I thought initially.

On the macbook pro (better computer), the failure happened only initially from a cold start. ie Just booted up IntelliJ, created the project, created the runner and launched it. Subsequent runs on this computer worked fine.

On the mac mini (worse computer), I was not running the "RoboVM Ram Disk" as suggested in the compilation warning which seems to be the cause. (User error ?) After mounting the RAM space as a drive for the tmp files it seemed to launch fine. Is this the expected behavior?

Closing out since it seems to be my error.

Here are my system logs during one of the failures on the mac mini:

May 12 11:13:34 zachwhitensmini CoreSimulatorBridge[84786]: LaunchServices: installing app for existing placeholder com.mycompany.myapp May 12 11:13:34 zachwhitensmini CoreSimulatorBridge[84786]: LaunchServices: Not creating progress for com.mycompany.myapp since it is not a placeholder. May 12 11:13:34 zachwhitensmini installd[84774]: 0x11379d000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/Users/zwhitten/Projects/RoboVmTest/robovm-build/tmp/Simulator/ios/x86/Main.app" type Developer requested by CoreSimulatorBridge (pid 84786) May 12 11:13:35 zachwhitensmini installd[84774]: 0x11379d000 MDMCreateDeltaDirectory: calling MDMDirectoryDiff with: state->old_bundle: /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Containers/Bundle/Application/7036C5F5-8D32-4C74-B618-98357EE23234/Main.app state->new_bundle: /Users/zwhitten/Projects/RoboVmTest/robovm-build/tmp/Simulator/ios/x86/Main.app state->dst_bundle: /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Library/Caches/com.apple.mobile.installd.staging/temp.afhWqs/extracted/Payload//Main.app, binaryDiff flag: FALSE dst_ipa: /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Library/Caches/com.apple.mobile.installd.staging/temp.afhWqs/extracted May 12 11:13:35 zachwhitensmini installd[84774]: 0x11379d000 createDictFromFile: open failed for /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Containers/Bundle/Application/7036C5F5-8D32-4C74-B618-98357EE23234/ManifestCache.plist : No such file or directory May 12 11:13:35 zachwhitensmini installd[84774]: 0x113860000 __MDMDirectoryDiff_block_invoke29: calling writeDictToFile with: /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Library/Caches/com.apple.mobile.installd.staging/temp.afhWqs/extracted/ManifestCache.plist May 12 11:13:35 zachwhitensmini installd[84774]: 0x113860000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Library/Caches/com.apple.mobile.installd.staging/temp.afhWqs/extracted/ManifestCache.plist May 12 11:13:46 zachwhitensmini installd[84774]: 0x11379d000 -[MIInstaller performInstallationWithError:]: Installing May 12 11:13:46 zachwhitensmini installd[84774]: 0x11379d000 -[MIInstallableBundlePatch applyPatchWithError:]: Attempting patch update of com.mycompany.myapp from 1 (1.0) to 1 (1.0) May 12 11:13:47 zachwhitensmini SpringBoard[84778]: Killing com.mycompany.myapp for termination assertion May 12 11:13:47 zachwhitensmini pkd[84793]: releasing plug-in hold 424A5FA3-FFE3-41F9-876E-3FF0B8EFF479 for dead client pid 84778 May 12 11:13:49 zachwhitensmini installd[84774]: 0x11379d000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.mycompany.myapp is now at /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Containers/Data/Application/83F25E49-AAF5-4584-A2A2-71BB72E635A5 May 12 11:13:50 zachwhitensmini installd[84774]: 0x11379d000 -[MIContainer makeContainerLiveReplacingContainer:withError:]: Made container live for com.mycompany.myapp at /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/Containers/Bundle/Application/8FBC6B58-35FB-475A-85EE-20EF4CD0C101 May 12 11:13:50 zachwhitensmini installd[84774]: 0x11379d000 -[MIInstaller performInstallationWithError:]: Staging: 11.67s; Waiting: 0.00s; Installation: 4.28s; Overall: 16.09s May 12 11:13:51 zachwhitensmini CoreSimulatorBridge[84786]: LaunchServices: NotifiedObservers com.mycompany.myapp was installed May 12 11:13:51 zachwhitensmini lsd[84798]: LaunchServices: Updating identifier store May 12 11:13:51 zachwhitensmini SpringBoard[84778]: libMobileGestalt MobileGestalt.c:841: still-camera is static and will never generate a notification May 12 11:13:51 zachwhitensmini SpringBoard[84778]: libMobileGestalt MobileGestalt.c:841: stand-alone-contacts is static and will never generate a notification May 12 11:13:52 zachwhitensmini /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/libexec/lsd[84798]: LaunchServices: Failed to set the data protection class for /Users/zwhitten/Library/Developer/CoreSimulator/Devices/ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD/data/tmp/com.apple.IconsCache/com.mycompany.myapp_CFBundleIcon[15] May 12 11:13:52 zachwhitensmini SpringBoard[84778]: Installed apps did change. Added: {( )} Removed: {( )} Modified: {( "com.mycompany.myapp" )} May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.MobileSMS May 12 11:13:52 zachwhitensmini SpringBoard[84778]: throwing out icon because its isn't visible in the model : node= com.apple.camera May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.weather May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.mobiletimer May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.videos May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.mobilenotes May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.reminders May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.stocks May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.iBooks May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.MobileStore May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.AppStore May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.Bridge May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.facetime May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.calculator May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.podcasts May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.compass May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.tips May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.VoiceMemos May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.mobilephone May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.mobilemail May 12 11:13:52 zachwhitensmini SpringBoard[84778]: could not find icon for representation -> com.apple.Music May 12 11:13:54 zachwhitensmini assertiond[84782]: assertion failed: 13F1077 12D508: assertiond + 12446 [6756D728-8EE6-3DA2-B069-3EA61C107DF8]: 0x1 May 12 11:14:16 zachwhitensmini com.apple.CoreSimulator.SimDevice.ACCFEED0-A907-4EFF-A8BD-B4A83EF7D4AD.launchd_sim84765: Service exited due to signal: Killed: 9 May 12 11:14:16 zachwhitensmini SpringBoard[84778]: Application 'UIKitApplication:com.mycompany.myapp[0xfcce]' exited abnormally via signal. May 12 11:14:16 zachwhitensmini assertiond[84782]: assertion failed: 13F1077 12D508: assertiond + 12446 [6756D728-8EE6-3DA2-B069-3EA61C107DF8]: 0x1

— Reply to this email directly or view it on GitHub https://github.com/robovm/robovm-idea/issues/60#issuecomment-101659992.