Hello folks,
I have an issue with B4J running on a Raspberry Pi.
I use jSerial und jRandomFileAccess to open serial connections to devices plugged intom the Raspberry via USB. The devices are basically USB-Serial converters.
When I remove a device without properly closing the connection first I get this error and the program completely crashes:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Its different I guess when you remove the whole system device instead of just removing a serial cable in the classic way.
So, how can I catch the error and "calmly" unregister that port without the whole thing crashing?
I tried a couple of things like using
Sub Application_Error
but it doesnt really catch the error or let me return to a working state.
Thanks for your help,
Christian
I have an issue with B4J running on a Raspberry Pi.
I use jSerial und jRandomFileAccess to open serial connections to devices plugged intom the Raspberry via USB. The devices are basically USB-Serial converters.
When I remove a device without properly closing the connection first I get this error and the program completely crashes:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Its different I guess when you remove the whole system device instead of just removing a serial cable in the classic way.
So, how can I catch the error and "calmly" unregister that port without the whole thing crashing?
I tried a couple of things like using
Sub Application_Error
but it doesnt really catch the error or let me return to a working state.
Thanks for your help,
Christian