summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappviewer.cpp6
-rw-r--r--indra/newview/llappviewer.h1
-rw-r--r--indra/newview/llviewermenu.cpp55
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml12
4 files changed, 47 insertions, 27 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 0d80ab543e..680ce209ea 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -5566,12 +5566,6 @@ void LLAppViewer::forceErrorDriverCrash()
glDeleteTextures(1, NULL);
}
-void LLAppViewer::forceErrorCoroutineCrash()
-{
- LL_WARNS() << "Forcing a crash in LLCoros" << LL_ENDL;
- LLCoros::instance().launch("LLAppViewer::crashyCoro", [] {throw LLException("A deliberate crash from LLCoros"); });
-}
-
void LLAppViewer::forceErrorThreadCrash()
{
class LLCrashTestThread : public LLThread
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 271307f2a3..c057bd82ef 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -154,7 +154,6 @@ public:
virtual void forceErrorInfiniteLoop();
virtual void forceErrorSoftwareException();
virtual void forceErrorDriverCrash();
- virtual void forceErrorCoroutineCrash();
virtual void forceErrorThreadCrash();
// The list is found in app_settings/settings_files.xml
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 01a4bd587d..92bca90aeb 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -33,10 +33,11 @@
#include "llviewermenu.h"
// linden library includes
-#include "llavatarnamecache.h" // IDEVO
+#include "llavatarnamecache.h" // IDEVO (I Are Not Men!)
+#include "llcombobox.h"
+#include "llcoros.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
-#include "llcombobox.h"
#include "llinventorypanel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
@@ -2379,6 +2380,7 @@ class LLAdvancedForceErrorLlerror : public view_listener_t
return true;
}
};
+
class LLAdvancedForceErrorBadMemoryAccess : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -2388,6 +2390,22 @@ class LLAdvancedForceErrorBadMemoryAccess : public view_listener_t
}
};
+class LLAdvancedForceErrorBadMemoryAccessCoro : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLCoros::instance().launch(
+ "AdvancedForceErrorBadMemoryAccessCoro",
+ [](){
+ // Wait for one mainloop() iteration, letting the enclosing
+ // handleEvent() method return.
+ llcoro::suspend();
+ force_error_bad_memory_access(NULL);
+ });
+ return true;
+ }
+};
+
class LLAdvancedForceErrorInfiniteLoop : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -2406,6 +2424,22 @@ class LLAdvancedForceErrorSoftwareException : public view_listener_t
}
};
+class LLAdvancedForceErrorSoftwareExceptionCoro : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLCoros::instance().launch(
+ "AdvancedForceErrorSoftwareExceptionCoro",
+ [](){
+ // Wait for one mainloop() iteration, letting the enclosing
+ // handleEvent() method return.
+ llcoro::suspend();
+ force_error_software_exception(NULL);
+ });
+ return true;
+ }
+};
+
class LLAdvancedForceErrorDriverCrash : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -2415,15 +2449,6 @@ class LLAdvancedForceErrorDriverCrash : public view_listener_t
}
};
-class LLAdvancedForceErrorCoroutineCrash : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- force_error_coroutine_crash(NULL);
- return true;
- }
-};
-
class LLAdvancedForceErrorThreadCrash : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -8150,11 +8175,6 @@ void force_error_driver_crash(void *)
LLAppViewer::instance()->forceErrorDriverCrash();
}
-void force_error_coroutine_crash(void *)
-{
- LLAppViewer::instance()->forceErrorCoroutineCrash();
-}
-
void force_error_thread_crash(void *)
{
LLAppViewer::instance()->forceErrorThreadCrash();
@@ -9330,10 +9350,11 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedForceErrorBreakpoint(), "Advanced.ForceErrorBreakpoint");
view_listener_t::addMenu(new LLAdvancedForceErrorLlerror(), "Advanced.ForceErrorLlerror");
view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccess(), "Advanced.ForceErrorBadMemoryAccess");
+ view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccessCoro(), "Advanced.ForceErrorBadMemoryAccessCoro");
view_listener_t::addMenu(new LLAdvancedForceErrorInfiniteLoop(), "Advanced.ForceErrorInfiniteLoop");
view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareException(), "Advanced.ForceErrorSoftwareException");
+ view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareExceptionCoro(), "Advanced.ForceErrorSoftwareExceptionCoro");
view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDriverCrash");
- view_listener_t::addMenu(new LLAdvancedForceErrorCoroutineCrash(), "Advanced.ForceErrorCoroutineCrash");
view_listener_t::addMenu(new LLAdvancedForceErrorThreadCrash(), "Advanced.ForceErrorThreadCrash");
view_listener_t::addMenu(new LLAdvancedForceErrorDisconnectViewer(), "Advanced.ForceErrorDisconnectViewer");
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 073bdfc9bb..add89c4917 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2650,6 +2650,12 @@ function="World.EnvPreset"
function="Advanced.ForceErrorBadMemoryAccess" />
</menu_item_call>
<menu_item_call
+ label="Force Bad Memory Access in Coroutine"
+ name="Force Bad Memory Access in Coroutine">
+ <menu_item_call.on_click
+ function="Advanced.ForceErrorBadMemoryAccessCoro" />
+ </menu_item_call>
+ <menu_item_call
label="Force Infinite Loop"
name="Force Infinite Loop">
<menu_item_call.on_click
@@ -2668,10 +2674,10 @@ function="World.EnvPreset"
function="Advanced.ForceErrorSoftwareException" />
</menu_item_call>
<menu_item_call
- label="Force a Crash in a Coroutine"
- name="Force a Crash in a Coroutine">
+ label="Force Software Exception in Coroutine"
+ name="Force Software Exception in Coroutine">
<menu_item_call.on_click
- function="Advanced.ForceErrorCoroutineCrash" />
+ function="Advanced.ForceErrorSoftwareExceptionCoro" />
</menu_item_call>
<menu_item_call
label="Force a Crash in a Thread"