Android Question BAL file not found in widget

Rusty

Well-Known Member
Licensed User
Longtime User
I'm creating a widget.
I have an existing widget from which I copied the code; made modifications and tried to run.
When i try to run the new code

B4X:
Sub Service_Create
    'Set the widget to update every x minutes.
    rv = ConfigureHomeWidget("pnlservice", "rv", 1, "commwidget")
End Sub
When this line runs, i keep getting
java.io.FileNotFoundException: pnlservice.bal
However, pnlservice.bal DOES exist in the FILES:
upload_2016-5-5_7-29-47.png

I've tried creating a new BAL file from scratch in the designer and it too can't be found.
What am I doing wrong here?
Thanks
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
The below is the error log (unfiltered) for an widget I've had running on hundreds of tablets from Ice Cream Sandwich to Marshmallow.
The code has worked well for years and now when I recompile it it get this...

Thanks for your help.
Rusty
* Activity (main) Resume **
** Service (widgetservice) Create **
attachRouteL output stream
configure: no convertion required
executeUnmuteStage: --------------- Routing Stage = Unmute ---------------
parameter-framework: Selection criterion changed event: Criterion name: RoutageState, current state: Flow|Path|Configure
parameter-framework: Configuration application request {
parameter-framework: Applying configurations {
parameter-framework: } Applying configurations
parameter-framework: } Configuration application request
void CEventThread::run() Do poll with timeout: -1
reconsiderRouting: DONE
Error occurred on line: 31 (WidgetService)
java.io.FileNotFoundException: l1.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)
at anywheresoftware.b4a.objects.RemoteViewsWrapper.createRemoteViews(RemoteViewsWrapper.java:39)
at talkingsurvey.b4a.tsstart.widgetservice._service_create(widgetservice.java:354)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:702)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:336)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at talkingsurvey.b4a.tsstart.widgetservice.onCreate(widgetservice.java:53)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2739)
at android.app.ActivityThread.access$1800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1375)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)
null: 20
** Service (widgetservice) Start **
java.net.SocketException: Socket closed
at libcore.io.Posix.recvfromBytes(Native Method)
at libcore.io.Posix.recvfrom(Posix.java:141)
at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
at libcore.io.IoBridge.recvfrom(IoBridge.java:506)
at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
Duplicate finish request for ActivityRecord{222339b8 u0 talkingsurvey.b4a.tsstart/.main id=0 t7 f}
at java.io.InputStream.read(InputStream.java:162)
at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)
at java.io.BufferedInputStream.read(BufferedInputStream.java:227)
at anywheresoftware.b4a.shell.ShellConnector.readControlData(ShellConnector.java:190)
at anywheresoftware.b4a.shell.ShellConnector.connect(ShellConnector.java:185)
at anywheresoftware.b4a.shell.ShellConnector.run(ShellConnector.java:119)
at java.lang.Thread.run(Thread.java:841)
System.exit() call: started ignoring fatal signals
GC_CONCURRENT freed 407K, 8% free 5393K/5852K, paused 1ms+1ms, total 4ms
Compiler shutdown in progress - discarding request
Compiler shutdown in progress - discarding request
Duplicate finish request for ActivityRecord{222339b8 u0 talkingsurvey.b4a.tsstart/.main id=0 t7 f}
Compiler shutdown in progress - discarding request
Compiler shutdown in progress - discarding request
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
I might add that the last time the widget was compiled was under B4a Version 5.2, (November 2015, before 5.5 came out, using 5.8 in logs below and previous post).

Here is Erel's Quote of the day widget (completely unchanged), compiled, installed unfiltered logs, same .BAL missing problem
** Service (widgetservice) Create **
Error occurred on line: 21 (WidgetService)
java.io.FileNotFoundException: widgetlayout.bal
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:316)
at android.content.res.AssetManager.open(AssetManager.java:290)
at anywheresoftware.b4a.objects.RemoteViewsWrapper.createRemoteViews(RemoteViewsWrapper.java:39)
at anywheresoftware.b4a.samples.quotes.widgetservice._service_create(widgetservice.java:369)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:702)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:336)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.samples.quotes.widgetservice.onCreate(widgetservice.java:53)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2739)
at android.app.ActivityThread.access$1800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1375)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at dalvik.system.NativeStart.main(Native Method)
null: 20
** Service (widgetservice) Start **
java.net.SocketException: Socket closed
System.exit() call: started ignoring fatal signals
at libcore.io.Posix.recvfromBytes(Native Method)
at libcore.io.Posix.recvfrom(Posix.java:141)
at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
at libcore.io.IoBridge.recvfrom(IoBridge.java:506)
at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
GC_CONCURRENT freed 366K, 7% free 5361K/5764K, paused 3ms+4ms, total 8ms
at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
at java.io.InputStream.read(InputStream.java:162)
at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)
at java.io.BufferedInputStream.read(BufferedInputStream.java:227)
at anywheresoftware.b4a.shell.ShellConnector.readControlData(ShellConnector.java:190)
at anywheresoftware.b4a.shell.ShellConnector.connect(ShellConnector.java:185)
at anywheresoftware.b4a.shell.ShellConnector.run(ShellConnector.java:119)
at java.lang.Thread.run(Thread.java:841)
Compiler shutdown in progress - discarding request
 
Last edited:
Upvote 0
Top