[Gambas-user] Debugging Gambas (again)
KKing
kicking177 at gmail.com
Sat Apr 27 16:15:58 CEST 2019
ok
p DEBUG_get_current_position()
seems to do same as
p DEBUG_get_position(EXEC_current.cp, EXEC_current.fp, EXEC_current.pc)
both return
$1 = 0x80a0d00 <COMMON_buffer> "Module1.dBUse.142"
so line 142 is the line with "Debug This 1007A" below,
<<
For iField = 1 To iNumOfFields
If (Main.giLNBP = 4) Then
Main.TraceLog("Debug This 1006: iField " & CStr(iField))
End If
DBFField = Null
If (Main.giLNBP = 4) And (iField = 17) Then
Main.TraceLog("Debug This 1007A: iField " & CStr(iField))
End If
DBFField = New CDBFFields
If (Main.giLNBP = 4) And (iField = 17) Then
Main.TraceLog("Debug This 1007B: iField " & CStr(iField))
End If
..... snip .....
Next
>>
The "IF" statements were me narrowing down the point it (currently)
SegFaults.
In the TraceLog I am writing too it has the "Debug This 1006" but not
the "Debug This 1007A", but could that be cache not flushed on crash?
If I take away the "IF" statements (as I had at one stage) the log file has
<<
Main.TraceLog("Debug This 1007A: iField " & CStr(iField))
>>
and lines before and after, multiple times including for when iField is 17.
Does "Module1.dBUse.142" mean the line that fails, or the last line that
processed okay?
and hence is it really the line
<<
DBFField = New CDBFFields
>>
that it is crashing on?
for ref CDBFFields is a class with
<<
Public FieldName As String
Public FieldType As String
Public FieldLength As Byte
Public FieldOffset As Short
Public FieldDecimals As Byte
>>
Question is the
<<
DBFField = Null
>>
before
<<
DBFField = New CDBFFields
>>
within the for next okay?
I've not provided the full function because it is rather long with a lot
more further sub classes that really would protract the discussion and
would be better served by me trying to create a cut down version to work
from.
K
More information about the User
mailing list