Application crash without exception - style missing in text #887
Labels
confirmed
issue reported has been reproduced
fixed - please verify
Issue has been fixed. Please verify and close.
Build environment: macOS
Target device: Moddable Two, desktop simulator
Description
For a
Text
PIU object without astyle
assigned, if an attempt is made to set thewidth
, the application crashes without throwing any exceptions.Mcsim crashes with the message "mcsim quit unexpectedly" (screenshot attached); Moddable Two attempts to reboot the application continuously.
It is understood that
Text
object needs astyle
if awidth
has to be set; but shouldn't an exception be thrown before the application crashes in case of a missing style?Steps to Reproduce
Reproduced the issue on the following sample code using
mcconfig -d -m
Expected behavior
It is understood that the
Text
object needs astyle
if width / string is to be set.But, in case of an unforeseen error in an application logic which causes the style not to be set correctly, an attempt to set the width should throw an exception like "style missing in text" .
Images
Other information
Text
Object - Attempting to set aheight
without setting astyle
- does not cause a crash.Label
Object - Attempting to set awidth
orheight
without setting astyle
- does not cause a crashThe text was updated successfully, but these errors were encountered: