Blueforcer Well-Known Member Licensed User Longtime User Dec 5, 2019 #1 My programm sends data from a raspberry via USB (jSerial) to an ESP8266 pretty fast. But as soon as i unplug the cable my programm crash with. B4X: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc This also happen sometimes on the frist connect Try catch doesnt work to catch this error. Is there another way? Last edited: Dec 5, 2019
My programm sends data from a raspberry via USB (jSerial) to an ESP8266 pretty fast. But as soon as i unplug the cable my programm crash with. B4X: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc This also happen sometimes on the frist connect Try catch doesnt work to catch this error. Is there another way?
Erel B4X founder Staff member Licensed User Longtime User Dec 5, 2019 #2 You cannot catch this error because it happens in the native binary and crashes the JVM. You can create another program that monitors the first one and starts it when needed. Upvote 0
You cannot catch this error because it happens in the native binary and crashes the JVM. You can create another program that monitors the first one and starts it when needed.