Android Question Invalid double: "null" after updating KeyValueStore

LucaMs

Expert
Licensed User
Longtime User
I was using an "old" version of KeyValueStore. Having found this problem:
https://www.b4x.com/android/forum/posts/557508/

I replaced the old class with the latest one (and replaced all PutSimple and GetSimple with Put and Get).

Running the project, I get:
java.lang.NumberFormatException: Invalid double: "null"



executing the assignment LastVersion = Version(0) (as you can see LastVersion is a string variable so this does not make sense [also Version is an array of strings]).

KeyValueStore is not involved in any part of this phase (GetOnlineVersion is a resumable sub which downloads a simple string from Internet, splits it and returns Version(), correctly).

How could this have happened?


Thank you
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
If you like you can send me the project and I'll test it here.
This is the answer I expected as first because I know that this is an hard error to debug.

Obviously I do not trust you and I know that you would publish this project and with the proceeds (tens of millions of euro) you would abandon us all to our destiny, going on holiday for the rest of your life

I know you (all) will not believe me but I have modesty in showing my source codes (if not partial)... probably this has to do also with the fact that I have not yet published apps and I continually postpone.

Now I try to recreate the problem in a test project; if this does crash for the same error, I will send you my project, Erel (hoping that you will not be strict in judging the code ).
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Now I try to recreate the problem in a test project; if this does crash for the same error, I will send you my project, Erel (hoping that you will not be strict in judging the code ).
Tested the... test projects; no errors.

So, Erel, if you do not feel offended by my joke (thanks @lemonisdead and @DonManfred ), I'll send you the project.


[After I opened this thread, I changed many things, continuing to use the old version of KVS and I will publish this version, but it's still interesting to find out where is the problem]
 
Last edited:
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
OK NP, I still use KVS in my projects, I've not used KVS2 or even downloaded as yet, if it isn't broke and all that...
I don't think KVS2 has bugs, because the error happened was very strange, as you know (wrong line indicated by the compiler, error type that has nothing to do with the error messsage, ...). Maybe corrupted files.

We will wait for Erel's response, but it will be difficult to find the error; maybe the project works well for him.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Unfortunately yes.

But it is not "my infamous app", the one I've been planning for years; this is a stupid and simple app that I developed almost fortuitously.

congratulations! i am happy to see you publishing an app after 235 years of coding. i wish you a lot of luck and i hope to see more from you and all others here (including me) in 2018
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…