Okay, after I got an offscreen OpenGL context & math syncing working in the multithreaded loadingstage, now comes the exceptions handling.
I modularized the exception handling, so now both the mainthread and the workerthreads use the same try..catch.
My problem is now if I just catch an exception in the workerthread, the mainthread hangs and shows a crash-report. So the solution is to quit all threads and to show the crash/content_error report in the mainthread. Doing so isn't easy AFAIK. The only solution I see is too use execlp, but that would need a new binary (or new arguments for binary, so you can launch it to just display the error-report).
This seems a bit dirty, so are there better ways and how does GML handle this situations?
Why does the main thread hang and show a crash report? Hang I can understand (sync, barriers etc), but not the crash.
I would probably try to interrupt all other threads (makes them throw boost::thread_interrupted) in the exception handler and then let the threads exit cleanly while the main thread does some error output.
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum