Skip to content

#4320 MacOS crash handling #4396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions indra/llcommon/workqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,22 @@ void LL::WorkQueueBase::callWork(const Work& work)
}
catch (...)
{
// Stash any other kind of uncaught exception to be rethrown by main thread.
LL_WARNS("LLCoros") << "Capturing and rethrowing uncaught exception in WorkQueueBase "
<< getKey() << LL_ENDL;

LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop");
main_queue->post(
// Bind the current exception, rethrow it in main loop.
[exc = std::current_exception()]() { std::rethrow_exception(exc); });
if (getKey() != "mainloop")
{
// Stash any other kind of uncaught exception to be rethrown by main thread.
LL_WARNS("LLCoros") << "Capturing and rethrowing uncaught exception in WorkQueueBase "
<< getKey() << LL_ENDL;

LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop");
main_queue->post(
// Bind the current exception, rethrow it in main loop.
[exc = std::current_exception()]() { std::rethrow_exception(exc); });
}
else
{
// let main loop crash
throw;
}
}
#endif // else LL_WINDOWS
}
Expand Down
3 changes: 2 additions & 1 deletion indra/newview/llappviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5696,7 +5696,8 @@ void LLAppViewer::forceExceptionThreadCrash()

void run()
{
throw std::exception();
const std::string exception_text = "This is a deliberate exception in a thread";
throw std::runtime_error(exception_text);
}
};

Expand Down
Loading