Is there a way to check for a NULL in the code below. If I can test for Null I can work around the problem and determine why I get the Null. [I think its me]
At best this problem is pretty random so I don't think I can make a demo.
I have found ways that are supposed to check for Null but not exactly the same situation and therefore they don't work
I have tried "If X = Null then" but throws a Null Error rather that follow the code.
I have tried making X an Object, same result.
B4X:
Private Results(16,5,2) As String
Private Results2 (,,) As String
Results2 = kvs.GetObject("Results")
'Reload "Results" array from Results2
For FNM = 0 To 15
For STEPS = 0 To 4
For DATA2 = 0 To 1
Results(FNM,STEPS,DATA2) = Results2(FNM,STEPS,DATA2)
Next
Next
Next
The KVS stores a number of Lists and a number of Arrays of Strings. The problem crops up randomly but appears only to be Arrays, the Lists are read before the Arrays so the KVS does not appear to be the issue.
A method of testing for a Null would be useful in a number of situations.
Around 24hrs ago Erel made the suggestion above. I inserted the code below and similar lines for each Array in the KVS.
B4X:
If kvs.GetObject("Results") = Null Then ToastMessageShow("Results is Null",True)
For 24Hrs I have been stopping, starting and reinstalling the App. No sign of the error/crash I had been experiencing for two days.
I am pretty sure Erel hadn't intended that code to fix the problem but it's either that or the software Gremlins.
I will suspend the thread until if and when the problem returns.
For 24Hrs I have been stopping, starting and reinstalling the App. No sign of the error/crash I had been experiencing for two days.
I am pretty sure Erel hadn't intended that code to fix the problem but it's either that or the software Gremlins.
I will suspend the thread until if and when the problem returns.