none
WPF application issue when running the application

    Question

  • Hello,

    Hope im in the right forum this time.

    I have an wpf app project and a setup project.  installs and runs fine on my Windows 7 64-bit machine. But i tried it on a friends windows 7 64-bit machine. It installs fine but when i try to run it the processes shows up briefly in the process list and then exits with no errors or anything else to go on. Can i get the software to log runtime or anything else i can do. 

    Any ideas?

    thanks

    • Moved by RobinDotNetMVP Wednesday, June 15, 2011 7:37 AM wrong forum (From:ClickOnce and Setup & Deployment Projects)
    Friday, June 03, 2011 11:53 AM

All replies

  • You can try modifying your application to create a log. This way you can determine what actually fails.

    Also, you should improve your application error handling. Test the result of each function and show notifications or error messages for unexpected results.


    Cosmin Pirvu
    Friday, June 03, 2011 12:26 PM
  • Did you check the Windows Event Viewer after running your application on that machine?

    If no clues there, you can try additional quick troubleshooting by running your application when Sysinternals' ProcessMonitor (or DebugView) are running in the background, or even from depends.exe (http://www.dependencywalker.com/) in profile mode. Sometimes that is too much information though (and sometimes depends.exe can be misleading).

     

    Friday, June 03, 2011 4:03 PM
  • Thank you,

    ill try those apps and post the results or further issues.

    Friday, June 03, 2011 10:07 PM
  • Hi,

    You would need to ensure if it is a deployment issue first.

    You can just copy the output files to the end user, and then run it, to see if it can work, if not, then it is not a deployment issue, and it would be your application problem. If it is an application problem, then you can add a try catch block to the code to catch the exception and analysis it.

    You also can print something after you execute a code line in the files, then you can know while code line is the root cause after you deployed it.

    And if it is not a deployment issue, and is a wpf issue, then you will ask the question in wpf forum.

     

    If the first step succeed, then you can use the msiexec command to log the installation, to ensure if there's any problem while you install the application.

    msiexec /i Example.exe /L* logfile.txt

    Please also test those steps in the other pc systems to see if the issue just in one pc system, to preclude the system environments problem.

    To use the event viewer also can help you collect more valuable information to help you troubleshooting this issue.

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 06, 2011 11:56 AM
    Moderator
  • Hi mrschh,
    I am writing to check the status of the issue on your side. 
    What about this problem now? 
    Would you mind letting us know the result of the suggestions?
    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 09, 2011 2:57 PM
    Moderator
  • Hello again, sry ive been unable to access the system with the problems.

    But now i got at it and yes your right its not a delpoyment issue, its a problem with my app. But it ran fine on my development system but not here.

    Event viewer tells me this. Cant find anywhere to submit logfiles so ill just paste it in the post.

     

    EVENT 1026

    Application: NäringsKollen.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: System.Windows.Markup.XamlParseException

    Stack:

       at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)

       at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)

       at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)

       at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)

       at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)

       at System.Windows.Application.LoadComponent(System.Uri, Boolean)

       at System.Windows.Application.DoStartup()

       at System.Windows.Application.<.ctor>b__1(System.Object)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

       at System.Windows.Threading.DispatcherOperation.InvokeImpl()

       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)

       at System.Threading.ExecutionContext.runTryCode(System.Object)

       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)

       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

       at System.Windows.Threading.DispatcherOperation.Invoke()

       at System.Windows.Threading.Dispatcher.ProcessQueue()

       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

       at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)

       at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)

       at System.Windows.Threading.Dispatcher.Run()

       at System.Windows.Application.RunDispatcher(System.Object)

       at System.Windows.Application.RunInternal(System.Windows.Window)

       at System.Windows.Application.Run(System.Windows.Window)

       at System.Windows.Application.Run()

       at NäringsKollen.App.Main()

     

    EVENT 1000

    Faulting application name: NäringsKollen.exe, version: 1.0.0.0, time stamp: 0x4dd5a3fe

    Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time stamp: 0x4ce7b8f0

    Exception code: 0xe0434352

    Fault offset: 0x0000b760

    Faulting process id: 0x1648

    Faulting application start time: 0x01cc2944e934ce8c

    Faulting application path: C:\Program Files\RobSoft\NäringskollenSetup\NäringsKollen.exe

    Faulting module path: C:\Windows\system32\KERNELBASE.dll

    Report Id: 27109016-9538-11e0-853c-001d603c76fa

    Cant see how its a coding issue, that being my code generating this. Only thing ive edited myself is the app.config xml with my connectionstring, but that isnt xaml and its never used in the code. I have a static connectionstring wich is the only thing this file contains

    As i understand it, it happens during the autogenerated ui xaml code parsing, so maybe its best to enclose initialize component calls in try catch clauses in the future. 

    Thanks



    Sunday, June 12, 2011 9:30 PM
  • I think the WPF forum will be helpful to you, if you also cannot solve your issue through my suggestion in this post:

    http://social.msdn.microsoft.com/Forums/en-US/wpf/threads

     

    Maybe there're some string or file path is not valid in your code or other files. So you would need to pay more attention on those places.

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 13, 2011 8:21 AM
    Moderator
  • Should i repost or will you move the thread?

     

     

    Monday, June 13, 2011 10:32 AM
  • It is better you post a new thread to that forum.

    Then more and more peoples will pay more attention on it.

     

    Best wishes,


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, June 14, 2011 7:53 AM
    Moderator
  • I'll move the thread to the WPF forum. If it is unanswered, people will see it.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Wednesday, June 15, 2011 7:36 AM
  • And have you tried my suggestions to do a check on the string values?

     


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 15, 2011 9:39 AM
    Moderator