iOS Question [SOLVED]App crashing need help tracking it down

tsteward

Well-Known Member
Licensed User
Longtime User
I always struggle to understand the log output.
Hoping someone help point work out where my app is crashing.

My App LARA loads Vehicle data from a local database then downloads feedback add by my users from an online database.

I have no issues when running on android. So I guess android is more forgiving somewhere.
It doesn't crash on every vehicle I load, just some and consistently the same ones.

Class (b4i_httpjob) instance released.
*** mainpage: B4XPage_Disappear [mainpage, page car]
*** page car: B4XPage_Appear [mainpage, page car]
Error occurred on line: 15 (B4XPages)
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[3]
Stack Trace: (
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 1155624
libobjc.A.dylib objc_exception_throw + 88
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 1053004
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 150388
LARA5 -[ResumableSub_b4xpagecar_loadFeedback resume::] + 30484
LARA5 -[B4IShell runGoodChain::] + 172
LARA5 -[B4IShell raiseEventImpl:method:args::] + 1632
LARA5 -[B4IShellBI raiseEvent:event:params:] + 1008
LARA5 -[B4IDelegatableResumableSub resume::] + 300
LARA5 -[B4I checkAndRunWaitForEvent:event:params:] + 252
LARA5 -[B4IShellBI raiseEvent:event:params:] + 904
LARA5 -[B4ICommon CallSub4::::] + 188
LARA5 -[B4ICommon CallSub2::::] + 188
LARA5 -[b4i_httpjob _complete::] + 592
LARA5 -[b4i_httputils2service _completejob::::] + 1404
LARA5 -[b4i_httputils2service _hc_responsesuccess::] + 488
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 195220
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 192780
LARA5 +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 776
LARA5 -[B4IShell runMethod:] + 320
LARA5 -[B4IShell raiseEventImpl:method:args::] + 932
LARA5 -[B4IShellBI raiseEvent:event:params:] + 1008
LARA5 __61-[B4IHttp URLSession:downloadTask:didFinishDownloadingToURL:]_block_invoke + 244
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 112004
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 71680
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 112004
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 230816
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 68912
libdispatch.dylib _dispatch_main_queue_callback_4CF + 44
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 445840
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 66804
CoreFoundation CFRunLoopRunSpecific + 572
GraphicsServices GSEventRunModal + 168
UIKitCore 96636F64-106F-30C8-A780-82DCEBB0F443 + 1266292
UIKitCore UIApplicationMain + 336
LARA5 main + 96
dyld 86D5253D-4FD1-36F3-B4AB-25982C90CBF4 + 257800
)
 

tsteward

Well-Known Member
Licensed User
Longtime User
here is full log
Application_Start
Device locale: en
Found 382 strings.
Found 382 strings.
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Application_Active
*** mainpage: B4XPage_Appear [mainpage]
*** mainpage: B4XPage_Resize [mainpage]
Class (b4i_httpjob) instance released.
Class (b4i_httpjob) instance released.
Class (b4i_httpjob) instance released.
Class (b4i_httpjob) instance released.
*** page car: B4XPage_Created [mainpage]
*** page car: B4XPage_Resize [mainpage, page car]
*** mainpage: B4XPage_Disappear [mainpage, page car]
*** page car: B4XPage_Appear [mainpage, page car]
*** page car: B4XPage_Resize [mainpage, page car]
Error occurred on line: 15 (B4XPages)
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[3]
Stack Trace: (
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 1155624
libobjc.A.dylib objc_exception_throw + 88
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 1053004
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 150388
LARA5 -[ResumableSub_b4xpagecar_loadFeedback resume::] + 30484
LARA5 -[B4IShell runGoodChain::] + 172
LARA5 -[B4IShell raiseEventImpl:method:args::] + 1632
LARA5 -[B4IShellBI raiseEvent:event:params:] + 1008
LARA5 -[B4IDelegatableResumableSub resume::] + 300
LARA5 -[B4I checkAndRunWaitForEvent:event:params:] + 252
LARA5 -[B4IShellBI raiseEvent:event:params:] + 904
LARA5 -[B4ICommon CallSub4::::] + 188
LARA5 -[B4ICommon CallSub2::::] + 188
LARA5 -[b4i_httpjob _complete::] + 592
LARA5 -[b4i_httputils2service _completejob::::] + 1404
LARA5 -[b4i_httputils2service _hc_responsesuccess::] + 488
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 195220
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 192780
LARA5 +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 776
LARA5 -[B4IShell runMethod:] + 320
LARA5 -[B4IShell raiseEventImpl:method:args::] + 932
LARA5 -[B4IShellBI raiseEvent:event:params:] + 1008
LARA5 __61-[B4IHttp URLSession:downloadTask:didFinishDownloadingToURL:]_block_invoke + 244
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 112004
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 71680
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 112004
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 230816
libdispatch.dylib 395DA84F-715D-334E-8D41-A16CD93FC83C + 68912
libdispatch.dylib _dispatch_main_queue_callback_4CF + 44
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 445840
CoreFoundation 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 66804
CoreFoundation CFRunLoopRunSpecific + 572
GraphicsServices GSEventRunModal + 168
UIKitCore 96636F64-106F-30C8-A780-82DCEBB0F443 + 1266292
UIKitCore UIApplicationMain + 336
LARA5 main + 96
dyld 86D5253D-4FD1-36F3-B4AB-25982C90CBF4 + 257800
)
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Error occurred on line: 15 (B4XPages)
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[3]

Maybe related to SQL query parameters.
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
The odd thing is in debug mode if I step through the code looking for the line that crashes it all works fine.

It is as if the app moves on before getting data or something but slowing it down and all is fine
 
Upvote 0

b4x-de

Active Member
Licensed User
Longtime User
Could you please post the relevant code snippet here to understand how you try to achieve what you have described above.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Without any code, we just only make guesses.
I think you are trying to read a result return from a http request or resumable sub but not handled properly with wait for.
 
Upvote 0
Top