Random App Crash

  • Thread starter Thread starter dantheman
  • Start date Start date
D

dantheman

Hi All,

i've developed this Smart Device Application but i'm having all sorts
of random crashing i suspect to be caused by memory leaks or over all
performance issues, so i've ran the performance test to evaluate the
problems now i have these different reports and can't seem to see the
causing problem. here is a copy of the report ran when the application
ended by crashing.

what i did was started the application and opened like 4 or 5 times one
form that's tied to a button and closed that form. That form loads a
bunch of dropdowns of 20 to 50 records each

here is stats report any help reading this would be much appreciated

counter total last datum
n mean min max
Total Program Run Time (ms) 75278 -
- - - -
App Domains Created 1 -
- - - -
App Domains Unloaded 2 -
- - - -
Assemblies Loaded 13 -
- - - -
Classes Loaded 1254 -
- - - -
Methods Loaded 3702 -
- - - -
Closed Types Loaded 81 -
- - - -
Closed Types Loaded per Definition 81 19
20 4 1 19
Open Types Loaded 7 -
- - - -
Closed Methods Loaded 3 -
- - - -
Closed Methods Loaded per Definition 3 1
3 1 1 1
Open Methods Loaded 0 -
- - - -
Threads in Thread Pool - 0
2 0 0 1
Pending Timers - 0
4 0 0 1
Scheduled Timers 2 -
- - - -
Timers Delayed by Thread Pool Limit 0 -
- - - -
Work Items Queued 2 -
- - - -
Uncontested Monitor.Enter Calls 739 -
- - - -
Contested Monitor.Enter Calls 0 -
- - - -
Peak Bytes Allocated (native + managed) 2909472 -
- - - -
Managed Objects Allocated 34292 -
- - - -
Managed Bytes Allocated 1975036 28
34292 57 8 65548
Managed String Objects Allocated 2645 -
- - - -
Bytes of String Objects Allocated 96120 -
- - - -
Garbage Collections (GC) 1 -
- - - -
Bytes Collected By GC 741576 741576
1 741576 741576 741576
Managed Bytes In Use After GC - 273120
1 273120 273120 273120
Total Bytes In Use After GC - 2587280
1 2587280 2587280 2587280
GC Compactions 0 -
- - - -
Code Pitchings 0 -
- - - -
Calls to GC.Collect 0 -
- - - -
GC Latency Time (ms) 31 31
1 31 31 31
Pinned Objects 0 -
- - - -
Objects Moved by Compactor 0 -
- - - -
Objects Not Moved by Compactor 0 -
- - - -
Objects Finalized 1250 -
- - - -
Boxed Value Types 7563 -
- - - -
Process Heap - 1600
9082 85511 72 139720
Short Term Heap - 0
6198 1336 0 42136
JIT Heap - 0
6554 403838 0 797712
App Domain Heap - 0
23683 414109 0 666568
GC Heap - 0
40 657408 0 1314816
Native Bytes Jitted 759712 168
1965 386 80 27584
Methods Jitted 1965 -
- - - -
Bytes Pitched 0 0
0 0 0 0
Methods Pitched 0 -
- - - -
Method Pitch Latency Time (ms) 0 0
0 0 0 0
Exceptions Thrown 86 -
- - - -
Platform Invoke Calls 1903 -
- - - -
COM Calls Using a vtable 0 -
- - - -
COM Calls Using IDispatch 0 -
- - - -
Complex Marshaling 74 -
- - - -
Runtime Callable Wrappers 0 -
- - - -
Socket Bytes Sent 0 -
- - - -
Socket Bytes Received 0 -
- - - -
Controls Created 248 -
- - - -
Brushes Created 22 -
- - - -
Pens Created 6 -
- - - -
Bitmaps Created 373 -
- - - -
Regions Created 10 -
- - - -
Fonts Created 7 -
- - - -
Graphics Created (FromImage) 0 -
- - - -
Graphics Created (CreateGraphics) 71 -
- - - -

anybody see any issues that can help me
thankx
 
Only ~3MB of peak memory use seems small so that should be fine. Seems like
a large number of boxed types for the number of objects created, but that
might just be your architecture. Since you're in a GC environment, leaks
are highly unlikely (unless you're doing unsafe code).

What's the nature of the "crash"? App shutdown with no warning? OOM?
Native Exception? Managed Exception?

-Chris
 
here is stats report any help reading this would be much appreciated

Very interesting report. Where did you get that from?

Greetings
 
hi Chris,

not doing any unsafe code. here is the message i receive from the crash
i assume this is a Native Exception right? i also get an OOM crash some
times doing the same thing
myapp.exe
Exception

à Microsoft.AGL.Common.MISC.HandleAr()
à System.Drawing.Bitmap._InitFromMemoryStream()
à System.Drawing.Bitmap..ctor()
à myapp.Form1.OnPaint()
à System.Windows.Forms.Control.WnProc()
à System.Windows.Forms.ContainerControl.WnProc()
à System.Windows.Forms.Form.WnProc()
à System.Windows.Forms.Control._InternalWnProc()
à Microsoft.AGL.Forms.EVL.EnterMainLoop()
à System.Windows.Forms.Application.Run()
à myapp.Form1.Main()

this form has 3 combobox that i fill using a separate tread with around
20-50 records in each a few text boxes and that's about it

thankx for the help
 
hi Guest,

You have to create a new registry key on your device
called
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework\PerfMonitor".

In this key, create a DWORD value called "Counters".
When you set "Counters" to 1,

performance counters are enabled,

to disable them set "Counters" to 0.
 
hi Chris,

where can i access the "CF RPM" tool is the way i use it right know via
the creation of the reg key in my previous post the best way to use it
or is there a GUI in visual studio or something i can use
 
hi Chris,

where can i access the "CF RPM" tool is the way i use it right know via
the creation of the reg key in my previous post the best way to use it
or is there a GUI in visual studio or something i can use

thankx
 
Hi,

You're using a Bitmap, are you calling Dispose() on them? If not, you will
eventually get an OOM exception. It still bugs me that we have to do our
own memory management in C#, and yes, I will write this soapbox comment
everytime I mention Bitmap.Dispose(). :) It is just so wrong, makes me
feel dirty, I think I'll go take a shower.

Hilton



hi Chris,

not doing any unsafe code. here is the message i receive from the crash
i assume this is a Native Exception right? i also get an OOM crash some
times doing the same thing
myapp.exe
Exception

à Microsoft.AGL.Common.MISC.HandleAr()
à System.Drawing.Bitmap._InitFromMemoryStream()
à System.Drawing.Bitmap..ctor()
à myapp.Form1.OnPaint()
à System.Windows.Forms.Control.WnProc()
à System.Windows.Forms.ContainerControl.WnProc()
à System.Windows.Forms.Form.WnProc()
à System.Windows.Forms.Control._InternalWnProc()
à Microsoft.AGL.Forms.EVL.EnterMainLoop()
à System.Windows.Forms.Application.Run()
à myapp.Form1.Main()

this form has 3 combobox that i fill using a separate tread with around
20-50 records in each a few text boxes and that's about it

thankx for the help
 
Back
Top