How do i resolve this error?

Continuing the discussion from Error from Companion: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference:

context: i want to store numbers to firebase and then take those numbers and process them in arduino, since i am taking input using text boxes i am always getting " \"my_num " \ " which is harder (more lines of code in arduino) in later stages so i thought maybe i multiply that num by 1 and then store it in firebase, it did work and the value was stored as " my num " ; so i tried to do this for other such parameters as well but to my dismay it shows an error like the one mentioned above...(still the objective is achieved as in, in FB i have the format i wanted)

so i tried to revert back to old way of storing but now the error keeps coming...

The solution to that post does not suit mine because i don't recall creating any new variables and it was working when i changed one variable...

Is it maybe at run time the textbox.text is null and when i try to multiply it with 1 , i am getting a error? even then when i revert back the issue is persistent...?

The code base is quite big... so i don't know how to spell check things... here are some snapshots of the problem..

1st i changed it in the else part of the above pic and it worked...

Then i changed it in the else if part of 1st pic and frequency tag and i started getting error...

The error is actually triggered when i press a toggle switch in the UI...


Below is the code that is triggered by toggle switch:

If anyone wants to see the file i can share too... but its around 3k blocks... :frowning:

thanks for your time in advance!!!

really sorry to have done this... it was a small mistake... i copy pasted a function and checked for some small tweaks... forgot to notice that MIT app inventor changes the name automatically in all places.. so when i disabled the unwanted function... the above error has occurred... (the function in qs is store_values1 ... it shd have been store_values)...

(the longer i read this, more stupider i feel... :expressionless:)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.