I have recently implemented a method to send home by email the stack, in case of crash in my apps.
Sure enough, I get every crash report, but now I am a bit lost as to what is going on with one. Below is what I get. My issue is that I have no such ListColumnGetter in my code. And I nowhere raise OutOfBound. What could it be ? Is it part of the Xojo framework ? How can I alleviate this ?
[code]Private Function CleanStack(error as RuntimeException) as string
'get the stack together
dim result as string
#if rbVersion >= 2005.5
for each singleStack as string in error.stack
dim StackString as string = cleanMangledFunction(singleStack)
if StackString <> “” then result = result + EndOfLine + StackString
next
#else
// leave result empty
#endif
return result
End Function[/code]
[code]Private Function CleanMangledFunction(item as string) as string
'for stack cleaning
#if rbVersion >= 2005.5
dim blacklist() as string = array( _
"REALbasic._RuntimeRegisterAppObject%%o<Application>", _
"_NewAppInstance", _'
"_Main", _
"% main", _
"REALbasic._RuntimeRun" _
)
if blacklist.indexOf( item ) >= 0 then exit function
dim parts() as string = item.split( "%" )
if ubound( parts ) < 2 then exit function
dim func as string = parts( 0 )
dim returnType as string
if parts( 1 ) <> "" then returnType = parseParams( parts( 1 ) ).pop()
dim args() as string = parseParams( parts( 2 ) )
if func.inStr( "$" ) > 0 then
args( 0 ) = "extends " + args( 0 )
func = func.replaceAll( "$", "" )
elseif ubound( args ) >= 0 and func.nthField( ".", 1 ) = args( 0 ) then
args.remove( 0 )
end if
if func.inStr( "=" ) > 0 then
dim index as integer = ubound( args )
args( index ) = "assigns " + args( index )
func = func.replaceAll( "=", "" )
end if
if func.inStr( "*" ) > 0 then
dim index as integer = ubound( args )
args( index ) = "paramarray " + args( index )
func = func.replaceAll( "*", "" )
end if
dim sig as string
if func.instr( "#" ) > 0 then
sig = "Event"
func = func.replaceAll( "#", "" )
elseif returnType = "" then
sig = "Sub"
else
sig = "Function"
end if
if ubound( args ) >= 0 then
sig = sig + " " + func + "( " + join( args, ", " ) + " )"
else
sig = sig + " " + func + "()"
end if
if returnType <> "" then sig = sig + " as " + returnType
return sig
#else
return “”
#endif
End Function
[/code]
For instance, this gives me
2017-03-27, 15:53:40 Stack:
2017-03-27, 15:53:40
Sub VField.SetString(string)
Sub WriteMessageToValentina.Constructor(VDatabase)
Sub WriteMessageToDatabase.Constructor(string, VDatabase, ExportOptions, string)
Function MailParser.parse() as int32
Sub ArchiveThread.Archive()
Sub ArchiveThread.Event_Run()
[quote=325935:@Beatrix Willius]2017-03-27, 15:53:40 Stack:
2017-03-27, 15:53:40
Sub VField.SetString(string)
Sub WriteMessageToValentina.Constructor(VDatabase)
Sub WriteMessageToDatabase.Constructor(string, VDatabase, ExportOptions, string)
Function MailParser.parse() as int32
Sub ArchiveThread.Archive()
Sub ArchiveThread.Event_Run()[/quote]
can you show me the crash report before the cleaning up??
2017-04-13, 13:04:38 Stack:
2017-04-13, 13:04:38
Sub MainWindow.MainWindow.DoPrinting(MainWindow.MainWindow)
Sub CCToolbar.CCToolbar.MainToolbar1_Action(CCToolbar.CCToolbar, MainToolbar, ToolItem)
Sub Delegate.IM_Invoke(MainToolbar, ToolItem)
Sub AddHandler.Stub.15(ToolItem)
Sub Delegate.Invoke()
Sub Application._CallFunctionWithExceptionHandling()