diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-31 02:24:14 +0300 | 
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-31 02:35:29 +0300 | 
| commit | dd2fe2687ce58c6f6ebf16b2d66ae797022076f6 (patch) | |
| tree | c75248333f92d1be02477737ca77aeb48aedf058 | |
| parent | 9b0569840f06137ee2379463f5028a5342c3555a (diff) | |
DRTVWR-544 post-merge fix (restored SL-14961)
| -rw-r--r-- | indra/newview/llappviewer.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llappviewer.h | 20 | ||||
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 6 | 
4 files changed, 34 insertions, 13 deletions
| diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5ec2b141ff..50ae72bbaa 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5518,6 +5518,12 @@ 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 1967ea6896..808af67d13 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -153,16 +153,16 @@ public:  	void removeMarkerFiles();  	void removeDumpDir(); -	// LLAppViewer testing helpers. -	// *NOTE: These will potentially crash the viewer. Only for debugging. -	virtual void forceErrorLLError(); -	virtual void forceErrorBreakpoint(); -	virtual void forceErrorBadMemoryAccess(); -	virtual void forceErrorInfiniteLoop(); -	virtual void forceErrorSoftwareException(); -	virtual void forceErrorDriverCrash(); -	virtual void forceErrorCoroutineCrash(); -	virtual void forceErrorThreadCrash(); +    // LLAppViewer testing helpers. +    // *NOTE: These will potentially crash the viewer. Only for debugging. +    virtual void forceErrorLLError(); +    virtual void forceErrorBreakpoint(); +    virtual void forceErrorBadMemoryAccess(); +    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  	// but since they are used explicitly in code, diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d32ad1fc10..e869d2dcc4 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2466,6 +2466,15 @@ 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) @@ -8216,6 +8225,11 @@ 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(); @@ -9397,6 +9411,7 @@ void initialize_menus()  	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 1801ccd432..8c38691852 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2673,10 +2673,10 @@ function="World.EnvPreset"                   function="Advanced.ForceErrorSoftwareException" />              </menu_item_call>              <menu_item_call -             label="Force Software Exception in Coroutine" -             name="Force Software Exception in Coroutine"> +             label="Force a Crash in a Coroutine" +             name="Force a Crash in a Coroutine">                  <menu_item_call.on_click -                 function="Advanced.ForceErrorSoftwareExceptionCoro" /> +                 function="Advanced.ForceErrorCoroutineCrash" />              </menu_item_call>              <menu_item_call               label="Force a Crash in a Thread" | 
