I ran the MOE application in iOS simulator but the app was suddenly closed with the following message.
2016-09-13 21:54:53.234 ios-moe[5079:1272350] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-13 21:54:53.235 ios-moe[5079:1272350] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-13 21:54:53.235 ios-moe[5079:1272350] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-13 21:54:53.236 ios-moe[5079:1272350] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-13 21:54:53.237 ios-moe[5079:1272350] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
with MOE you do not need to put UIKit.UIApplicationMain... in an autoreleasepool, the main method is already in one. However if you really need to use autorelease pools, you should use NatJ-s API:
ObjCRuntime.autoreleasepool(() -> {
// Do stuff
});
// OR
final long autoreleasePool = ObjCRuntime.createAutoreleasePool();
try {
// Do stuff
} finally {
ObjCRuntime.releaseAutoreleasePool(autoreleasePool);
}
However I’m afraid I don’t really understand what you said because I’m not familiar with iOS .
“with MOE you do not need to put UIKit.UIApplicationMain… in an autoreleasepool” means do I need to make any change in the main method (getting rid of UIKit.UIApplicationMain… etc)?
I slightly changed the “protected IOSApplication createApplication()” but I didn’t do anything about the main method.
I’d appreciated if you would give me more details about your suggestion.
yes, in case of the static void main(String[] argv) {...} method, wrapping the UIKit.UIApplicationMain(...) call in an autoreleasepool is unnecessary.
Is the output exactly the same as before? If yes, please delete the build directory and run again. If the output is still the same, could you please copy a bigger chunk of the output here?
I did remove the “NSAutoreleasePool” part and delete the ‘build’ directory and ran again but the output is still the same.
The following is the copy of the full message in ‘Run’ window.
/Users/telulullc/AndroidStudioProjects/MemorangerGDXmoeJP/gradlew moeLaunch -Pmoe.launcher.options=no-build,config:Debug -Pmoe.launcher.simulators=AB727577-CCAC-45C2-B030-CC3991CBCEC3
Configuration on demand is an incubating feature.
:ios-moe:moeLaunchart I 3174 259202 /Volumes/SSD/gh-moe-master/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/32E8BD43-424F-40F6-8C9E-9AC687AB0048/ios-moe.app/application.jar:/Users/telulullc/Library/Developer/CoreSimulator/Devices/AB727577-CCAC-45C2-B030-CC3991CBCEC3/data/Containers/Bundle/Application/32E8BD43-424F-40F6-8C9E-9AC687AB0048/ios-moe.app
art W 3174 259202 /Volumes/SSD/gh-moe-master/aosp/art/runtime/native/java_lang_Runtime.cc:65] android_update_LD_LIBRARY_PATH not found; .so dependencies will not work!
art W 3174 259202 /Volumes/SSD/gh-moe-master/aosp/art/runtime/native/java_lang_Runtime.cc:65] android_update_LD_LIBRARY_PATH not found; .so dependencies will not work!
2016-09-14 22:03:49.684 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.685 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.686 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.687 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.688 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.689 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.693 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.694 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.695 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.695 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.696 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.696 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.697 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.697 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.697 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.698 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.698 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.699 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.699 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.699 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.700 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.700 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.700 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.701 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.701 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.702 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.703 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.704 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.704 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.704 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.705 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.705 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.706 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.706 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.707 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been drained, do not release it (double release).
2016-09-14 22:03:49.707 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
2016-09-14 22:03:49.708 ios-moe[3174:259265] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
IOSApplication 3 iOS version: 9.3
IOSApplication 3 scale: 2.0
IOSApplication 3 Status bar is visible (height = 20.0)
IOSApplication 3 Total computed bounds are w=640.0 h=920.0
IOSGraphics 3 Display: ppi=163, density=2.0
IOSApplication 3 created
IOSApplication 3 resumed
IOSApplication 3 Status bar is visible (height = 20.0)
IOSApplication 3 Total computed bounds are w=640.0 h=920.0