BUG: Beta 5.22 on Win10. Something keeps crashing the program


Ian
 

Hi, now working in 5.22 beta on a Win10 system and something just isn't right with it.
For starters, just on install, it took two starts to get the program to come up successfully. It crashed immediately on the start. When it came up all was good but then I would do something and have no program showing.
I wish I knew what I had been doing when it would crash but so far one of the factors seems to be Saving the file. I will try to keep a closer look on what is happening just before a crash.

Will keep you updated. Oh, if/when I get a crash, what files would you like to see to help track down the problem?

--
-- Ian


Adam Richards
 

Ian,
I run on Mac and what I do is to run with the debugger on (called lldb). I think the Unix equivalent is called Gdb. 

I don’t know what the equivalent in Windows is, but the most basic point is to always get a system process dump when the program abends. This should contain a stack trace that will show the calling sequence. I think I read that this involved making some config settings on Windows.

Obviously the layout file is key as are any parameter files that are loaded.

My guess about the double restart is that it will either have something to do with the temp keycheck file - since it would be loaded - if you asked for it to be or the other guess might be the parm .ini settings which might have been reset. It depends how far you got.  These settings are fundamental (window sizes, for instance) that are then passed to Windows - and should one of those not have been corrected for 64bit...  

The ini file is also saved when the save command is run.

Adam

On Sat, Feb 13, 2021 at 5:06 PM, Ian <ilox11@...> wrote:
Hi, now working in 5.22 beta on a Win10 system and something just isn't right with it.
For starters, just on install, it took two starts to get the program to come up successfully. It crashed immediately on the start. When it came up all was good but then I would do something and have no program showing.
I wish I knew what I had been doing when it would crash but so far one of the factors seems to be Saving the file. I will try to keep a closer look on what is happening just before a crash.

Will keep you updated. Oh, if/when I get a crash, what files would you like to see to help track down the problem?


--
-- Ian

--
Adam Richards


Dave Bullis
 

There a debug logging you can turn on to give us an idea of what's going on
You can run xtrkcad by
xtrkcad /d init=3 /d command=3
the log will be in the xtrkcad working folder (on my machine it is c:\Users\dave-\AppData\Roaming\xtclog.txt)
Send us the log with a description of what triggered the crash and any message boxes (if any).
Also send us the xtrkcad.ini file from the same directory.
And, as always, please send us the .xtc file you were working on.

Dave


Adam Richards
 

Btw - gdb runs on Windows as well apparently. It needs to be downloaded and installed (freeware).

1. You compile xtrkcad using the Debug type build option in cmake. 

2. then you “gdb xtrkcad” in the binary directory.

3. to start the program you use “run” at the gdb prompt - you can add the /d arguments that Dave mentions after run. 

4. When the program crashes it will pause in gdb so
use “bt” at the gdb prompt to show the calling stack.

You can then send that stack trace as well. It will show us which instruction at which offset in a module was the one that had the issue.

As you become more expert you can see variable values, set them, break execution at function entries or offsets and so on. It’s a real Swiss Army knife for debugging.

Adam


Ian
 

Worth a try. Will have a look when I get home. Cheers and thanks.



On Mon, 15 Feb 2021, 02:22 Adam Richards, <adamjmrichards@...> wrote:

Btw - gdb runs on Windows as well apparently. It needs to be downloaded and installed (freeware).

1. You compile xtrkcad using the Debug type build option in cmake. 

2. then you “gdb xtrkcad” in the binary directory.

3. to start the program you use “run” at the gdb prompt - you can add the /d arguments that Dave mentions after run. 

4. When the program crashes it will pause in gdb so
use “bt” at the gdb prompt to show the calling stack.

You can then send that stack trace as well. It will show us which instruction at which offset in a module was the one that had the issue.

As you become more expert you can see variable values, set them, break execution at function entries or offsets and so on. It’s a real Swiss Army knife for debugging.

Adam


Ian
 

Dave, when I change the shortcut to read...
 "C:\Program Files\XTrackCAD\bin\xtrkcad.exe /d init=3 /d command=3"
Windows 10 spits back that the line is invalid.
Please tell me exactly what I should be putting in the shortcut to open it in the debug mode?


On Mon, 15 Feb 2021 at 01:43, Dave Bullis <sillub@...> wrote:
There a debug logging you can turn on to give us an idea of what's going on
You can run xtrkcad by
xtrkcad /d init=3 /d command=3
the log will be in the xtrkcad working folder (on my machine it is c:\Users\dave-\AppData\Roaming\xtclog.txt)
Send us the log with a description of what triggered the crash and any message boxes (if any).
Also send us the xtrkcad.ini file from the same directory.
And, as always, please send us the .xtc file you were working on.

Dave



--
-- Ian


Radgoate
 

Try:
"C:\Program Files\XTrackCAD\bin\xtrkcad.exe” /d init=3 /d command=3

On 15 Feb 2021, at 10:47, Ian <ilox11@gmail.com> wrote:

"C:\Program Files\XTrackCAD\bin\xtrkcad.exe /d init=3 /d command=3"


Russell Shilling
 

I can't tell if you're running Windows 64-bit, and XTrackCad is 32-bit, but if that's true the path to use is "C:\Program Files (x86)\XTrackCAD\bin\xtrkcad.exe /d init=3 /d command=3"
--
Russell Shilling
http://shilling-or.com


Ian
 

Well, thanks to everybody for the feedback. Yes, I was adding the logging bit incorrectly inside the quotes. Of course, the modifiers had to be outside of the quotes. Sigh. I knew that! Doh! (My first DOS after C/PM was DOS 1.2)

This is the entry that works just fine:
"C:\Program Files\XTrackCAD\bin\xtrkcad.exe" /d init=3 /d command=3

Again, many thanks, now to see if the Logging files have worked as we had hoped.


On Tue, 16 Feb 2021 at 03:22, Russell Shilling <russellshilling@...> wrote:
I can't tell if you're running Windows 64-bit, and XTrackCad is 32-bit, but if that's true the path to use is "C:\Program Files (x86)\XTrackCAD\bin\xtrkcad.exe /d init=3 /d command=3"
--
Russell Shilling
http://shilling-or.com



--
-- Ian