From 1b7c3dd126e427e84399763bd3b6e0840a5cc5c8 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Mon, 10 May 2010 18:47:10 +0200 Subject: add "Advanced > Crash" menu. --- linden/indra/newview/llviewermenu.cpp | 38 ++++++++++++++++++++++ .../skins/default/xui/en-us/menu_viewer.xml | 29 +++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index a0d3574..a71240d 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -10369,8 +10369,42 @@ class LLAdvancedDumpAvatarLocalTextures : public view_listener_t } }; +/////////// +// Crash // +/////////// +class LLAdvancedCrash : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + std::string command = userdata.asString(); + if ("deadbeefcrash" == command) + { + force_error_bad_memory_access(NULL); + } + else if ("llerrcrash" == command) + { + force_error_llerror(NULL); + } + else if ("infiniteloopcrash" == command) + { + force_error_infinite_loop(NULL); + } + else if ("drivercrash" == command) + { + force_error_driver_crash(NULL); + } + else if ("forcedisconnect" == command) + { + handle_disconnect_viewer(NULL); + } + + return true; + } + +}; + ///////////////// // MESSAGE LOG // ///////////////// @@ -11087,6 +11121,10 @@ void initialize_menus() addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); + // Advanced > Crash + addMenu(new LLAdvancedCrash(), "Advanced.Crash"); + + // Advanced > Network addMenu(new LLAdvancedEnableMessageLog(), "Advanced.EnableMessageLog"); addMenu(new LLAdvancedDisableMessageLog(), "Advanced.DisableMessageLog"); diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 425e2d4..00723cd 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1920,7 +1920,36 @@ + + + + + + + + + + + + + + + + + + -- cgit v1.1