summaryrefslogtreecommitdiff
path: root/src/debug/CrashReporter.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2023-02-27 12:32:38 +0000
committerGitHub <noreply@github.com>2023-02-27 12:32:38 +0000
commit8b81f41e52b55835aaaa7e4962af23a00188cbdc (patch)
treebca65923843ea931c0e0222f29d4e2901cfa8637 /src/debug/CrashReporter.cpp
parent74a10f26a469de54968e584525f6507928f615f0 (diff)
Plugin System (#1590)
--------- Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
Diffstat (limited to 'src/debug/CrashReporter.cpp')
-rw-r--r--src/debug/CrashReporter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/debug/CrashReporter.cpp b/src/debug/CrashReporter.cpp
index 5738f180..084e44ad 100644
--- a/src/debug/CrashReporter.cpp
+++ b/src/debug/CrashReporter.cpp
@@ -4,10 +4,13 @@
#include <execinfo.h>
#include <fstream>
+#include "../plugins/PluginSystem.hpp"
+
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/sysctl.h>
#endif
+
std::string getRandomMessage() {
const std::vector<std::string> MESSAGES = {"Sorry, didn't mean to...",
@@ -43,6 +46,16 @@ void CrashReporter::createAndSaveCrash() {
finalCrashReport += "Hyprland received signal 11 (SIGSEGV): Segmentation Fault\n\n";
+ if (!g_pPluginSystem->getAllPlugins().empty()) {
+ finalCrashReport += "Hyprland seems to be running with plugins. This crash might not be Hyprland's fault.\nPlugins:\n";
+
+ for (auto& p : g_pPluginSystem->getAllPlugins()) {
+ finalCrashReport += getFormat("\t%s (%s) %s\n", p->name.c_str(), p->author.c_str(), p->version.c_str());
+ }
+
+ finalCrashReport += "\n\n";
+ }
+
finalCrashReport += "System info:\n";
struct utsname unameInfo;