Emulator crashing constantly when using Location manager

16 views
Skip to first unread message

Nikola Balašev

unread,
Jul 24, 2019, 4:35:48 AM7/24/19
to CodenameOne Discussions
Hello,

Yesterday, my coworker and I refreshed libraries in our project, and after that whenever we try to run our application in CN1 emulator, it crashes, and every time its the same exception.

Line of code that throws this exception:
LocationManager.getLocationManager().setLocationListener(locationListener, new LocationRequest(LocationRequest.PRIORITY_HIGH_ACCUARCY, 5000));

Stacktrace:
java.lang.ExceptionInInitializerError
at com.codename1.impl.javase.JavaSEPort.getLocationManager(JavaSEPort.java:8945)
at com.codename1.ui.Display.getLocationManager(Display.java:3573)
at com.codename1.location.LocationManager.getLocationManager(LocationManager.java:70)
at com.nis.cms.MyApplication.init(MyApplication.java:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.codename1.impl.javase.Executor$3$1.run(Executor.java:250)
at com.codename1.ui.Display.processSerialCalls(Display.java:1298)
at com.codename1.ui.Display.mainEDTLoop(Display.java:1093)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.IllegalStateException: Toolkit not initialized
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:273)
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:268)
at javafx.application.Platform.runLater(Platform.java:83)
at com.codename1.impl.javase.LocationSimulation.unitActionPerformed(LocationSimulation.java:609)
at com.codename1.impl.javase.LocationSimulation.access$1900(LocationSimulation.java:40)
at com.codename1.impl.javase.LocationSimulation$20.actionPerformed(LocationSimulation.java:446)
at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1258)
at javax.swing.JComboBox.setSelectedItem(JComboBox.java:586)
at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:622)
at com.codename1.impl.javase.LocationSimulation.setMeasUnit(LocationSimulation.java:729)
at com.codename1.impl.javase.StubLocationManager.<init>(StubLocationManager.java:78)
at com.codename1.impl.javase.StubLocationManager.<clinit>(StubLocationManager.java:58)
... 13 more

We didn't change anything in our code, just refreshed libraries. Before that refresh, everything was working great. We tried restarting Idea, updating libraries, cleaning the project, refreshing libraries again, but nothing helps.
We're using Ubuntu 16.04, if it means something.

Thank you

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device

Shai Almog

unread,
Jul 24, 2019, 10:32:57 PM7/24/19
to CodenameOne Discussions
Hi,
there's a regression there due to the removal of the maps feature. We'll try to push out a fix later today instead of the typical Friday update.
Reply all
Reply to author
Forward
0 new messages