[WPF] error starting application from explorer, but OK from VS

T

timor.super

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.
 
M

Michael Nemtsev

Hello (e-mail address removed),

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
 
T

timor.super

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.

In fact, that's not true,
what it appends :
- debug version runs well
- release version crashes

why such a thing ?
 
T

timor.super

Hello (e-mail address removed),

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,
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.- Masquer le texte des messages précédents -

- 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.
 
P

Peter Duniho

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
 

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