Android Question Interpreting Error log

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All,

Difficult question, attached is a screen shot of the Logs when a crash occurs.
Line 527 is indicated as the error point but probaby not the cause. I have replaced the entire sub from a working back up and it still crashes.
Does any of the other info in the log show anything to those who can interpret it?

Regards
Roger

PrintScrn.jpg
 

DonManfred

Expert
Licensed User
Longtime User
Difficult question, attached is a screen shot of the Logs when a crash occurs.
Probably it is beter to pot the LOG instead of a screenshot.
The error is invalid double ""

I guess you are trying to convert an empty string to a double value
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi Donmanfred,

I had forgotten that you can copy the logs.
What you say about an empty string sounds right, but exactly where? Why it appears to be on long standing code?

I will keep fiddling until I find it. [... or get really frustrated and get the back up and start again]

Regards Roger
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Thanks Donmanfred.

The problem is that Send.tag is empty but I can't figure out why.
The lines in the code below have been used many times without any problems.
'Handles the reading of keys 0-9
Private send As View
send = Sender
I have checked the Tags in the designer and they still exist. For some reason send.tag is being returned an empty string.

Any ideas appreciated

Regards
Roger



B4X:
Sub Abtn_click
    If Settings(0,2) = 0 Then Vibrate.Vibrate (50)         ' Vibrate phone for 50 ms
    If Settings(1,2) = 1 Then
        MP.Stop
        MP.Load(File.DirAssets,"Windows XP start.wav")
        MP.Play
    End If

    If Record_flag = 0 Then Idisplay.Text = ""
   
'Handles the reading of keys 0-9
    Private send As View
    send = Sender
   
Log("Sender-  "&Sender)
Log("Send.tag-  "&send.Tag)     'Logs empty string

    If shift_flag = 1 Then
        shift_flag = 0
        lblShift.Text = ""
        If Radix_Flag <> 10 Then Return
        If Play_Flag = 1 Or Record_flag = 1 Then
            Idisplay.Text = "Illegal Input"
            Return
        End If       
        FNum = send.Tag
        Play_Flag = 1
        FPLAY
        Return
    End If
   
    If send.tag < Radix_Flag Then
        If Record_flag = 1 And input_flag = 0 Then
            Step_count = Step_count + 1
            Recording(FNum,Step_count,0) = "VAL"
        End If       
        If Record_flag = 1 Then
            If Idisplay.Text = "Recording" Then Idisplay.Text = ""
            If IDispTXT_flag = 1 Then Idisplay.Text = IDispTXT
            IDispTXT_flag = 0
            Idisplay.Text = Idisplay.Text&send.Tag
        End If
        input_flag = 1
        NDisplay(send.Tag)
        lblEXP.Text = ""
        If Two_flag = 1 Then
            Idisplay.Text = IDispTXT
            Two_flag = 0
        End If
        If Round_Flag = 1 Then   'If rounding function is active.
            IntDis = Abs(Buffer)
            IntDis = Min(IntDis, MaxRounding)
            If Truncate_Flag = 1 Then
                Idisplay.Text = "Truncate to " & IntDis & " decimal places"
            Else
                Idisplay.Text = "Round to " & IntDis & " decimal places"
            End If
        End If
    End If
End Sub
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Problem solved, I think.
When I moved:
'Handles the reading of keys 0-9
Private send As View
send = Sender​
to the very start of the Sub everything worked as it should.

I have no idea why this would do anything and I am suspicious that it may return.

Thanks for the help DonManfred

Roger
 
Upvote 0
Top