B4J Question Application run in debug but crash in release and obfuscated

Firpas

Active Member
Licensed User
Longtime User
I've just finis an application and it run ok in debug mode but in release or release (obfuscated) cause this crash:
Program started.
java.lang.reflect.InvocationTargetException
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 anywheresoftware.b4a.DynamicBuilder.build(DynamicBuilder.java:16)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:116)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:166)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:166)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:166)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:78)
at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:81)
at ipcam.firpas.com.main._show(main.java:583)
at ipcam.firpas.com.main._appstart(main.java:79)
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 anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at ipcam.firpas.com.main.start(main.java:36)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(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$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Asset file not found: Cam500.png
at anywheresoftware.b4a.objects.streams.File.GetUri(File.java:158)
at anywheresoftware.b4j.objects.NodeWrapper.getImageUri(NodeWrapper.java:645)
at anywheresoftware.b4j.objects.NodeWrapper.buildDrawable(NodeWrapper.java:583)
at anywheresoftware.b4j.objects.NodeWrapper.build(NodeWrapper.java:415)
at anywheresoftware.b4j.objects.ImageViewWrapper.build(ImageViewWrapper.java:102)
... 29 more
main._show (java line: 583)
java.lang.RuntimeException: Object should first be initialized (ImageView).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:32)
at anywheresoftware.b4j.objects.NodeWrapper.innerInitialize(NodeWrapper.java:83)
at anywheresoftware.b4j.objects.ImageViewWrapper.innerInitialize(ImageViewWrapper.java:38)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:148)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:166)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:166)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayoutHeader(LayoutBuilder.java:166)
at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:78)
at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:81)
at ipcam.firpas.com.main._show(main.java:583)
at ipcam.firpas.com.main._appstart(main.java:79)
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 anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at ipcam.firpas.com.main.start(main.java:36)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(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$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)

I think the error is related to the main layout but I can not find it.

I made sure to include all the images of buttons and other files in the folder and include them in the project through the "Sync" button

Any idea ????

Thank in advance
 
Top