Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

[BUG-6351] Crash on skinned, texture animated geometry with deferred rendering enabled. #14220

Closed
2 tasks
sl-service-account opened this issue Jun 13, 2014 · 7 comments

Comments

@sl-service-account
Copy link

sl-service-account commented Jun 13, 2014

Steps to Reproduce

Rendering the scene.

Actual Behavior

Viewer crashes in either of two different locations when the user has advanced lighting enabled while a piece of skinned geometry with a normal map and texture animation.

Expected Behavior

Not crashing.

Other information

In llrender/llrender.h

	typedef enum
	{
		MM_MODELVIEW = 0,
		MM_PROJECTION,
		MM_TEXTURE0,
		MM_TEXTURE1,
		MM_TEXTURE2,
		MM_TEXTURE3,
		NUM_MATRIX_MODES,
		MM_TEXTURE
	} eMatrixMode;

The last two should be swapped, this leads to an assert of x < NUM_MATRIX_MODES in one location, and a segfault in another due to an array having a size of NUM_MATRIX_MODES, and MM_TEXTURE going out of bounds.

Fixing this enum has resolved the crash issue completely to my knowledge.

Attachments

Links

Related

Original Jira Fields
Field Value
Issue BUG-6351
Summary Crash on skinned, texture animated geometry with deferred rendering enabled.
Type Bug
Priority Unset
Status Closed
Resolution Accepted
Reporter Moy Loon (moy.loon)
Created at 2014-06-13T06:38:33Z
Updated at 2020-04-20T17:00:46Z
{
  'Business Unit': ['Platform'],
  'Date of First Response': '2014-06-13T11:16:27.511-0500',
  "Is there anything you'd like to add?": 'In llrender/llrender.h\r\n\r\n\r\n\ttypedef enum\r\n\t{\r\n\t\tMM_MODELVIEW = 0,\r\n\t\tMM_PROJECTION,\r\n\t\tMM_TEXTURE0,\r\n\t\tMM_TEXTURE1,\r\n\t\tMM_TEXTURE2,\r\n\t\tMM_TEXTURE3,\r\n\t\tNUM_MATRIX_MODES,\r\n\t\tMM_TEXTURE\r\n\t} eMatrixMode;\r\n\r\n\r\nThe last two should be swapped, this leads to an assert of x < NUM_MATRIX_MODES in one location, and a segfault in another due to an array having a size of NUM_MATRIX_MODES, and MM_TEXTURE going out of bounds.\r\n\r\nFixing this enum has resolved the crash issue completely to  my knowledge.',
  'System': 'SL Viewer',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'Viewer crashes in either of two different locations when the user has advanced lighting enabled while a piece of skinned geometry with a normal map and texture animation.',
  'What were you doing when it happened?': 'Rendering the scene.',
  'What were you expecting to happen instead?': 'Not crashing.',
}
@sl-service-account
Copy link
Author

Alexa Linden commented at 2014-06-13T16:16:28Z

Can you please attach your logs the next time you experience this crash? http://community.secondlife.com/t5/English-Knowledge-Base/How-to-report-a-bug/ta-p/733545#Section_.3

@sl-service-account
Copy link
Author

Moy Loon commented at 2014-06-13T19:45:08Z

The logs would just say that you'd have an assertion failed at llrender.cpp:1474
Or you'd just crash to desktop with a segfault.

I compile myself and I fixed the enum order and so I haven't crashed since.

@sl-service-account
Copy link
Author

Grumpity ProductEngine commented at 2014-06-13T22:07:32Z

Thanks Moy!

@sl-service-account
Copy link
Author

Whirly Fizzle commented at 2014-06-13T22:08:38Z

This crash reproduces for me on default release: Second Life 3.7.8 (289922) May 9 2014 17:10:49 (Second Life Release)

Logs attached.
Crash reports sent in from avatar Kippy Adored

Callstack:

