1

One of my client has experience strange behavior of my application - on second time it runs - it just closing - no error or anything.

How can I track this kind of "heisenbugs" where I don't have any stack trace or physical access to the remote machine nor I can't recreate the behavior my client is describing?

JustMe
  • 2,329
  • 3
  • 23
  • 43
  • Maybe on the first run the program closes but is still working in the background and cannot terminate while still holding locks on some resources. Running the application again hits the wall since the previous process still running and blocking the acces to some resources. Process Monitor might be a good help: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx – hubalazs Jun 15 '12 at 13:20
  • create debug version with logging – teran Jun 15 '12 at 13:22
  • @teran Yes we have logging/stack tracking but it can be sent to us only when the bug appears – JustMe Jun 15 '12 at 13:36
  • @JustMe Well, looks like you'll need to change your logging to ensure that you do get some information. – David Heffernan Jun 15 '12 at 13:40
  • @David any good tool for Delphi that you can recommend (commercial/free)? – JustMe Jun 15 '12 at 13:43
  • 3
    For remote debugging tools, see [Techniques and tools for debugging problems on remote machines?](http://stackoverflow.com/q/6721713/576719). – LU RD Jun 15 '12 at 13:59
  • 1
    I'd take a first stab with MS Dependency Walker in Profile mode to see how far into execution the program gets. – David Heffernan Jun 15 '12 at 14:01
  • CodeSite (bundled with XE+) is a great tool for this type of problem - low-overhead and highly configurable logging with flexible communication options. – Argalatyr Jun 15 '12 at 14:50

2 Answers2

0

on second time it runs - it just closing - no error or anything.

an error in a With... Do... Try...Finally...Free... maybe ? At the end it would close the appli instead of freeing the scoped object?

az01
  • 1,988
  • 13
  • 27
0

The Windows Debugger Tools provides a DbgSrv service which handles 'second change exceptions' and can generate an extensive report when it detects a selected executable runs but closes under a severe error or suspicious activity.

Stijn Sanders
  • 35,982
  • 11
  • 45
  • 67