I'm creating a Xamarin.iOS binding and I can use cmd_ln_init(), but a second call to cmd_lnit() with same value crashes (even when using cmd_ln_free() ).
I have been playing arround with the method and I noticed something
- When deliberately using 3 additional arguments (like “-mmap”, “no”, “lw”, null) it gives an expected error about not valid number of parameters, but cmd_ln_init() can be used unlimited times
- When deliberately using an unknown argument (like “-mmappppppp”, “no”, “lw”, "1.0”) it gives an expected error, and cmd_ln_init() can be used only time, the call after this will crash as well
Because I'm using Xamarin.iOS that is binding a iOS fat library I'm not getting very much error messages.
I do get some error data in my normal output window:
Hello,
I'm creating a Xamarin.iOS binding and I can use cmd_ln_init(), but a second call to cmd_lnit() with same value crashes (even when using cmd_ln_free() ).
I have been playing arround with the method and I noticed something
- When deliberately using 3 additional arguments (like “-mmap”, “no”, “lw”, null) it gives an expected error about not valid number of parameters, but cmd_ln_init() can be used unlimited times
- When deliberately using an unknown argument (like “-mmappppppp”, “no”, “lw”, "1.0”) it gives an expected error, and cmd_ln_init() can be used only time, the call after this will crash as well
Because I'm using Xamarin.iOS that is binding a iOS fat library I'm not getting very much error messages.
I do get some error data in my normal output window:
2019 - 07 - 26 16:32:27.874280 + 0200 pocketsphinxios[8728:219173] critical: Stacktrace:
019 - 07 - 26 16:32:27.874582 + 0200 pocketsphinxios[8728:219173] critical: at<unknown> < 0xffffffff >
2019 - 07 - 26 16:32:27.874864 + 0200 pocketsphinxios[8728:219173] critical: at(wrapper managed - to - native) pocketsphinxiosbinding.CFunctions.cmd_ln_init(pocketsphinxiosbinding.cmd_ln_t , pocketsphinxiosbinding.arg_t , int, string, string, string, string)[0x0003a] in < 3e869000295f4225ac0b3cb7dca47b38 >:0
2019 - 07 - 26 16:32:27.875044 + 0200 pocketsphinxios[8728:219173] critical: at pocketsphinxios.ViewController.Test1(object, System.EventArgs)[0x00020] in / Users / xamarindeveloper / gitrep / pocketsphinx - xamarin - ios - demo / src / pocketsphinxios / ViewController.cs:69
2019 - 07 - 26 16:32:27.875223 + 0200 pocketsphinxios[8728:219173] critical: at UIKit.UIControlEventProxy.Activated()[0x00004] in / Library / Frameworks / Xamarin.iOS.framework / Versions / 12.4.0.64 / src / Xamarin.iOS / UIKit / UIControl.cs:38
2019 - 07 - 26 16:32:27.875415 + 0200 pocketsphinxios[8728:219173] critical: at(wrapper runtime - invoke) object.runtime_invoke_voidthis(object, intptr, intptr, intptr)[0x00020] in < debab4bc68ca4ca1b79d0ded11987ada >:0
2019 - 07 - 26 16:32:27.875561 + 0200 pocketsphinxios[8728:219173] critical: at<unknown> < 0xffffffff >
2019 - 07 - 26 16:32:27.875754 + 0200 pocketsphinxios[8728:219173] critical: at(wrapper managed - to - native) UIKit.UIApplication.UIApplicationMain(int, string[], intptr, intptr)[0x0005c] in < c8f9325d28584ab585f0d14d74730363 >:0
2019 - 07 - 26 16:32:27.875915 + 0200 pocketsphinxios[8728:219173] critical: at UIKit.UIApplication.Main(string[], intptr, intptr)[0x00005] in / Library / Frameworks / Xamarin.iOS.framework / Versions / 12.4.0.64 / src / Xamarin.iOS / UIKit / UIApplication.cs:79
2019 - 07 - 26 16:32:27.876153 + 0200 pocketsphinxios[8728:219173] critical: at UIKit.UIApplication.Main(string[], string, string)[0x0002c] in / Library / Frameworks / Xamarin.iOS.framework / Versions / 12.4.0.64 / src / Xamarin.iOS / UIKit / UIApplication.cs:63
2019 - 07 - 26 16:32:27.876340 + 0200 pocketsphinxios[8728:219173] critical: at pocketsphinxios.Application.Main(string[])[0x00001] in / Users / xamarindeveloper / gitrep / pocketsphinx - xamarin - ios - demo / src / pocketsphinxios / Main.cs:12
2019 - 07 - 26 16:32:27.876588 + 0200 pocketsphinxios[8728:219173] critical: at(wrapper runtime - invoke) < Module >.runtime_invoke_void_object(object, intptr, intptr, intptr)[0x00051] in < 4b8abbca1c744669babf00138aea9f7c >:0
2019 - 07 - 26 16:32:27.876770 + 0200 pocketsphinxios[8728:219173] critical:
Native stacktrace:
2019 - 07 - 26 16:32:27.893232 + 0200 pocketsphinxios[8728:219173] critical: 0 pocketsphinxios 0x0000000106e8bff4 mono_handle_native_crash + 244
2019 - 07 - 26 16:32:27.893484 + 0200 pocketsphinxios[8728:219173] critical: 1 pocketsphinxios 0x0000000106e9c920 mono_sigsegv_signal_handler + 288
2019 - 07 - 26 16:32:27.893643 + 0200 pocketsphinxios[8728:219173] critical: 2 libsystem_platform.dylib 0x000000011685bb5d _sigtramp + 29
2019 - 07 - 26 16:32:27.893764 + 0200 pocketsphinxios[8728:219173] critical: 3 libobjc.A.dylib 0x0000000114f1a346 lookUpImpOrForward + 49
2019 - 07 - 26 16:32:27.893898 + 0200 pocketsphinxios[8728:219173] critical: 4 pocketsphinxios 0x0000000106cc3694 ckd_salloc + 36
2019 - 07 - 26 16:32:27.894045 + 0200 pocketsphinxios[8728:219173] critical: 5 pocketsphinxios 0x0000000106cc5921 cmd_ln_init + 465
2019 - 07 - 26 16:32:27.894165 + 0200 pocketsphinxios[8728:219173] critical: 6 ??? 0x00000001396fd3fa 0x0 + 5258597370
2019 - 07 - 26 16:32:27.894286 + 0200 pocketsphinxios[8728:219173] critical: 7 ??? 0x00000001396fc373 0x0 + 5258593139
2019 - 07 - 26 16:32:27.894400 + 0200 pocketsphinxios[8728:219173] critical: 8 ??? 0x00000001396fc0f2 0x0 + 5258592498
2019 - 07 - 26 16:32:27.894527 + 0200 pocketsphinxios[8728:219173] critical: 9 pocketsphinxios 0x0000000106e9fa99 mono_jit_runtime_invoke + 1433
2019 - 07 - 26 16:32:27.894654 + 0200 pocketsphinxios[8728:219173] critical: 10 pocketsphinxios 0x0000000106f92004 mono_runtime_try_invoke + 148
2019 - 07 - 26 16:32:27.894764 + 0200 pocketsphinxios[8728:219173] critical: 11 pocketsphinxios 0x0000000106f93f03 mono_runtime_invoke + 35
2019 - 07 - 26 16:32:27.894874 + 0200 pocketsphinxios[8728:219173] critical: 12 pocketsphinxios 0x0000000106d41ba8 _ZL31native_to_managed_trampoline_20P11objc_objectP13objc_selectorPP11_MonoMethodj + 248
2019 - 07 - 26 16:32:27.895028 + 0200 pocketsphinxios[8728:219173] critical: 13 pocketsphinxios 0x0000000106d41aa4 -[UIKit_UIControlEventProxy BridgeSelector] + 52
2019 - 07 - 26 16:32:27.895257 + 0200 pocketsphinxios[8728:219173] critical: 14 UIKitCore 0x000000011b4d0204 -[UIApplication sendAction: to:from: forEvent:] + 83
2019 - 07 - 26 16:32:27.895470 + 0200 pocketsphinxios[8728:219173] critical: 15 UIKitCore 0x000000011af25c19 -[UIControl sendAction: to:forEvent:] + 67
2019 - 07 - 26 16:32:27.895726 + 0200 pocketsphinxios[8728:219173] critical: 16 UIKitCore 0x000000011af25f36 -[UIControl _sendActionsForEvents: withEvent:] + 450
2019 - 07 - 26 16:32:27.895955 + 0200 pocketsphinxios[8728:219173] critical: 17 UIKitCore 0x000000011af24a13 -[UIControl touchesBegan: withEvent:] + 282
2019 - 07 - 26 16:32:27.896160 + 0200 pocketsphinxios[8728:219173] critical: 18 UIKitCore 0x000000011b508c48 -[UIWindow _sendTouchesForEvent:] + 1869
2019 - 07 - 26 16:32:27.896361 + 0200 pocketsphinxios[8728:219173] critical: 19 UIKitCore 0x000000011b50a5d2 -[UIWindow sendEvent:] + 4079
2019 - 07 - 26 16:32:27.896573 + 0200 pocketsphinxios[8728:219173] critical: 20 UIKitCore 0x000000011b4e8d16 -[UIApplication sendEvent:] + 356
2019 - 07 - 26 16:32:27.896772 + 0200 pocketsphinxios[8728:219173] critical: 21 UIKitCore 0x000000011b5b9293 dispatchPreprocessedEventFromEventQueue + 3232
2019 - 07 - 26 16:32:27.896962 + 0200 pocketsphinxios[8728:219173] critical: 22 UIKitCore 0x000000011b5bbbb9 handleEventQueueInternal + 5911
2019 - 07 - 26 16:32:27.897164 + 0200 pocketsphinxios[8728:219173] critical: 23 CoreFoundation 0x00000001141b4be1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
2019 - 07 - 26 16:32:27.897376 + 0200 pocketsphinxios[8728:219173] critical: 24 CoreFoundation 0x00000001141b4463 CFRunLoopDoSources0 + 243
2019 - 07 - 26 16:32:27.897585 + 0200 pocketsphinxios[8728:219173] critical: 25 CoreFoundation 0x00000001141aeb1f CFRunLoopRun + 1231
2019 - 07 - 26 16:32:27.897792 + 0200 pocketsphinxios[8728:219173] critical: 26 CoreFoundation 0x00000001141ae302 CFRunLoopRunSpecific + 626
2019 - 07 - 26 16:32:27.897994 + 0200 pocketsphinxios[8728:219173] critical: 27 GraphicsServices 0x00000001182fb2fe GSEventRunModal + 65
2019 - 07 - 26 16:32:27.898194 + 0200 pocketsphinxios[8728:219173] critical: 28 UIKitCore 0x000000011b4ceba2 UIApplicationMain + 140
2019 - 07 - 26 16:32:27.898401 + 0200 pocketsphinxios[8728:219173] critical: 29 ??? 0x00000001381b684e 0x0 + 5236287566
2019 - 07 - 26 16:32:27.898643 + 0200 pocketsphinxios[8728:219173] critical: 30 ??? 0x00000001381b65e3 0x0 + 5236286947
2019 - 07 - 26 16:32:27.898854 + 0200 pocketsphinxios[8728:219173] critical:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
2019-07-26 16:32:33.372425+0200 pocketsphinxios[8728:219184] XPC connection interrupted</unknown></unknown>
Anyone any clue?
source code: https://github.com/Toine-db/pocketsphinx-xamarin-ios-demo/tree/sharpie-tryout
Kind Regards,
Toine