views:

54

answers:

1

Hi,

I've created an application that loads data in from XML files locally, and with these files it finds images, videos, and EXE's that the player can run from dynamically created buttons. When loading files and images and running EXE's, I try/catch all over the place as to not crash.

However, today a user crashed the program by trying to use it as another Windows user. The files aren't protected by one user (as far as I know), but if they are, the program should catch that. For some reason it crashes instead of the try/catch working. The functions I'm using are System.Diagnostics.Process.Start(), File.Exists(), and Directory.GetCurrentDirectory(). Is there any outstanding problem I'm missing when it comes to these and files that would be outside the scope of a normal try/catch with these functions? Thanks,

Andy

A: 

Does the other user happen to have a space in their user name?

If the exception is not being caught by your catch blocks, you should make sure you have a top-level exception handler (around your startup code and also Application.DispatcherUnhandledException) Then once you've caught the exception, post back with a stack trace and I'm sure you'll get an answer quickly.

Josh Einstein