> secondlife-bin.exe!glh::ns_float::matrix4::set_value(float * mp)  Line 500 + 0x5 bytes C++
  secondlife-bin.exe!LLRender::loadMatrix(const float * m)  Line 1432 C++
  secondlife-bin.exe!LLDrawPoolAvatar::renderRigged(LLVOAvatar * avatar, unsigned int type, bool glow)  Line 1855 C++
  secondlife-bin.exe!LLDrawPoolAvatar::renderAvatars(LLVOAvatar * single_avatar, int pass)  Line 1419 C++
  secondlife-bin.exe!LLDrawPoolAvatar::render(int pass)  Line 531 C++
  secondlife-bin.exe!LLDrawPoolAvatar::renderPostDeferred(int pass)  Line 402 C++
  secondlife-bin.exe!LLPipeline::renderGeomPostDeferred(LLCamera & camera, bool do_occlusion)  Line 4783 + 0xb bytes C++
  secondlife-bin.exe!LLPipeline::renderDeferredLighting()  Line 9039 C++
  secondlife-bin.exe!display(int rebuild, float zoom_factor, int subfield, int for_snapshot)  Line 1020 C++
  secondlife-bin.exe!LLAppViewer::mainLoop()  Line 1453 + 0x21 bytes C++
  secondlife-bin.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow)  Line 325 C++
  secondlife-bin.exe!__tmainCRTStartup()  Line 547 + 0x1c bytes C
  kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes 
  ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes 
  ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes

Testing system:

Second Life 3.7.8 (289922) May  9 2014 17:10:49 (Second Life Release)
Release Notes

CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (3491.96 MHz)
Memory: 16268 MB
OS Version: Microsoft Windows 7 64-bit Service Pack 1 (Build 7601)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce GTX 750/PCIe/SSE2

Windows Graphics Driver Version: 9.18.0013.3788
OpenGL Version: 4.4.0

libcurl Version: libcurl/7.24.0 OpenSSL/0.9.8q zlib/1.2.5
J2C Decoder Version: KDU v7.0
Audio Driver Version: FMOD Ex 4.44.31
Qt Webkit Version: 4.7.1 (version number hard-coded)
Voice Server Version: Not Connected
Built with MSVC version 1600

Repro coming shortly....

@sl-service-account
Copy link
Author

Whirly Fizzle commented at 2014-06-13T22:09:51Z

Repro not needed aparantly :D

@sl-service-account
Copy link
Author

Whirly Fizzle commented at 2014-06-14T06:44:21Z

@grumpity @moy

I built viewer-release tip with Moy's change and this fixes the crash for me when ALM is enabled and shadows are disabled.
But as soon as I enable shadows, the viewer crashes to desktop.

Callstack:

>	secondlife-bin.exe!glh::ns_float::matrix4::set_value(float * mp)  Line 500 + 0x5 bytes	C++
 	secondlife-bin.exe!LLRender::loadMatrix(const float * m)  Line 1432	C++
 	secondlife-bin.exe!LLDrawPoolAvatar::renderRigged(LLVOAvatar * avatar, unsigned int type, bool glow)  Line 1855	C++
 	secondlife-bin.exe!LLDrawPoolAvatar::renderAvatars(LLVOAvatar * single_avatar, int pass)  Line 1419	C++
 	secondlife-bin.exe!LLDrawPoolAvatar::render(int pass)  Line 531	C++
 	secondlife-bin.exe!LLDrawPoolAvatar::renderPostDeferred(int pass)  Line 402	C++
 	secondlife-bin.exe!LLPipeline::renderGeomPostDeferred(LLCamera & camera, bool do_occlusion)  Line 4783 + 0xb bytes	C++
 	secondlife-bin.exe!LLPipeline::renderDeferredLighting()  Line 9039	C++
 	secondlife-bin.exe!display(int rebuild, float zoom_factor, int subfield, int for_snapshot)  Line 1020	C++
 	secondlife-bin.exe!LLAppViewer::mainLoop()  Line 1453 + 0x21 bytes	C++
 	secondlife-bin.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow)  Line 325	C++
 	secondlife-bin.exe!__tmainCRTStartup()  Line 547 + 0x1c bytes	C
 	kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes	
 	ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes	
 	ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes	

@sl-service-account
Copy link
Author

Whirly Fizzle commented at 2015-01-25T21:51:01Z

@grumpity
Is this crash supposed to be fixed in current default release (Second Life 3.7.24 (297623) Dec 19 2014 06:55:47 (Second Life Release))?
I can still reproduce it - I just got bitten by it when poking at BUG-8249

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant