Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
QDS Berlin - 2024 Week 29/30, QDS Berlin - 2024 Week 31/32, QDS Berlin - 2024 Week 33/34, QDS Berlin - 2024 Week 35/36, QDS Berlin - 2024 Week 37/38, QDS Berlin - 2024 Week 39/40, QDS Berlin - 2024 Week 41/42
Description
Add environment variable CRASH_PUPPET_BETTWEEN_SECONDS
void crash() { int *ptr = nullptr; *ptr = 42; // boom } void setupCrashTimer() { // Umgebungsvariable auslesen bool ok; int crashTimeApprox = qEnvironmentVariableIntValue("CRASH_PUPPET_APPROXIMATE_SECONDS", &ok); if (!ok) return; // use random time, so not all puppets are crashing at the same time std::srand(std::time(nullptr) + QCoreApplication::applicationPid()); int randomOffset = std::rand() % 10; int crashTime = crashTimeApprox + randomOffset; QTimer::singleShot(crashTime * 1000, QCoreApplication::instance(), &crash); } int main(int argc, char *argv[]) { QApplication a(argc, argv); setupCrashTimer(); MainWindow w; w.show(); return a.exec(); }
Attachments
Issue Links
- relates to
-
QDS-10087 qml2puppet debug information need to uploaded to sentry automatically
- Closed