Debugging

  • Thread starter Thread starter Jon Vaughan
  • Start date Start date
J

Jon Vaughan

Hi,

Im running a .net program I have made and all runs fine, but randomly it
will reset itself without warning . The program is a touchscreen program and
runs full screen forms ( borderless ). My first thought was a memory leak so
I have been watching memory usage via the task manager. It seems that
everytime I perform an action in the program ( all action use datasets and
data fetches or local xml fills ) the memory usage increases by 5mb.

As a test I performed about 70 actions with the program and at the end found
that the memory usage was up close to 150mb. Knowing that the Garbage
Collector should be collecting any memory that is out of scope ( all forms
containing the datasets are closed ) I left the program running on the login
screen for 15mins. When I came back I was presuming that the disgard memory
would have been collected. But It hadnt, strangly enough the only way the
mem used would drop was when I minimized the program and a few minutes later
maximized it again.

What im asking is :

1.) Does it sound like a memory leak ? or am I wasting my time looking for a
leak as this is perfectly normal action for a program ?

2.) If its not a memory leak - what could be causing my program to reset
itself ? on the initial form I added an onclose check ( yes / no msgbox ) as
a test, but when it reset this check doesnt show.

3.) If it is a memory leak how do I begin tracking it ? I have no experience
of finding this kind of error, as the usual stop and step into obviously
wont work.

Thanks for reading

Jon 'Very Frustrated' Vaughan
 
Ido,

Would an application that resets itself afte a period of running be likely
to be having a memory leak ?

Thanks

Jon
 
John,

From my experience application reset is not caused by a memory leak. But my
experience is limited, after all.
Try adding traces to catch the exact point of reset (object, method etc.)

You mentioned that your application supports a touch screen. Try running the
application on a regular
environment and see if the problem reproduced.

A memory leak under .NET is possible, but I would explor other weak points
in the application before taking that dark path...

This is actually a bug hunt problem. I would recommend talking to some SVT /
QA personnel to try and get some bug
hunting technics.

Good luck!

Ido
 
Could you give me some examples of what may cause a reset. As I have no idea
where to start looking ?

Thanks

Jon
 
Back
Top