[WooreeINFO] Exception for 'Simple Background Application Code' with <NXP LPCXpresso54608/simulator>

Dear MicroEJ,

When i tried the example of ‘Simple Background Application Code’ in your document of <Application Developer’s Guide’ with the simulator of , i got an exception as:

=============== [ Initialization Stage ] ===============
=============== [ Converting fonts ] ===============
=============== [ Converting images ] ===============
=============== [ Launching on Simulator ] ===============
com.microej.wadapps.management.util.activitiesschedulerlowmemory SEVERE: Error showing activity.
Exception in thread “main” java.lang.OutOfMemoryError: MicroUI: Not enough room to allocate the Image’s native data.

  • at java.lang.Throwable.fillInStackTrace(Throwable.java:79)*
  • at java.lang.Throwable.(Throwable.java:30)*
  • at java.lang.Error.(Error.java:10)*
  • at java.lang.VirtualMachineError.(VirtualMachineError.java:10)*
  • at java.lang.OutOfMemoryError.(OutOfMemoryError.java:20)*
  • at ej.microui.display.ImageOutOfMemoryVisitor.callRun(ImageOutOfMemoryVisitor.java:35)*
  • at ej.microui.display.ImageOutOfMemoryVisitor.callRun(ImageOutOfMemoryVisitor.java:16)*
  • at ej.microui.display.ImageCreatorVisitor.callRun(ImageCreatorVisitor.java:51)*
  • at ej.microui.display.Image.loadImage(Image.java:655)*
  • at ej.microui.display.Image.createImage(Image.java:151)*
  • at ej.microui.display.Image.createImage(Image.java:89)*
  • at ej.style.image.DefaultImageLoader.getImage(DefaultImageLoader.java:25)*
  • at ej.style.util.StyleHelper.getImage(StyleHelper.java:117)*
  • at ej.widget.basic.Image.(Image.java:54)*
  • at com.microej.app.desktopweather.page.WeatherPage.(WeatherPage.java:78)*
  • at com.microej.app.desktopweather.page.WeatherPage.(WeatherPage.java:53)*
  • at com.microej.app.desktopweather.widget.WeatherNavigator.(WeatherNavigator.java:61)*
  • at com.microej.app.desktopweather.page.MainPage.createMainContent(MainPage.java:87)*
  • at com.microej.app.desktopweather.page.MainPage.(MainPage.java:61)*
  • at com.microej.app.desktopweather.Main.main(Main.java:72)*
  • at com.microej.app.desktopweather.DesktopWeatherActivity.onStart(DesktopWeatherActivity.java:46)*
  • at com.microej.wadapps.management.util.ActivitiesSchedulerLowMemory.show(ActivitiesSchedulerLowMemory.java:146)*
  • at com.microej.wadapps.management.util.ActivitiesSchedulerLowMemory.setLauncher(ActivitiesSchedulerLowMemory.java:71)*
  • at com.microej.wadapps.management.util.LaunchersManager.startCurrentLauncher(LaunchersManager.java:120)*
  • at com.microej.wadapps.management.util.LaunchersManager.startFirstLauncher(LaunchersManager.java:99)*
  • at com.microej.wadapps.management.util.LaunchersManager.internalStart(LaunchersManager.java:90)*
  • at com.microej.wadapps.management.util.LaunchersManager.start(LaunchersManager.java:70)*
  • at ej.wadapps.management.activators.DefaultManagementActivator.start(DefaultManagementActivator.java:83)*
  • at ej.components.registry.impl.AbstractRegistry.start(AbstractRegistry.java:83)*
  • at ej.components.registry.util.BundleRegistryHelper.startup(BundleRegistryHelper.java:52)*
  • at MySandboxedApp.generated.MySandboxedAppEntryPoint.start(MySandboxedAppEntryPoint.java:15)*
  • at MySandboxedApp.generated.BackgroundServicesStandalone.main(BackgroundServicesStandalone.java:13)*
  • at java.lang.MainThread.run(Thread.java:836)*
  • at java.lang.Thread.runWrapper(Thread.java:372)*
    MyBackgroundCode: Hello Yang-Hae!

However you know i don’t get this exception with the simulation of , the output of which was simply as:

=============== [ Initialization Stage ] ===============
=============== [ Converting fonts ] ===============
=============== [ Converting images ] ===============
=============== [ Launching on Simulator ] ===============
MyBackgroundCode: Hello Yang-Hae!

Could you please advise me what would have affected this difference with the same application?

Thanks & Regards
YH Kwon

Hi @kwonyh,

Could you provide what platform you are using? (type, version, …) and also which version of the studio you are using.

I do not understand the second part of your description:

However you know i don’t get this exception with the simulation of , the output of which was simply

Did you mean the simulation of your application?

Best Regards,
Gaëtan

Dear Gaetan Harel,

i’d like to appreciate for your feedback first of all, and please find my comments back below as:

>Could you provide what platform you are using? (type, version, …) and also which version of the studio you are using.
>

[YH@04/16/2019] The two platform files under my tests are,

a) VDE-BLUE-OM13092-PQ9Y4-1.6.1.jpf
b) VDE-YELLOW-STM32F746GDISCO-8SG7V-1.11.4.jpf

i see only an exception with a) when i tried to run an example application as in your user guide.

>I do not understand the second part of your description:
>
> However you know i don’t get this exception with the simulation of , the output of which was simply
>
>Did you mean the simulation of your application?
>

[YH@04/16/2019] Sorry for your confusion with the statement above, where the board name is missing unfortunately by my mistake. My intention was as:

However you know i don’t get this exception with the simulation of “STMicroelectronics STM32F746G-DISCO”, the output of which was simply as…

So the simulation, in my term, was the virtual platform file for developing/running the java applications without the target hardware.

Hopefully it should be clear now, otherwise please advise me further.

Thanks & Regards
YH Kwon

i forgot to mention the version of MicroEJ Studio, under my tests, is v4.1.5. - by YH Kwon

Ok let me try to reproduce this issue (at first I was not able to). I’ll look further into it.