Closed GoogleCodeExporter closed 9 years ago
There is also a problem with scaledHeight().
Example Code:
public void start()
{
if (current != null) {
current.show();
return;
}
Form hi = new Form("Hi World");
Image vImage = theme.getImage("icon.png");
vImage = vImage.scaledHeight(64);
hi.addComponent(new Label("Hi World"));
hi.addComponent(new Label(vImage));
hi.show();
}
The above code generated the following stack trace.
<Warning>: java.lang.NullPointerException
at java_util_Hashtable.get:471
at com_codename1_impl_ios_IOSImplementation.extractHardRef:2130
at com_codename1_ui_Display.extractHardRef:2852
at com_codename1_ui_Image.getCachedImage:94
at com_codename1_ui_Image.scaledImpl:916
at com_codename1_ui_Image.scaled:896
at com_codename1_ui_Image.scaledHeight:847
at com_codename1_ui_EncodedImage.scaledHeight:542
at org_tradeswitch_mobile_MyApplication.start:38
at org_tradeswitch_mobile_MyApplicationStub.run:27
at com_codename1_ui_Display.processSerialCalls:1116
at com_codename1_ui_Display.mainEDTLoop:938
at com_codename1_ui_RunnableWrapper.run:120
at com_codename1_impl_CodenameOneThread.run:176
at java_lang_Thread.runImpl:153
Original comment by eddie.ca...@gmail.com
on 17 Feb 2015 at 6:41
Thanks, turns out it wasn't the VM but rather an API bug due to a thread safety
change.
Original comment by shai.almog
on 17 Feb 2015 at 7:52
Original issue reported on code.google.com by
cverd...@gmail.com
on 17 Feb 2015 at 2:21