Application doesn't start

J

John B

Hi!

I experiencing weird problems with my WinForms application running on
top of .NET Framework 2.0. Sometimes when I run the application,
nothing happens. The application .EXE just sits in task manager process
list with about 56 Kb memory footprint and I can only terminate it
through there. Today it came to a point when it doesn't run at all, no
matter how many times I try. I've tried rebuilding the project many
times, both Debug and Release builds. I haven't rebooted Windows yet,
I'll have to try it next.

When I place breakpoint in Main() method and run the app in debugger,
it never gets that there. I've seem this problem occurring every now
and then in all framework versions during last couple of years. Has
anyone else experienced this particular problem and possibly found a
workaround?

My system specs:
Pentium 4 Northwood 2.53 GHz
1 Gb RAM
Windows XP Pro with SP2
VS.NET 2005 Pro and Framework 2.0
 
G

Greg Young

I have experienced this .. it was due to a dll calling unmanaged code when
it was not supposed to in particular it was dying in dllmain as the other
code was trying to load other dlls which is a no no ..

Have you hooked up windbg to see whats going on when you die?

Cheers,

Greg Young
MVP - C#
 
J

John B

Thanks for your reply. Yes, my C# app is using an unmanaged DLL. Are
there some special considerations that need to be taken into account
when writing DllMain of the unmanaged DLL? No, haven't tried windbg.
 
G

Greg Young

This is not special for .NET ... it should never load other libraries during
DLL Main .. sometimes when it does it causes problems .. sometimes it does
not. windbg (I believe you can also get the information in VS.NET by
enabling unmanaged debugging) can tell you where the code is when it dies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top