Windows: Create minidumps for threads terminated by exceptions #1285

Merged
merged 3 commits into from Sep 2, 2012

2 participants

@wsoltys
Team Kodi member

This is just a resurrection of #813. I had to move the writedump methods to XBApplicationEx.cpp because they wasn't caught in thread.cpp.
I've added quite some code duplication in XBApplicationEx.cpp because I didn't want to introduce new methods or goto's. Please comment if there's a better way.

@wsoltys
Team Kodi member

@jimfcarroll I've added some minidumps to thread.cpp as CrystalP did: wsoltys@fe6cc74 (somehow I can't see that yet in the pr). Do I still need the own catch routine there?

@jimfcarroll
Team Kodi member

I tried to take a quick look but didn't get far enough to understand more than what you're trying to do. I should be able to take a closer look over the weekend.

Just so you know, when I was working with CrystalP I added the abstract Exception handling so that you could plug in logging (minidump, etc) in the LogThrowMessage of the Win32Exception. I never heard back from him as to whether that worked for him.

@wsoltys
Team Kodi member

Thanks for looking into it. I forced a division by zero in a thread to test it but it was only caught in the default handler (...). After calling win32_exception::install_handler(); in CThread:action (see 1b436e6) it worked at least with the two catch's I've added.

@jimfcarroll
Team Kodi member

I want to do the same thing. where is a good place for the divide by zero?

@wsoltys
Team Kodi member

MP3Codec.cpp comment l60 and play a mp3 file :)

@wsoltys
Team Kodi member

note that for debugging the catch's in xbapplicationex are ifdef out that the ide catches the exception.

@wsoltys
Team Kodi member

okay, squashed and rebased with jcarrolls changes.

@wsoltys wsoltys merged commit c2b9d75 into xbmc:master Sep 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment