tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_CrashTracer.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
18{
19 CrashStackTracer (const char* file, const char* fn, int line, const char* pluginName);
21
22 static juce::StringArray getCrashedPlugins();
23 static void dump();
24 static void dump (juce::OutputStream&);
25 static void dump (juce::OutputStream&, juce::Thread::ThreadID);
26
27 static juce::String getCrashedPlugin (juce::Thread::ThreadID);
28 static juce::String getCrashLocation (juce::Thread::ThreadID);
29
30 struct CrashTraceThreads;
31
32private:
33 const char* file;
34 const char* function;
35 const char* pluginName;
36 int line;
37 juce::Thread::ThreadID threadID;
38};
39
41#define CRASH_TRACER const CrashStackTracer JUCE_JOIN_MACRO (__crashTrace, __LINE__) (__FILE__, __FUNCTION__, __LINE__, nullptr);
42
44#define CRASH_TRACER_PLUGIN(p) const CrashStackTracer JUCE_JOIN_MACRO (__crashTrace, __LINE__) (__FILE__, __FUNCTION__, __LINE__, p);
45
46
47//==============================================================================
53{
56
57 static juce::String getAndClearLastMessage (PropertyStorage&);
58
59private:
60 const juce::File file;
61 static juce::File getDeadMansPedalFile (PropertyStorage&);
62};
63
64}} // namespace tracktion { inline namespace engine
Create a subclass of PropertyStorage to customize how settings are saved and recalled.
Used by the CRASH_TRACER macros to help provide a useful crash log of the stack.
This RAII class saves a property which will be reported at startup as a failure if the app disappears...