0

I am trying to run a c# application using WPF that runs in version 4.0, on an XP machine that has .NET 4.0 framework installed on it. It starts up, but then errors out afterwards during the InitliaizeComponent() method in the form load. Windows then displays the "Would you like to send an error report?".

How can I see or figure out what is exactly happening, so I can fix the issue? I tried looking at the error report, but it is mainly just win bin code, and means nothing in terms of the error to me.

EDIT:

Thanks for the advice to log it. I did so, and this is the error I am getting on the XP machine when running the deployed version.

'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '5' and line position '57'.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Casey ScriptFu Pharr
  • 1,672
  • 1
  • 16
  • 36
  • Add logging and catch exceptions for the log. The stack trace should at least help. Is there anything unusual in `InitializeComponent`? – xxbbcc Jan 05 '15 at 21:41
  • Check for an UnhandledException event (or something similar) on the AppDomain. Handle it, log it. If I guessed, this old XP box has a punk vidya card that isn't compatible with WPF. But that's a guess. –  Jan 05 '15 at 21:42
  • Not that I can see off hand, but I am still learning. Always am. I have never realy used the logging before, so I wil give that a try. I do have try catches around the area failing, but it does not show up on the deployed version. I am not debugging on the XP machine, it is the deployed version that is failing on XP. – Casey ScriptFu Pharr Jan 05 '15 at 21:43
  • You might check [this answer](http://stackoverflow.com/questions/450563/running-a-wpf-application-on-windows-xp) – rene Jan 05 '15 at 21:44
  • Yea, this company has so much legacy crap, they brought me in to upgrade to latest and best, but won't upgrade all their production machines. At the end of a development project, I was notified it had to also run on XP machines. WTH? Know what I mean... – Casey ScriptFu Pharr Jan 05 '15 at 21:45
  • Try to check the windows errors within the event viewer of the machine, you might find some clues of what's happening deep inside `InitializeComponent()` – Aram Tchekrekjian Jan 05 '15 at 21:48
  • Thanks to that error, I think I will try this answer out found here http://stackoverflow.com/questions/12833294/provide-value-on-system-windows-baml2006-typeconvertermarkupextension-threw-a – Casey ScriptFu Pharr Jan 05 '15 at 21:51
  • 1
    Why the down vote? Seriously? I am stating to get annoyed of "snooty" stack overflow users. Yes, we are all NOT guru's of the precise way of stack's social acceptance, and am really thinking about just dropping out of stack. It has become a competition of who is smarter and "politically correct" in their usage, rather then helping for some. Thanks to those who helped guide me on this one. Writing the error log was a good way to see the error. – Casey ScriptFu Pharr Jan 06 '15 at 03:15

1 Answers1

0

The issue was that I was using a .ico for the in the WPF title field. When I changed it to use a .png image, it then did not crash. Maybe it is an issue regarding video, or a bug. The answer from another question I posted in a prior comment resolved my issue. Now, I would like to test more, and see why it corrected the problem.

Casey ScriptFu Pharr
  • 1,672
  • 1
  • 16
  • 36