Hi group,
I have a strange error.
I'm a beginner with dotnet 3.0, when i try to run an wpf application
from my windows explorer, the application crash.
For example, i've downloaded the demo project at this url :
http://www.codeproject.com/useritems/wpfdemo1.asp, that contains an
exe and the source code.
If I run the exe from my windows explorer, the application crash, but
If i rebuild the application with the source code and start it from
visual studio (ctrl+F5), the application runs well.
But If I run it again from windows explorer, crash again.
Another strange behavior, if i start the application from the command
windows (cmd.exe), the application runs well.
Why does it crash from explorer ?
I'm using windows xp, visual c# 2005 team suite and the framework.net
3.0
Thanks for your help,
S.
Michael Nemtsev - 21 May 2007 15:06 GMT
Hello timor.super@gmail.com,
Have u tried to run both the debug and release version?
Any entries in event log?
---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
> Hi group,
>
[quoted text clipped - 22 lines]
>
> S.
timor.super@gmail.com - 21 May 2007 15:22 GMT
> Hello timor.su...@gmail.com,
>
[quoted text clipped - 37 lines]
>
> - Afficher le texte des messages précédents -
Thanks for your answer michael,
as i said, in fact, the debug version is ok everywhere
the release version fails everywhere
it's not a problem of windows explorer ...
the event log tells me :
Faulting application workbench.exe, version 0.0.0.0, stamp 4458379d,
faulting module kernel32.dll, version 5.1.2600.2945, stamp 44ab9ae6,
debug? 0, fault address 0x00012a5b.
timor.super@gmail.com - 21 May 2007 15:19 GMT
On 21 mai, 15:59, timor.su...@gmail.com wrote:
> Hi group,
>
[quoted text clipped - 22 lines]
>
> S.
In fact, that's not true,
what it appends :
- debug version runs well
- release version crashes
why such a thing ?
Peter Duniho - 21 May 2007 18:43 GMT
> what it appends :
> - debug version runs well
> - release version crashes
>
> why such a thing ?
You have a bug that is obscured somehow in the debug version.
In C#, the most common way for this to happen is to explicitly contain
some code with "#if DEBUG", since the usual "uninitialized variable" stuff
doesn't come up (heap-allocated stuff is always initialized to default
values and local variables are required by the compiler to be initialized
before use). However, you might have some debug-related code (for
example, using the Debug.Assert() method where the clause in the method
has a side-effect). This is not an exclusive list, but is the most common
ways I can think of that might cause this sort of thing.
Finding the exact problem might be tricky, but frankly since you have a
reproducible crash in the release version, why not just run the release
version under the debugger and take a look at the crash? See what's wrong
and think about what code should be making it right and why that code
might not be executing, or might be doing the wrong thing, under the
release version of the build.
Pete