Calling System.DebugLog causing IDE "crash" on Windows

I have a single line that causes a “fatal error” in the Xojo IDE 2015.

#if DebugBuild then System.DebugLog( "Socket :"+value )

The “fatal error” window appears behind the running debug app. The debug app continues to run. The IDE continues to run. When I quit the debug app, and click the “fatal error” window’s button to report the error to Xojo, the window disappears, nothing else happens, and the IDE continues to run.

What’s going on?

When I comment out this one line of code, none of this happens.

BTW, the line executes inside a custom event of a subclass of the CURLSMBS class.

Thanks.

[quote=172112:@Aaron Hunt]I have a single line that causes a “fatal error” in the Xojo IDE 2015.

#if DebugBuild then System.DebugLog( "Socket :"+value )

The “fatal error” window appears behind the running debug app. The debug app continues to run. The IDE continues to run. When I quit the debug app, and click the “fatal error” window’s button to report the error to Xojo, the window disappears, nothing else happens, and the IDE continues to run.

What’s going on?

When I comment out this one line of code, none of this happens.

BTW, the line executes inside a custom event of a subclass of the CURLSMBS class.

Thanks.[/quote]

Could you try to do

#if DebugBuild then System.DebugLog( "Socket :"+"value" )

The most probable explanation is that value is not what you think it is.

Well, value is just a string. I thought Xojo always made strings safe to print to the console?

Won’t you humor me and instead of assuming value is a string try what I posted ?

If a crash occurs, chances are value is something else. Or that getting it’s value triggers the crash. So it would not be system.debuglog, but value itself.

If I am right, something like

dim whatever as string = value

should trigger the same crash.

[quote=172138:@Michel Bujardet]Won’t you humor me and instead of assuming value is a string try what I posted ?

If a crash occurs, chances are value is something else. Or that getting it’s value triggers the crash. So it would not be system.debuglog, but value itself.

If I am right, something like

dim whatever as string = value
should trigger the same crash.[/quote]

Okay, I tried the dim statement as suggested. No crash. It’s a sub that passes a string.

Then you may want to simply pass the string to debuglog instead of using it directly. One of these mysteries…

But I think your idea must be on the right track. Somewhere this value must be corrupted. Anyway, it works on Mac, which is where I normally debug, so I can just get rid of it on Windows.

Thanks for the help.