debugging problem

Smee

Well-Known Member
Licensed User
Longtime User
I am in the process of debugging / crashing a program.

I am able to crash the program if i do 3 downloads in a row and then go to another activity. I do not know why the program crashes because i am unable to interpret the log properly

B4X:
** Activity (main) Resume **
Starting: Intent { flg=0x20000 cmp=WDROrder.Program/.catalogues } from pid 13345
** Activity (main) Pause, UserClosed = false **
** Activity (catalogues) Create, isFirst = false **
** Activity (catalogues) Resume **
GC_FOR_ALLOC freed 8174K, 31% free 25845K/37447K, paused 37ms
Grow heap (frag case) to 28.329MB for 3126416-byte allocation
GC_CONCURRENT freed 1K, 23% free 28897K/37447K, paused 3ms+3ms
GC_FOR_ALLOC freed 5374K, 35% free 24369K/37447K, paused 34ms
Grow heap (frag case) to 27.905MB for 4194320-byte allocation
GC_FOR_ALLOC freed <1K, 24% free 28465K/37447K, paused 37ms
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x401fc760)
FATAL EXCEPTION: main
java.lang.ClassCastException: anywheresoftware.b4a.net.FTPWrapper cannot be cast to anywheresoftware.b4a.AbsObjectWrapper
   at anywheresoftware.b4a.AbsObjectWrapper.equals(AbsObjectWrapper.java:66)
   at java.util.WeakHashMap.get(WeakHashMap.java:478)
   at anywheresoftware.b4a.B4AThreadPool.markTaskAsFinished(B4AThreadPool.java:64)
   at anywheresoftware.b4a.BA.markTaskAsFinish(BA.java:220)
   at anywheresoftware.b4a.BA.access$4(BA.java:217)
   at anywheresoftware.b4a.BA$1.run(BA.java:209)
   at android.os.Handler.handleCallback(Handler.java:587)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:132)
   at android.app.ActivityThread.main(ActivityThread.java:4025)
   at java.lang.reflect.Method.invokeNative(Native Method)

it looks like it has something to do with ftpwrapper but i make sure that the ftp is closed when the service is destroyed.
ftp.close

Is this what is causing the error?


update:

I have done further testing and it seems that if i run the ftp service 3 times then the error appears. it does not need to be 3 times in a row.
 
Last edited:

Smee

Well-Known Member
Licensed User
Longtime User
Thanks for the quick reply Erel,

I do make http calls in the form of displaying data in tabular form but not at the same time. I haven't got to the stage of extensive debug/crash testing of that yet.

Is this also part of the bug?
 
Upvote 0
Top