iOS Question B4XDialog - B4XInputTemplate crashes after pressing ok

Alexander Stolte

Expert
Licensed User
Longtime User
I wanted to quickly write an example application and encountered the following error when I tried to use the input dialog:
B4X:
Application_Start
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Application_Active
Unexpected event (missing RaisesSynchronousEvents): b4ipage_keyboardstatechanged:
Error occurred on line: 269 (B4XPagesManager)
Method not found: resumeAsUserSub, target: [_xui=<B4IXUI: 0x600003598340>, _buttonsheight=40, _titlebarheight=30
, _buttonwidth=80, _base=<B4XViewWrapper: <B4IPanelView: 0x7f96c18149b0; frame = (63 20; 304 126); clipsToBounds = YES; alpha = 0; hidden = YES; animations = { opacity=<CABasicAnimation: 0x600003754960>; }; backgroundColor = UIExtendedSRGBColorSpace 0.333333 0.333333 0.333333 1; layer = <CALayer: 0x60000371c1a0>>>, _backgroundcolor=-11184811
, _overlaycolor=-1442840576, _bordercolor=-16777216, _bordercornersradius=2
, _borderwidth=2, _buttonscolor=-11184811, _buttonstextcolor=-7744001
, _background=<B4XViewWrapper: <B4IPanelView: 0x7f96c1e11780; frame = (0 0; 430 834.333); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x60000399a220>; backgroundColor = UIExtendedSRGBColorSpace 0 0 0 0.666667; layer = <CALayer: 0x600003793de0>>>, _blurimageview=<B4XViewWrapper: (null)>, _blurbackground=0
, _blurreducescale=3, _mparent=<B4XViewWrapper: <B4IPanelView: 0x7f96c1827390; frame = (0 0; 430 834.333); backgroundColor = UIExtendedSRGBColorSpace 0.12549 0.129412 0.145098 1; layer = <CALayer: 0x6000037d5d20>>>, _title=
, _titlebarcolor=-16743496, _titlebartextcolor=-1, _bodytextcolor=-1
, _titlebar=<B4XViewWrapper: (null)>, _putattop=1, _titlebarfont=<B4XFont: <UICTFont: 0x7f96e1771ac0> font-family: ".SFUI-Semibold"; font-weight: bold; font-style: normal; font-size: 16.00pt>
, _buttonsfont=<B4XFont: <UICTFont: 0x7f96e1778460> font-family: ".SFUI-Semibold"; font-weight: bold; font-style: normal; font-size: 15.00pt>, _buttonstextcolordisabled=-8355712, _visibleanimationduration=100
, _buttonsorder=<B4IArray: 0x6000039e98f0>, _buttonsstate=NSMapTable {
[12] -1 -> 1
}
, _dateutils=<b4i_dateutils: (null)>
, _main=<b4i_main: (null)>, _b4xpages=<b4i_b4xpages: (null)>, _b4xcollections=<b4i_b4xcollections: (null)>
, _xuiviewsutils=<b4i_xuiviewsutils: (null)>]
Stack Trace: (
  CoreFoundation       __exceptionPreprocess + 242
  libobjc.A.dylib      objc_exception_throw + 48
  CoreFoundation       -[NSException initWithCoder:] + 0
  B4i Example          +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 342
  B4i Example          -[B4IShell runGoodChain::] + 337
  B4i Example          -[B4IShell raiseEventImpl:method:args::] + 2536
  B4i Example          -[B4IShellBI raiseEvent:event:params:] + 1354
  B4i Example          -[B4IDelegatableResumableSub resume::] + 366
  B4i Example          __21-[B4ICommon Sleep:::]_block_invoke + 47
  libdispatch.dylib    _dispatch_client_callout + 8
 libdispatch.dylib    _dispatch_continuation_pop + 874
 libdispatch.dylib    _dispatch_source_invoke + 2077
 libdispatch.dylib    _dispatch_main_queue_drain + 932
 libdispatch.dylib    _dispatch_main_queue_callback_4CF + 31
 CoreFoundation       __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
 CoreFoundation       __CFRunLoopRun + 2463
 CoreFoundation       CFRunLoopRunSpecific + 557
 GraphicsServices     GSEventRunModal + 137
 UIKitCore            -[UIApplication _run] + 972
 UIKitCore            UIApplicationMain + 123
 B4i Example          main + 104
 dyld                 start_sim + 10
 ???                  0x0 + 8641409958
)
I have reproduced it in an example project. Open the dialog with the button, write something in the box and click ok.

Thanks
 

Attachments

  • B4XDialog Bug.zip
    170.6 KB · Views: 51

Alexander Stolte

Expert
Licensed User
Longtime User
It is probably related to this: Unexpected event (missing RaisesSynchronousEvents): b4ipage_keyboardstatechanged:
so the keyboardstatechanged in the main module should fix it?
Are you testing it on real device?
Simulator, is more convenient than connecting the iphone to the macbook every time.
 
Upvote 0
Top