Closed nhinze closed 4 years ago
The ruby command
Rho::System.set_sleeping(true)
crashes when compiling using iOS 13.2 SDK. This worked fine with iOS 12.4 SDK.
I'm using Rhodes 7.1.17 (latest 7-1-stable branch). XCode 11.3.1 iOS 13.2 SDK Target iOS 11.4
Line 240 in SystemImpl.m is crashing.
void SystemImplIphone::setScreenSleeping(bool flag, rho::apiGenerator::CMethodResult& result) { [[UIApplication sharedApplication] setIdleTimerDisabled: (!flag ? YES : NO)]; //rho_sys_set_sleeping(flag?1:0); }
Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrientation] PID: 87324, TID: 6536186, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 rhorunner 0x000000010d8207a8 rho_sys_get_screen_width + 136 5 rhorunner 0x000000010d821e41 rho_sysimpl_get_property_iphone + 961 6 rhorunner 0x000000010d4c5a3c _ZN3rho16SystemImplIphone17getIphonePropertyEPKcRNS_12apiGenerator13CMethodResultE + 44 7 rhorunner 0x000000010d4c5a04 _ZN3rho16SystemImplIphone18getRealScreenWidthERNS_12apiGenerator13CMethodResultE + 36 8 rhorunner 0x000000010d492e35 rb_s_System_getRealScreenWidth + 949 9 rhorunner 0x000000010db159ea call_cfunc_m1 + 42 10 rhorunner 0x000000010db14403 vm_call_cfunc_with_frame + 451 11 rhorunner 0x000000010db1051a vm_call_cfunc + 170 12 rhorunner 0x000000010db0fa3c vm_call_method_each_type + 188 13 rhorunner 0x000000010db0f7d5 vm_call_method + 149 14 rhorunner 0x000000010db0f735 vm_call_general + 53 15 rhorunner 0x000000010dafa76d vm_exec_core + 11645 16 rhorunner 0x000000010db07bb3 vm_exec + 179 17 rhorunner 0x000000010db1b17f vm_call0_body + 415 18 rhorunner 0x000000010db049e3 vm_call0 + 115 19 rhorunner 0x000000010db1c1be rb_call0 + 158 20 rhorunner 0x000000010db05a2a rb_call + 74 21 rhorunner 0x000000010db02c81 rb_funcallv + 49 22 rhorunner 0x000000010db6bdd7 rb_obj_call_init + 55 23 rhorunner 0x000000010da9e3e0 rb_class_new_instance + 48 24 rhorunner 0x000000010db159ea call_cfunc_m1 + 42 25 rhorunner 0x000000010db14403 vm_call_cfunc_with_frame + 451 26 rhorunner 0x000000010db1051a vm_call_cfunc + 170 27 rhorunner 0x000000010db0fa3c vm_call_method_each_type + 188 28 rhorunner 0x000000010db0f7d5 vm_call_method + 149 29 rhorunner 0x000000010db0f735 vm_call_general + 53 30 rhorunner 0x000000010dafa76d vm_exec_core + 11645 31 rhorunner 0x000000010db07bb3 vm_exec + 179 32 rhorunner 0x000000010db1b17f vm_call0_body + 415 33 rhorunner 0x000000010db049e3 vm_call0 + 115 34 rhorunner 0x000000010db1c1be rb_call0 + 158 35 rhorunner 0x000000010db05a2a rb_call + 74 36 rhorunner 0x000000010db05ccd rb_funcall + 589 37 rhorunner 0x000000010da73a1f RhoRubyInitApp + 31 38 rhorunner 0x000000010d9a69cb _ZN3rho6common10CRhodesApp3runEv + 555 39 rhorunner 0x000000010d8484d6 _ZN3rho6common10CRhoThread9runObjectEv + 38 40 rhorunner 0x000000010d860872 _ZN3rho6common7runProcEPv + 50 41 libsystem_pthread.dylib 0x00007fff524602eb _pthread_body + 126 42 libsystem_pthread.dylib 0x00007fff52463249 _pthread_start + 66 43 libsystem_pthread.dylib 0x00007fff5245f40d thread_start + 13 2020-01-31 13:35:46.608075-0500 rhorunner[87324:6536186] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrientation] PID: 87324, TID: 6536186, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 rhorunner 0x000000010d8207a8 rho_sys_get_screen_width + 136 5 rhorunner 0x000000010d821e41 rho_sysimpl_get_property_iphone + 961 6 rhorunner 0x000000010d4c5a3c _ZN3rho16SystemImplIphone17getIphonePropertyEPKcRNS_12apiGenerator13CMethodResultE + 44 7 rhorunner 0x000000010d4c5a04 _ZN3rho16SystemImplIphone18getRealScreenWidthERNS_12apiGenerator13CMethodResultE + 36 8 rhorunner 0x000000010d492e35 rb_s_System_getRealScreenWidth + 949 9 rhorunner 0x000000010db159ea call_cfunc_m1 + 42 10 rhorunner 0x000000010db14403 vm_call_cfunc_with_frame + 451 11 rhorunner 0x000000010db1051a vm_call_cfunc + 170 12 rhorunner 0x000000010db0fa3c vm_call_method_each_type + 188 13 rhorunner 0x000000010db0f7d5 vm_call_method + 149 14 rhorunner 0x000000010db0f735 vm_call_general + 53 15 rhorunner 0x000000010dafa76d vm_exec_core + 11645 16 rhorunner 0x000000010db07bb3 vm_exec + 179 17 rhorunner 0x000000010db1b17f vm_call0_body + 415 18 rhorunner 0x000000010db049e3 vm_call0 + 115 19 rhorunner 0x000000010db1c1be rb_call0 + 158 20 rhorunner 0x000000010db05a2a rb_call + 74 21 rhorunner 0x000000010db02c81 rb_funcallv + 49 22 rhorunner 0x000000010db6bdd7 rb_obj_call_init + 55 23 rhorunner 0x000000010da9e3e0 rb_class_new_instance + 48 24 rhorunner 0x000000010db159ea call_cfunc_m1 + 42 25 rhorunner 0x000000010db14403 vm_call_cfunc_with_frame + 451 26 rhorunner 0x000000010db1051a vm_call_cfunc + 170 27 rhorunner 0x000000010db0fa3c vm_call_method_each_type + 188 28 rhorunner 0x000000010db0f7d5 vm_call_method + 149 29 rhorunner 0x000000010db0f735 vm_call_general + 53 30 rhorunner 0x000000010dafa76d vm_exec_core + 11645 31 rhorunner 0x000000010db07bb3 vm_exec + 179 32 rhorunner 0x000000010db1b17f vm_call0_body + 415 33 rhorunner 0x000000010db049e3 vm_call0 + 115 34 rhorunner 0x000000010db1c1be rb_call0 + 158 35 rhorunner 0x000000010db05a2a rb_call + 74 36 rhorunner 0x000000010db05ccd rb_funcall + 589 37 rhorunner 0x000000010da73a1f RhoRubyInitApp + 31 38 rhorunner 0x000000010d9a69cb _ZN3rho6common10CRhodesApp3runEv + 555 39 rhorunner 0x000000010d8484d6 _ZN3rho6common10CRhoThread9runObjectEv + 38 40 rhorunner 0x000000010d860872 _ZN3rho6common7runProcEPv + 50 41 libsystem_pthread.dylib 0x00007fff524602eb _pthread_body + 126 42 libsystem_pthread.dylib 0x00007fff52463249 _pthread_start + 66 43 libsystem_pthread.dylib 0x00007fff5245f40d thread_start + 13 2020-01-31 13:35:46.843874-0500 rhorunner[87324:6535917] PUSH Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo={NSLocalizedDescription=remote notifications are not supported in the simulator} 2020-01-31 13:35:46.843983-0500 rhorunner[87324:6535917] Push Notification Error: remote notifications are not supported in the simulator 2020-01-31 13:35:47.599968-0500 rhorunner[87324:6536186] E 01/31/2020 13:35:47:580 0530d000 RhoRuby| require_compiled: error: can not find cgi/escape ================================================================= Main Thread Checker: UI API called on a background thread: -[UIApplication setIdleTimerDisabled:] PID: 87324, TID: 6536186, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 rhorunner 0x000000010d4c620b _ZN3rho16SystemImplIphone17setScreenSleepingEbRNS_12apiGenerator13CMethodResultE + 91 5 rhorunner 0x000000010d4c3fef _ZN3rho15CSystemImplBase12set_sleepingEbRNS_12apiGenerator13CMethodResultE + 63 6 rhorunner 0x000000010d4af011 rb_s_System_set_sleeping + 1809 7 rhorunner 0x000000010db159ea call_cfunc_m1 + 42 8 rhorunner 0x000000010db14403 vm_call_cfunc_with_frame + 451 9 rhorunner 0x000000010db1051a vm_call_cfunc + 170 10 rhorunner 0x000000010db0fa3c vm_call_method_each_type + 188 11 rhorunner 0x000000010db0f7d5 vm_call_method + 149 12 rhorunner 0x000000010db0f735 vm_call_general + 53 13 rhorunner 0x000000010dafa76d vm_exec_core + 11645 14 rhorunner 0x000000010db07bb3 vm_exec + 179 15 rhorunner 0x000000010db1b17f vm_call0_body + 415 16 rhorunner 0x000000010db049e3 vm_call0 + 115 17 rhorunner 0x000000010db1c1be rb_call0 + 158 18 rhorunner 0x000000010db05a2a rb_call + 74 19 rhorunner 0x000000010db05ccd rb_funcall + 589 20 rhorunner 0x000000010da74d8a callFramework + 42 21 rhorunner 0x000000010d865ff1 _ZN3rho3net11CHttpServer6decideERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_SA_RKNS_6VectorINS0_10HttpHeaderEEESA_ + 753 22 rhorunner 0x000000010d863563 _ZN3rho3net11CHttpServer7processEi + 979 23 rhorunner 0x000000010d862e47 _ZN3rho3net11CHttpServer3runEv + 823 24 rhorunner 0x000000010d9a6b90 _ZN3rho6common10CRhodesApp3runEv + 1008 25 rhorunner 0x000000010d8484d6 _ZN3rho6common10CRhoThread9runObjectEv + 38 26 rhorunner 0x000000010d860872 _ZN3rho6common7runProcEPv + 50 27 libsystem_pthread.dylib 0x00007fff524602eb _pthread_body + 126 28 libsystem_pthread.dylib 0x00007fff52463249 _pthread_start + 66 29 libsystem_pthread.dylib 0x00007fff5245f40d thread_start + 13 2020-01-31 13:35:47.995735-0500 rhorunner[87324:6536186] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication setIdleTimerDisabled:] PID: 87324, TID: 6536186, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0 Backtrace: 4 rhorunner 0x000000010d4c620b _ZN3rho16SystemImplIphone17setScreenSleepingEb2020-01-31 13:35:48.001412-0500 rhorunner[87324:6535917] Unbalanced calls to begin/end appearance transitions for <SimpleMainView: 0x7fe1aee09e30>. RNS_12apiGenerator13CMethodResultE + 91 5 rhorunner 0x000000010d4c3fef _ZN3rho15CSystemImplBase12set_sleepingEbRNS_12apiGenerator13CMethodResultE + 63 6 rhorunner 0x000000010d4af011 rb_s_System_set_sleeping + 1809 7 rhorunner 0x000000010db159ea call_cfunc_m1 + 42 8 rhorunner 0x000000010db14403 vm_call_cfunc_with_frame + 451 9 rhorunner 0x000000010db1051a vm_call_cfunc + 170 10 rhorunner 0x000000010db0fa3c vm_call_method_each_type + 188 11 rhorunner 0x000000010db0f7d5 vm_call_method + 149 12 rhorunner 0x000000010db0f735 vm_call_general + 53 13 rhorunner 0x000000010dafa76d vm_exec_core + 11645 14 rhorunner 0x000000010db07bb3 vm_exec + 179 15 rhorunner 0x000000010db1b17f vm_call0_body + 415 16 rhorunner 0x000000010db049e3 vm_call0 + 115 17 rhorunner 0x000000010db1c1be rb_call0 + 158 18 rhorunner 0x000000010db05a2a rb_call + 74 19 rhorunner 0x000000010db05ccd rb_funcall + 589 20 rhorunner 0x000000010da74d8a callFramework + 42 21 rhorunner 0x000000010d865ff1 _ZN3rho3net11CHttpServer6decideERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_SA_RKNS_6VectorINS0_10HttpHeaderEEESA_ + 753 22 rhorunner 0x000000010d863563 _ZN3rho3net11CHttpServer7processEi + 979 23 rhorunner 0x000000010d862e47 _ZN3rho3net11CHttpServer3runEv + 823 24 rhorunner 0x000000010d9a6b90 _ZN3rho6common10CRhodesApp3runEv + 1008 25 rhorunner 0x000000010d8484d6 _ZN3rho6common10CRhoThread9runObjectEv + 38 26 rhorunner 0x000000010d860872 _ZN3rho6common7runProcEPv + 50 27 libsystem_pthread.dylib 0x00007fff524602eb _pthread_body + 126 28 libsystem_pthread.dylib 0x00007fff52463249 _pthread_start + 66 29 libsystem_pthread.dylib 0x00007fff5245f40d thread_start + 13 2020-01-31 13:35:48.053959-0500 rhorunner[87324:6536186] *** Assertion failure in -[FBSSerialQueue assertOnQueue], /BuildRoot/Library/Caches/com.apple.xbs/Sources/FrontBoardServices_Sim/FrontBoard-626.4.1/FrontBoardServices/FBSSerialQueue.m:98 2020-01-31 13:35:48.062627-0500 rhorunner[87324:6536186] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'threading violation: expected the main thread' *** First throw call stack: ( 0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23c70ff8 +[NSException raise:format:arguments:] + 88 3 Foundation 0x00007fff256e9b51 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191 4 FrontBoardServices 0x00007fff366219cb -[FBSSerialQueue assertOnQueue] + 236 5 FrontBoardServices 0x00007fff365d46f9 -[FBSSceneImpl updateClientSettings:withTransitionContext:] + 70 6 FrontBoardServices 0x00007fff365d4944 -[FBSSceneImpl updateClientSettingsWithTransitionBlock:] + 154 7 FrontBoardServices 0x00007fff365d4869 -[FBSSceneImpl updateClientSettingsWithBlock:] + 110 8 UIKitCore 0x00007fff47bd9088 -[FBSScene(UIApp) updateUIClientSettingsWithBlock:] + 160 9 UIKitCore 0x00007fff48087f46 -[UIApplication _setIdleTimerDisabled:forReason:] + 198 10 rhorunner 0x000000010d4c620b _ZN3rho16SystemImplIphone17setScreenSleepingEbRNS_12apiGenerator13CMethodResultE + 91 11 rhorunner 0x000000010d4c3fef _ZN3rho15CSystemImplBase12set_sleepingEbRNS_12apiGenerator13CMethodResultE + 63 12 rhorunner 0x000000010d4af011 rb_s_System_set_sleeping + 1809 13 rhorunner 0x000000010db159ea call_cfunc_m1 + 42 14 rhorunner 0x000000010db14403 vm_call_cfunc_with_frame + 451 15 rhorunner 0x000000010db1051a vm_call_cfunc + 170 16 rhorunner 0x000000010db0fa3c vm_call_method_each_type + 188 17 rhorunner 0x000000010db0f7d5 vm_call_method + 149 18 rhorunner 0x000000010db0f735 vm_call_general + 53 19 rhorunner 0x000000010dafa76d vm_exec_core + 11645 20 rhorunner 0x000000010db07bb3 vm_exec + 179 21 rhorunner 0x000000010db1b17f vm_call0_body + 415 22 rhorunner 0x000000010db049e3 vm_call0 + 115 23 rhorunner 0x000000010db1c1be rb_call0 + 158 24 rhorunner 0x000000010db05a2a rb_call + 74 25 rhorunner 0x000000010db05ccd rb_funcall + 589 26 rhorunner 0x000000010da74d8a callFramework + 42 27 rhorunner 0x000000010d865ff1 _ZN3rho3net11CHttpServer6decideERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_SA_RKNS_6VectorINS0_10HttpHeaderEEESA_ + 753 28 rhorunner 0x000000010d863563 _ZN3rho3net11CHttpServer7processEi + 979 29 rhorunner 0x000000010d862e47 _ZN3rho3net11CHttpServer3runEv + 823 30 rhorunner 0x000000010d9a6b90 _ZN3rho6common10CRhodesApp3runEv + 1008 31 rhorunner 0x000000010d8484d6 _ZN3rho6common10CRhoThread9runObjectEv + 38 32 rhorunner 0x000000010d860872 _ZN3rho6common7runProcEPv + 50 33 libsystem_pthread.dylib 0x00007fff524602eb _pthread_body + 126 34 libsystem_pthread.dylib 0x00007fff52463249 _pthread_start + 66 35 libsystem_pthread.dylib 0x00007fff5245f40d thread_start + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException
fixed by this commit - https://github.com/rhomobile/rhodes/commit/f0cad1ec76472deb58b6f0dda1e365e9a706717f
Will be included to next dev version and to next stable version too
The ruby command
Rho::System.set_sleeping(true)
crashes when compiling using iOS 13.2 SDK. This worked fine with iOS 12.4 SDK.
I'm using Rhodes 7.1.17 (latest 7-1-stable branch). XCode 11.3.1 iOS 13.2 SDK Target iOS 11.4
Line 240 in SystemImpl.m is crashing.