monkeyswarm / MobMuPlat

MobMuPlat is an iOS & Android app to host PureData patches with custom visual interfaces and hardware access.
www.mobmuplat.com
Other
185 stars 25 forks source link

MobMuPlat crashing on android with space in iemgui text label #64

Closed farvardin closed 4 years ago

farvardin commented 4 years ago

On Android I have a puredata code which is working fine in Pd-vanilla and Purr-Data, but was crashing MobMuPlat. I get in the logs: java.lang.NumberFormatException: For input string: "Synth" at sun.mist.FloatingDecimal.readJavaFormatString(floatingDecimal.java) and it goes into mobmuplat.nativepdgui.CanvasRect

It's because I've put a space in a iemgui text label. So instead of "#X obj 620 -1 cnv 15 197 36 empty empty Blabla\ Synth 24 15 0 18"

I've now changed my code to "#X obj 620 -1 cnv 15 197 36 empty empty BlablaSynth 24 15 0 18" to avoid the crash. Maybe it's possible to handle this case?

monkeyswarm commented 4 years ago

I believe you are doing something unsupported by the Canvas object.

In Pd-vanilla, when I create a canvas and open its properties, the "Label" text field does not support spaces. Attempting to type a space (or a backslash with a space) will be replaced by an underscore. When I instead open a file with your canvas (with the backslash-space), the canvas does indeed display with a space, but attempting to open the properties panel for the canvas fails with a big red error in the pd window (UNHANDLED ERROR: wrong # args:...). MobMuPlat should not support or work around this parse error.

Please reopen if you have other information.