diff --git a/README.md b/README.md index c474d4d..df216ea 100644 --- a/README.md +++ b/README.md @@ -320,3 +320,19 @@ Tune your MIDI software to send only one of the two signals, either ok button pr - The code is based on the *SwitcherPanel*-Democode (Version 3.5) provided by Blackmagic. - [VVOSC](http://code.google.com/p/vvopensource/) is used as OSC-framework. - Program icon based heavily on the ATEM Software Control icon by [Blackmagic Design](http://www.blackmagicdesign.com). + + ---------- + +## Developer Resources + +### Find what line a crash occured on given a crash report (on MacOS) + +People like to send crash reports in issues. You can use this method to find out which line of the program crashed from just the crash report and version number. + +1. Download the `atemOSC.debug.zip` file associated with the release that crashed and unzip it +2. At a command line, `cd` into the unzipped folder (Usually `~/Downloads/atemOSC.debug`) +3. Copy the crash report into a file (e.g. `crash.log`) and save it to the unzipped folder +4. Copy the `find_crash` bash script from the root of this repository into that folder as well +5. Run `./find_crash crash.log`, replacing `crash.log` with whatever your crash report file is named +6. The script should tell you which line in which file caused the crash + diff --git a/atemOSC/AppDelegate.mm b/atemOSC/AppDelegate.mm index e63064d..790dd8d 100644 --- a/atemOSC/AppDelegate.mm +++ b/atemOSC/AppDelegate.mm @@ -527,7 +527,7 @@ - (void)switcherConnected // Audio Inputs IBMDSwitcherFairlightAudioInputIterator* audioInputIterator = NULL; - if (SUCCEEDED(mAudioMixer->CreateIterator(IID_IBMDSwitcherFairlightAudioInputIterator, (void**)&audioInputIterator))) + if (SUCCEEDED(mFairlightAudioMixer->CreateIterator(IID_IBMDSwitcherFairlightAudioInputIterator, (void**)&audioInputIterator))) { IBMDSwitcherFairlightAudioInput* audioInput = NULL; while (S_OK == audioInputIterator->Next(&audioInput)) diff --git a/find_crash b/find_crash new file mode 100755 index 0000000..dd15af2 --- /dev/null +++ b/find_crash @@ -0,0 +1,7 @@ +#!/bin/bash + +# Usage: ./find_crash +crashed_thread=$(cat $1 | grep "Crashed Thread" | cut -d' ' -f3) +start_loc=$(cat $1 | grep "Binary Images" -A1 | grep -v Binary | cut -d' ' -f1) +crash_loc=$(cat $1 | grep "Thread $crashed_thread Crashed" -A1 | grep -v Thread | cut -d' ' -f3) +xcrun atos -o atemOSC.app.dSYM/Contents/Resources/DWARF/atemOSC -arch x86_64 -l $start_loc $crash_loc