VintFalken.com

Stop high-res snapshot crashes!

July 1, 2007 3:14 pm

The High-Res Snapshot Bug (Vint speak)

Hi Vint
You don’t know me but I thought you might be interested in a bug I recently found in the SL viewer. It causes the viewer to crash if you take a large number of high-res snapshots. On my machine the number is exactly 41 - taking the 42nd high-res snapshot will crash the viewer every time.

Hi! I just looked at your Flickr stream, so I feel like I ‘know you a bit’. ;)

So if you’ve noticed that you crash sometimes when taking a lot of high-res snapshots, you’re probably seeing the same issue.

I just always figured that was me/the pc. I don’t know at which shot I crash, though. I do know that it’s always exactly when I’m about to get the ‘perfect shot’! ;)

Anyway, the good news is that there is an easy fix which I’ve submitted to the SL bug tracking system (JIRA). If you’d like to see this bug fixed, you can ‘vote’ for it on JIRA. This makes it more likely that the Lindens will put the fix into the official viewer.

Woot! Let’s get this thing fixed then! Euhm… let the Lindens fix it. Hey?! Why can I vote only once!?! *sobs* Maybe some of the others can vote on ‘VWR-1465 - Viewer crash after taking several hi-res snapshots‘ too? *Looks very kind at the people reading this.*

If you don’t get the crashes, then just forget I said anything :-)

Hmmm. My Second Life motto: Memento Crashi! ;)

Best wishes
Epony

The High-Res Snapshot Bug (LSL Speak)

After taking a number of hi-res snapshots (always 41 on my system), the taking of the next hi-res snapshot crashes the viewer.

The problem is leaking of font objects when LLFont::loadFace() is called multiple times on the same LLFont object, which eventually causes calls to FT_New_Face() to fail, and therefore a subsequent crash in LLFont::renderGlyph() when trying to use a NULL mFTFace.

An easy way to see the problem without going as far as the crash is to monitor the Windows handles for the viewer process. On my system the handle count increases by 12 for each snapshot.

The attached patch fixes the problem by reusing the existing font object (mFTFace) if it has already been initialized. (An alternative fix would be to destroy and recreate the font object, but that doesn’t appear to be necessary.)

8 Responses to “Stop high-res snapshot crashes!”

Erbo Evans wrote a comment on July 1, 2007
MyAvatars 0.2

I’m in favor of bugfixes. Voted.

Tinsel Silvera wrote a comment on July 1, 2007
MyAvatars 0.2

Hey Vint! So 42 is the magic number, huh? Sounds like a Hitchhiker’s Guide to the Galaxy bug to me. I’m at FL work right now but when I get home I’ll log in and give you a JIRA vote. Hey wait a minute! Isn’t that the second vote I have given you today {:o) Take care.

Nock Forager wrote a comment on July 1, 2007
MyAvatars 0.2

“Answer to Life, the Universe, and Everything”? quite interesting. So we live in Second Life to get those answers? LOL. and I voted :-)

EponymousDylan Ra wrote a comment on July 2, 2007
MyAvatars 0.2

Thanks Vint! And thanks to everyone who has voted :-)

BTW If any of you use the Nicholaz viewer, the latest release includes this fix:

http://nicholaz-beresford.blogspot.com/2007/07/release-nicholaz-edition-17g.html

EponymousDylan Ra wrote a comment on July 2, 2007
MyAvatars 0.2

Good news - the fix has now been applied internally at Linden Labs, so should be in an official viewer soon. Your votes obviously got their attention :-) Thanks again.

Vint Falken wrote a comment on July 2, 2007
MyAvatars 0.2

Eponymous, NP. I benefit from this fix too. ;)

Jeeej! (<- joy)

All the votes? Like… all 10? ;)

Gaynor Gritzi wrote a comment on July 3, 2007
MyAvatars 0.2

I’d been getting this since day one in SL.
Let’s hope the fix works.

CodeBastard Redgrave wrote a comment on July 3, 2007
MyAvatars 0.2

oooooh i totally noticed that bug, but never happened to notice that 42 was the magic number! you rawk Vint! =)

Codie

Care to comment?