internetce icon indicating copy to clipboard operation
internetce copied to clipboard

Pulling the USB cable makes InternetCE crash

Open MathisLav opened this issue 1 year ago • 5 comments

The program crashes when the USB connection is closed unexpectedly (cable pulled...).

It only happens after the calculator called usb_SetConfiguration(). From that moment, pulling the cable causes the stack to be corrupted.

It seems that it's more of an USBDRVCE issue but still, it would be nice to find a workaround for this.

MathisLav avatar Jan 17 '24 15:01 MathisLav

Also experiencing the same issue under the same circumstances with ECM device connection.

acagliano avatar Jan 23 '24 15:01 acagliano

Make sure you guys are using usb_RefDevice otherwise freed structures are passed to usbdrvce which will cause it to crash.

mateoconlechuga avatar Jan 26 '24 18:01 mateoconlechuga

I tried to use it but it didn't fix the issue unfortunately. Actually, I'm not even receiving a disconnected event as for me. The calculator crashes just after the cable is pulled, in the next execution of usb_handleEvents() I would say.

MathisLav avatar Jan 26 '24 20:01 MathisLav

Hi, Did you find a solution now?

Tom-GARNIER avatar May 29 '24 10:05 Tom-GARNIER

As I said on Ti-Planet, it seems to be more of an usbdrvce issue. See https://github.com/CE-Programming/toolchain/issues/484

MathisLav avatar May 29 '24 11:05 MathisLav