jahswant Well-Known Member Licensed User Longtime User Jan 4, 2025 #1 I'm trying to notarize my first app. After linking when tring to run to test the app I get this. Have someone come across it ? B4X: Copy (RuntimeException) java.lang.RuntimeException: Non-Java exception raised, not handled! (Original problem: Invalid parameter not satisfying: index < [_itemArray count]) java.lang.ClassCastException: class java.lang.Object cannot be cast to class ca.chicpos.admin.b4xpagesmanager (java.lang.Object is in module java.base of loader 'bootstrap'; ca.chicpos.admin.b4xpagesmanager is in module b4j of loader 'app') at b4j/ca.chicpos.admin.b4xpages._getmanager(Unknown Source) at b4j/ca.chicpos.admin.b4xpagesdelegator._mainform_resize(Unknown Source) at b4j/ca.chicpos.admin.main._mainform_resize(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source) at b4j/anywheresoftware.b4a.BA.raiseEvent(Unknown Source) at b4j/anywheresoftware.b4j.objects.PaneWrapper$1.run(Unknown Source) at b4j/anywheresoftware.b4j.objects.PaneWrapper$ResizeEventManager$1.run(Unknown Source) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) The App runs perfectly with bridge.
I'm trying to notarize my first app. After linking when tring to run to test the app I get this. Have someone come across it ? B4X: Copy (RuntimeException) java.lang.RuntimeException: Non-Java exception raised, not handled! (Original problem: Invalid parameter not satisfying: index < [_itemArray count]) java.lang.ClassCastException: class java.lang.Object cannot be cast to class ca.chicpos.admin.b4xpagesmanager (java.lang.Object is in module java.base of loader 'bootstrap'; ca.chicpos.admin.b4xpagesmanager is in module b4j of loader 'app') at b4j/ca.chicpos.admin.b4xpages._getmanager(Unknown Source) at b4j/ca.chicpos.admin.b4xpagesdelegator._mainform_resize(Unknown Source) at b4j/ca.chicpos.admin.main._mainform_resize(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source) at b4j/anywheresoftware.b4a.BA.raiseEvent(Unknown Source) at b4j/anywheresoftware.b4j.objects.PaneWrapper$1.run(Unknown Source) at b4j/anywheresoftware.b4j.objects.PaneWrapper$ResizeEventManager$1.run(Unknown Source) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) The App runs perfectly with bridge.
Erel B4X founder Staff member Licensed User Longtime User Jan 5, 2025 #2 Strange error. Are you able to build a standalone package on Windows? Create a new empty project and make this process. Do you get the same error? Upvote 0
Strange error. Are you able to build a standalone package on Windows? Create a new empty project and make this process. Do you get the same error?
jahswant Well-Known Member Licensed User Longtime User Jan 5, 2025 #3 Yes it works corr correctly on Windows. Upvote 0
jahswant Well-Known Member Licensed User Longtime User Jan 5, 2025 #4 Erel said: Create a new empty project and make this process. Do you get the same error? Click to expand... Let me try this. Upvote 0
Erel said: Create a new empty project and make this process. Do you get the same error? Click to expand... Let me try this.
jahswant Well-Known Member Licensed User Longtime User Jan 5, 2025 #5 Erel said: Create a new empty project and make this process. Do you get the same error? Click to expand... Empty project works correctly. Upvote 0
Erel said: Create a new empty project and make this process. Do you get the same error? Click to expand... Empty project works correctly.
Erel B4X founder Staff member Licensed User Longtime User Jan 6, 2025 #6 Does it work with a new B4XPages project? Try to make some tests until you hit this error. If the project isn't too large then you can send it to me ([email protected]) and I'll test it. But only after you try to reproduce it with a new project and the libraries. Upvote 0
Does it work with a new B4XPages project? Try to make some tests until you hit this error. If the project isn't too large then you can send it to me ([email protected]) and I'll test it. But only after you try to reproduce it with a new project and the libraries.
jahswant Well-Known Member Licensed User Longtime User Jan 6, 2025 #7 Ok I will try reproducing this error. Will let you know asap. Upvote 0
jahswant Well-Known Member Licensed User Longtime User Jan 8, 2025 #8 Erel said: But only after you try to reproduce it with a new project and the libraries. Click to expand... I found out that these lines are the issue. B4X: Copy tray.Initialize tc.Initialize("tc", xui.LoadBitmap(File.DirAssets, "appstore.png"), Array("QUITTER","RELANCER")) tray.AddTrayIcon(tc) Upvote 0
Erel said: But only after you try to reproduce it with a new project and the libraries. Click to expand... I found out that these lines are the issue. B4X: Copy tray.Initialize tc.Initialize("tc", xui.LoadBitmap(File.DirAssets, "appstore.png"), Array("QUITTER","RELANCER")) tray.AddTrayIcon(tc)
jahswant Well-Known Member Licensed User Longtime User Jan 8, 2025 #9 The Icon appears well in debug mode via bridge. It crashes when packaged. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 8, 2025 #10 Try to copy the file to XUI.DirDefault (don't forget to set XUI.SetDirData first) and then load it from there. Upvote 0
Try to copy the file to XUI.DirDefault (don't forget to set XUI.SetDirData first) and then load it from there.
jahswant Well-Known Member Licensed User Longtime User Jan 20, 2025 #11 Erel said: Try to copy the file to XUI.DirDefault (don't forget to set XUI.SetDirData first) and then load it from there. Click to expand... Just to say this doesn't resolve the issue. Upvote 0
Erel said: Try to copy the file to XUI.DirDefault (don't forget to set XUI.SetDirData first) and then load it from there. Click to expand... Just to say this doesn't resolve the issue.
Erel B4X founder Staff member Licensed User Longtime User Jan 21, 2025 #12 If you are able to reproduce it with a small project then I will test it. Upvote 0
jahswant Well-Known Member Licensed User Longtime User Jan 21, 2025 #13 Erel said: If you are able to reproduce it with a small project then I will test it. Click to expand... B4X: Copy tray.Initialize tc.Initialize("tc", xui.LoadBitmap(File.DirAssets, "appstore.png"), Array("QUITTER","RELANCER")) tray.AddTrayIcon(tc) I move the above line after B4X: Copy MainForm.Show and it seeems to work. I will test more. Upvote 0
Erel said: If you are able to reproduce it with a small project then I will test it. Click to expand... B4X: Copy tray.Initialize tc.Initialize("tc", xui.LoadBitmap(File.DirAssets, "appstore.png"), Array("QUITTER","RELANCER")) tray.AddTrayIcon(tc) I move the above line after B4X: Copy MainForm.Show and it seeems to work. I will test more.