orsjb / HappyBrackets

HappyBrackets is an audio-focused library and toolkit for creative coding for the internet of things.
Apache License 2.0
36 stars 3 forks source link

Invalid Classes Cause HB to crash and not recover #44

Closed angelofraietta closed 6 years ago

angelofraietta commented 6 years ago

When downloading an invalid class or class is not found, HB crashes and cannot recover, requiring a reboot

angelofraietta commented 6 years ago

You can recreate error by disabling encryption on device side while encrypting in plugin (this can only be done while debugging). This will allow the exception to be thrown - we need to make a handler for it

Exception in thread "Thread-4" java.lang.ClassFormatError: Incompatible magic value 3300556053 in class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at net.happybrackets.device.dynamic.DynamicClassLoader.createNewClass(DynamicClassLoader.java:31) at net.happybrackets.device.HB$2.run(HB.java:460)

angelofraietta commented 6 years ago

This has been repaired now in 1.13.5