B4J Question help debug my program, deadline 13 feb 2019

Olivier Zeegers

Active Member
Licensed User
Hello all,

I am just an amateur programming who is trying his best to write a little program for a charity running contest.....
I would really appreciate any help to get the bugs out of my simple program for our running contest that takes place the 15th feb...

Overall it works well but:

- I get a media exception error now and then and I don't know why...

also see my question here: https://www.b4x.com/android/forum/threads/media-exception-error.102468/

- the program gets slower while using longer ? Do I have to release Mediaplayer objects to free memory ?

- the UI does not adapt to other screen resolutions.. Now I am running the program at home on my 1920/1080 resolution, but when ran on a laptop the items get displaced..

Thank you very much for your help because I am stuck !!

here are the source files and media files:

http://www.zeegers.be/export.zip
http://www.zeegers.be/Donkerrun.zip

have a nice sunday !

Olivier
 

Olivier Zeegers

Active Member
Licensed User
also get this error when the fire video is playing for a long time and the app freezes completely ?


java.lang.NullPointerException
at anywheresoftware.b4j.objects.MediaPlayerWrapper$2.run(MediaPlayerWrapper.java:45)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
 
Upvote 0

Olivier Zeegers

Active Member
Licensed User
I put this code when removing the previous mediaplayer from the form by removeNodeFromParent

Dim MediaViewNode As Node = mv

MediaViewNode.RemoveNodeFromParent
MediaViewNode = Null
mv = Null

Hope that this clears memory and resolves the sluggish performance after a while...
 
Upvote 0
Top