Android Question Application has stopped

AHilberink

Active Member
Licensed User
Longtime User
Hi,

I have a strange problem: My app is working well on the AVD emulation. On the tablet it gives a error "(AppName) has stopped", but not always.

Looking to the steps during this error, there is no step done.

Is there a way to investigate were it is going wrong? Now I don't have any clue.

Best regards,
André
 

AHilberink

Active Member
Licensed User
Longtime User
Hi Klaus,

Thanks you for your suggestions. I did a try in debug on developer mode on the tablet. I now got an error message:
B4X:
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Activity (main) Pause, UserClosed = true **
** Activity (hoofdprogramma) Create, isFirst = true **
** Activity (hoofdprogramma) Resume **
** Activity (hoofdprogramma) Pause, UserClosed = false **
** Activity (verzend) Create, isFirst = true **
** Activity (verzend) Resume **
** Activity (verzend) Pause, UserClosed = true **
** Activity (hoofdprogramma) Resume **
java.lang.RuntimeException: java.io.FileNotFoundException: /data/data/b4a.werkbonnen/cache/2: open failed: ENOENT (No such file or directory)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:206)
    at anywheresoftware.b4a.BA$2.run(BA.java:328)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:6134)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.io.FileNotFoundException: /data/data/b4a.werkbonnen/cache/2: open failed: ENOENT (No such file or directory)
    at libcore.io.IoBridge.open(IoBridge.java:456)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
    at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:370)
    at anywheresoftware.b4a.samples.httputils2.httputils2service._hc_responsesuccess(httputils2service.java:130)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
    ... 9 more
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
    at libcore.io.Posix.open(Native Method)
    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
    at libcore.io.IoBridge.open(IoBridge.java:442)
    ... 15 more

It seems to happen between a Poststring and the JobDone. JobDone is never reached.

Can someone please explain how to find this problem?

Best regards,
André
 
Last edited:
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
It fails to write to File.DirInternalCache for some reason.

Try to create this folder with:
B4X:
File.MakeDir(File.DirInternalCache, "")

Hi Erel,

I tried this, but same error and appcrash.

Is there something else to check?

Best regards,
André
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User
I just update to v6.30. During compile, I got the following message:
B4X:
Compiling generated Java code.    Error
javac 1.8.0_40
src\b4a\werkbonnen\httputils2service.java:84: error: cannot find symbol
        super.onTaskRemoved(rootIntent);
             ^
  symbol: method onTaskRemoved(Intent)

What is going wrong?

Best regards,
André
 
Upvote 0
Top