Android Question Unkown java error message for a Dummy

johnB

Active Member
Licensed User
Longtime User
I received a message the other day about making 100 posts OK so I'm a dummy OMG!!!!!!!!

Another dumb question, SORRY

I've had an app running successfully for some time now but I'm now getting this message when running in Release mode. It runs ok in Debug mode.

I've degenerate a new program and am putting bits of the original program in bit by bit but was hoping that somebody with java experience may be able to easily interpret the error message

B4X:
LogCat connected to: 0123456789ABCDEF
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
maininitializeProcessGlobals (java line: 1199)
java.lang.VerifyError: b4a/Dividends_Portfolio/miscellaneous
    at b4a.Dividends_Portfolio.main.initializeProcessGlobals(main.java:1199)
    at b4a.Dividends_Portfolio.main.afterFirstLayout(main.java:96)
    at b4a.Dividends_Portfolio.main.access$100(main.java:17)
    at b4a.Dividends_Portfolio.main$WaitForLayout.run(main.java:78)
    at android.os.Handler.handleCallback(Handler.java:800)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:194)
    at android.app.ActivityThread.main(ActivityThread.java:5449)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:525)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    at dalvik.system.NativeStart.main(Native Method)


UPDATE - I've found the Sub that is causing the problem so I'll debug that
 
Last edited:

Roycefer

Well-Known Member
Licensed User
Longtime User
Stack Overflow says that java.lang.VerifyError is caused by something going wrong at runtime with an imported library: http://stackoverflow.com/questions/100107/reasons-of-getting-a-java-lang-verifyerror . Judging by your stack trace, it looks like it's happening as it's trying to initialize your Process Global variables. It might be the case that one of your Process Global variables is an instance of a class defined in a certain version of a library but a different version of that library is available at runtime. Have you changed any of the method signatures or class definitions in b4a.Dividends_Portfolio.miscellaneous? I'd start investigating there.
 
Upvote 0

johnB

Active Member
Licensed User
Longtime User
Thanks Roycefer for your reply

The think that I love about this platform is that there is always somebody happy and ready to help.

I've just started reusing a charting program I purchased a few years ago and I noticed on there forum, that there hasn't been an answer to a post for a number of months. Because I haven't used it for a couple of years I've forgotten a lot of the formula statements so I've made a couple of posts but I'm now not expecting a reply.

I've got this app working working and the change that was needed is really strange, I'll post the change that got it working

The NEW CODE is

B4X:
    trans01Cur = Main.SQL1.ExecQuery("SELECT * FROM Trans01 ORDER BY Portfolio, Stock")
    Main.SQL1.BeginTransaction
   
    For i = 0 To trans01Cur.RowCount - 1
        trans01Cur.Position = i
        If trans01Cur.Position > 0 Then

The OLD CODE is :

B4X:
    trans01Cur = Main.SQL1.ExecQuery("SELECT * FROM Trans01 ORDER BY Portfolio, Stock")
    Main.SQL1.BeginTransaction

    j = 0
    For i = 0 To trans01Cur.RowCount - 1
            trans01Cur.Position = i
             If j > 0 Then

Weird but it's working now. I've used the j > 0 the make sure I'm not on the first record many times in other apps and never had this problem. It's probably somewhere else in this app as well. I might go thru and change them in case I get the same problem sometime in the future and have forgotten what the answer was.

Thanks again for your help, There was something else that was wrong with the code but it wasn't causing the problem. I''l post it elsewhere because I would have expected the compiler to have picked it up - a stray Next statement

Regards
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
or use
B4X:
trans01Cur = Main.SQL1.ExecQuery("SELECT * FROM Trans01 ORDER BY Portfolio, Stock limit 1,1")
to get ONLY the 2nd dataset
 
Upvote 0

johnB

Active Member
Licensed User
Longtime User
Thanks guys, an incredible forum, many busy people always ready to help.

I've never seen the Limit 1,1 statement before, will give it a try. Love SQL, it's so simple to manipulate a database even though I think they over complicated some commands.

I need the first record for processing, the IF statement that seemed to have caused the problem is to avoid the first record creating a totals/summary record - as there would always be a "key" change on the first record.

Thanks again
 
Upvote 0
Top