An app installed on 20 smartphones works correctly, on the 21st it crashes abruptly and returns the following error
Runtime Error
Attempt to invoke interface method ‘java.util Iterator java.util.List.iterator ()’ on a null object reference
All smartphones are same brand / model (Samsung A10), have the same version of Android, the 9, and the same number of programs loaded
The error occurs when the main screen is loaded and execution is interrupted
Firebase, Timer, and other extensions are used in the program
Failing to perform a step-by-step debug I would not know how to intervene to understand the reason for the error reported
What can I do to understand the problem and correct it?
No, no list is loaded
Firebase is used only through the DataChanged event to read commands that are sent from a PC and arrive to the app on a smartphone
Yes, sure
When app run Screen1 is started
On Screen 1 there is only one button cmdVai
When Screen1 is initialized, then screen Mezzi is started
On init_ambiente, values are assigned to variables
The firebase_reset_initiale block is shown below
The telephone_right_9 procedure is also reported, which extrapolates the 9 right characters of a string containing a telephone number
Looking at your blocks, I see a vulnerability in the telephono_right_9 value procedure if the TinyDB tag numero_Telephono exists but has a value with string length less than 9. The segment call would crash.
That procedure result is immediately after used as a tag for a Firebase call.
I suggest some Do It Companion testing to see the values in TinyDB for that device.
The problem appear also when app is newly installed
Then 'ValueifTagNotThere' should be picked (i think)
But yes, this point can be a potential vulnerability, then must be modified
I can’t do it, the software is developed on behalf of a client
And there is a confidentiality agreement on the procedures provided
It is one thing to describe some functions, another thing is to make the whole code public