Linux stack trace

Im trying to write out the stack (function names are included in the build) but I end up with an array (with elements) but all are empty, this is the code from app.unhandledexception

Dim type As String = Introspection.GetType(error).Name
dim StringArray(-1) as string
for i as integer = 0 to StringArray.Ubound

I always end up with an empty output string. The array does have elements though, but they are all empty. Am i missing something or is it a bug.

empty often means its all in framework code

Code in the Xojo framework (ie NOT your code)
But a bug report is likely more useful so we can track down what IS causing this

there is a build setting to include function names.
Is it activated?

[quote=271344:@Norman Palardy]Code in the Xojo framework (ie NOT your code)
But a bug report is likely more useful so we can track down what IS causing this[/quote]

Xojo Web framework in JavaScript and CSS is typically out of the Xojo code, is it not ?

[quote=271348:@dave duke]Yes function names are included. Norman, not sure what i can put in a bug report that can help you, I don’t get a stack trace so I have no idea what could be causing it?
there is no error.log for javascript errors.
A sample project that demonstrates the error would be useful

Bumping an old thread, but I have the exact same problem. Easy to reproduce: make a button and in the action event:

[quote][code]dim f as FolderItem
if = “” then return 'generates a nil object

exception err as RuntimeException
MsgBox “stack has " + str(err.stack.ubound + 1) + " lines” + endofline + join(err.stack,endofline)
the messagebox contains empty lines. It correctly reports having several lines (8 lines on Linux 64 bits anyway) but it appears to contain only empty lines. This works correctly on OSX. Tested on Linux 64 bits Desktop, haven’t tried in 32 bits or other types of projects.

… and yes, Include Function Names is on :slight_smile:

Anyone else can confirm? If so, I’ll file a bug report.

Opened a bug report # 46161.

I noticed this long ago as well. We run Xojo-build 64-bit commandline and web apps on Ubuntu 14.04 LTS Server.

Stack traces would definitely help finding code issues. I have put your case in ‘my top cases’.

This is excellent. By the way, how do you handle debugging of exceptions like that? Are there tools on Linux (I’m using Ubuntu) to monitor and help give a view of the status of the application that could be useful for this?

Since we do not have stack traces, it comes down to following the application logs to narrow down places where the issue can occur. Application logging is the key to all successful debugging…

One of the things I would really like to be able to do is to log from Xojo to a custom logging facility (local0 - local7), so that I can have syslog route that to a logging file in /var/log.

Now I have all Xojo processes log in their own logfile, but especially if multiple instances of one process run simultaneously, I need to be careful not to generate I/O exceptions. Syslog logging is oke, but since everything logs there, it can get hard to follow the logs from one specific application run.