When I compile my project and then run it I fairly instantly get the following crash:
I bet I have some error, but that's not the reason for this thread. The thing is that between compilations the error "moves around", according to the crash log. Sometimes it's in one of my classes, sometimes it's in Main, and sometimes it's in B4XPagesManager (as seen above). I can manipulate this a bit by changing the timing. For instance by adding a breakpoint somewhere, or inserting a small Sleep(1000) somewhere in Main. The only thing that is static is that the error is in line 44 - every single time. And of course those lines look very innocent, with code such as "End Sub" and the like.
I've cleaned the project several times, I use latest version of B4i and I compile with the hosted builder.
So I'm thinking this might point to some sort of bug in the compiler/debugger/etc of B4i. I've compressed the full project directory (not exported the projected, because I imagine for this it's better to get the full thing), and have saved it for Erel if he wants to take a look at it.
B4X:
Application_Start
STARTING APP: startApp ================== 02/24/2022
Error occurred on line: 44 (B4XPagesManager)
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]
Stack Trace: (
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 597328
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 1616192
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 1606500
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 129420
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 298888
MyNiceAppVers10b -[ResumableSub_cl_net_status resume::] + 760
MyNiceAppVers10b -[b4i_cl_net _status:] + 336
MyNiceAppVers10b -[ResumableSub_cl_serverstate_timerState_Tick resume::] + 1040
MyNiceAppVers10b -[b4i_cl_serverstate _timerstate_tick:] + 336
MyNiceAppVers10b -[b4i_cl_serverstate _initialize::] + 800
MyNiceAppVers10b -[b4i_b4xmainpage _initialize::] + 1856
MyNiceAppVers10b -[b4i_b4xpagesmanager _initialize:::] + 1164
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 133488
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 247368
MyNiceAppVers10b +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1300
MyNiceAppVers10b -[B4IShell runMethod:] + 448
MyNiceAppVers10b -[B4IShell raiseEventImpl:method:args::] + 2172
MyNiceAppVers10b -[B4IShellBI raiseEvent:event:params:] + 1580
MyNiceAppVers10b __33-[B4I raiseUIEvent:event:params:]_block_invoke + 52
libdispatch.dylib 95D85335-DD46-355E-905C-3743A10000EC + 405924
libdispatch.dylib 95D85335-DD46-355E-905C-3743A10000EC + 410024
libdispatch.dylib 95D85335-DD46-355E-905C-3743A10000EC + 283832
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 317576
CoreFoundation 31E5CA68-6CA4-30D5-AD16-BB231341E9BD + 45448
CoreFoundation CFRunLoopRunSpecific + 572
GraphicsServices GSEventRunModal + 160
UIKitCore 263D772F-F5F7-3C3A-A622-9B78CC000F53 + 5159824
UIKitCore UIApplicationMain + 332
MyNiceAppVers10b main + 120
dyld start + 444
)
Application_Active
I bet I have some error, but that's not the reason for this thread. The thing is that between compilations the error "moves around", according to the crash log. Sometimes it's in one of my classes, sometimes it's in Main, and sometimes it's in B4XPagesManager (as seen above). I can manipulate this a bit by changing the timing. For instance by adding a breakpoint somewhere, or inserting a small Sleep(1000) somewhere in Main. The only thing that is static is that the error is in line 44 - every single time. And of course those lines look very innocent, with code such as "End Sub" and the like.
I've cleaned the project several times, I use latest version of B4i and I compile with the hosted builder.
So I'm thinking this might point to some sort of bug in the compiler/debugger/etc of B4i. I've compressed the full project directory (not exported the projected, because I imagine for this it's better to get the full thing), and have saved it for Erel if he wants to take a look at it.