User:Zai Lynch/SCQ

From Second Life Wiki
Jump to: navigation, search

What is this about?

I need to say that I'm not familiar with C++ or the source code of the client. Nevertheless, I wanted to try to patch this bug I reported (VWR-10829) since I figured that it should only be a typo in the code and therefor easy to fix.

So I downloaded the source code for the Linux build RC-1.22.9 and searched for PLAY with this query

 find . -type f -name "*" -print0 | xargs -0 grep -in "play" > ~/_play

Then I started to have a look at my findings, scrolled through the long list until I stumbled upon

./indra/test/io.cpp:953:			new LLPipeStringInjector("suckers never play me"));

I was kinda confused about this output and it distracted me of my initial goal to patch the bug... It lead me to search for similar strings within the viewer. Especially for cuss words. What I found made me either laugh or shiver (^_^)

This page provides some of my findings. I commented to some with rather unqualified notes. Please don't take them serious :p I really enjoyed these little easter eggs! Hope you do so too ^^

Source Code Quotes

./indra/newview/llvovolume.cpp:213:				// Well, crap, there's something bogus in the data that we're unpacking.
./indra/llmath/llcamera.h:124:	frustum_plane mAgentPlanes[7];  //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP

Look at the date of this one:

./indra/lscript/lscript_library/lscript_library.cpp:44:// function in the middle will lead to many sim crashes. Phoenix 2006-04-10.
./indra/llcommon/llerror.cpp:1186:			// Loop forever, in case the crash didn't work?

wait... the crash didn't work? They wanted it to crash?

./indra/newview/llappviewer.cpp:1319:	removeMarkerFile(); // Any crashes from here on we'll just have to ignore
./indra/llrender/llpostprocess.cpp:121:	//this will cause system to crash at second time login

hm... ok

./indra/newview/llappviewer.cpp:1819:	// If we have specified crash on startup, set the global so we'll trigger the crash at the right time

Now it really didn't surprise me anymore that I crashed at times... ^_^ It seems to be a feature!

./indra/newview/llpreviewscript.cpp:1251:// Save needs to compile the text in the buffer. If the compile
./indra/newview/llpreviewscript.cpp:1252:// succeeds, then save both assets out to the database. If the compile
./indra/newview/llpreviewscript.cpp:1253:// fails, go ahead and save the text anyway so that the user doesn't
./indra/newview/llpreviewscript.cpp:1254:// get too fucked.
./indra/newview/llviewerobject.cpp:4367:		if(!queue) // stop any current sound first to avoid "farts of doom" (SL-1541) -MG

I'll not ask about "farts of doom" since I don't want to know!

./indra/llmath/v3color.h:188:# pragma warning( disable : 4996 ) // strncpy teh sux0r

1337 5P34K ftw!

./indra/llwindow/llwindowmacosx.cpp:1433:		// Mozilla sometimes changes our port origin.  Fuckers.

Err... better not tell Mitch ^^

The following two sound like they could be part of some action movie:

./indra/llmath/lloctree.h:398:		//none of the children have it, let's just brute force this bastard out
./indra/newview/llappviewer.cpp:763:		// can't use an alert here since we're existing and
./indra/newview/llappviewer.cpp:763:		// all hell breaks lose.
./indra/newview/llpaneldirplaces.cpp:66:	// This is wrong on many levels and scares the hell out of me.

erm... I dunno what's wrong there, but when even the programmer is scared...

./indra/llmessage/lltransfersourceasset.cpp:133:		// Crap, read failure, need to deal with it.
./indra/llrender/llfontgl.cpp:961:			// Handle crappy embedded hack
./indra/llcommon/llapp.h:200:	// WARNING!  This callback is run from the signal handler due to the extreme crappiness of
./indra/llcommon/llapp.h:201:	// Linux threading requiring waitpid() to be called from the thread that spawned the process.
./indra/llcommon/llapp.h:202:	// At some point I will make this more behaved, but I'm not going to fix this right now - djs

To bad this one has no date... I'd be curious ^^

./indra/newview/llviewerobject.cpp:2940:		// _damn_, what a nice monitor!

TY! =)

./indra/llaudio/vorbisdecode.cpp:272:	// FUCK!!! Vorbis encode/decode messes up loop point transitions (pop)
./indra/llui/llmenugl.h:307:// FUCKING EFFICIENT, because it may need to be checked a lot.


./indra/newview/llpreviewscript.cpp:951:		// *FIX: This fucked up little hack is here because we don't
./indra/newview/llpreviewscript.cpp:952:		// have a grep library. This is very brittle code.

Eeeps... better call Mc Hammer to keep track of that one...

./scripts/                # I hate shell escaping.
./indra/llcommon/llstring.cpp:844:	std::string s11( "monkey in the middle", 7, 2 );

o.O ?

./indra/llmessage/llnamevalue.cpp:128:		// WRONG! - this is a poorly implemented and incomplete escape
./indra/llcharacter/lljointsolverrp3.h:44:// This class is a "poor man's" IK for simple 3 joint kinematic chains.
./indra/newview/llvoiceclient.cpp:1645:		// So retarded.  Windows requires that the second parameter to CreateProcessA be a writable (non-const) string...

err... I downloaded the LINUX viewer... Why worry about Windows?

./indra/lscript/lscript_execute/lscript_execute.cpp:509:			llwarns << "Shit, somehow got an event that we're not registered for!" << llendl;

That's not good, huh?

./indra/llmessage/lltaskname.h:40:// 2) Add display code to LLStupidObject::render2(LLAgent* agentp) in llstupidobject.cpp

Uhm... llstupidobject.cpp? You're serious?

./indra/llmessage/llcircuit.h:99:	// Public because stupid message system callbacks uses it.
./indra/llmessage/llcircuit.h:335:	// HACK - this should become protected eventually, but stupid !@$@# message system/circuit classes are jumbling things up.
./indra/lscript/lscript_library/lscript_alloc.cpp:232:			// make sure we aren't about to be stupid
./indra/llinventory/lltransactionflags.h:52:// stupid helper functions which should be replaced with some kind of
./indra/llinventory/lltransactionflags.h:53:// internationalizeable message.
./indra/llrender/llgl.h:66:	void initWGL(); // Initializes stupid WGL extensions
./indra/llcommon/llprocessor.cpp:563:				default:		// Silly stupid never used failsave option

Silly, stupid and never used... errr...

./indra/newview/llagent.cpp:5340:			//stupid message system doubles up the "body"s
./indra/newview/llpanelavatar.cpp:2281:	// slow and stupid, but it's late


./indra/newview/llviewerprecompiledheaders.h:54:// Work around stupid Microsoft STL warning

Still on a Linux build...

./indra/lib/python/indra/util/    # and used in a .bat file - yeah, it sucks, but this is the simplest...
./indra/llmath/llline.cpp:67:// the accuracy of this method sucks when you give it two nearly
./indra/llmath/llline.cpp:68:// parallel lines, so you should probably check for parallelism
./indra/llmath/llline.cpp:69:// before you call this
./indra/test/inventory.cpp:402:// exportFileXML seg-faults for some reason. LLXMLNode is teh suck.
./indra/test/llsaleinfo_tut.cpp:169:// LLXMLNode is teh suck.

What ever LLXMLNode is, it doesn't seem to be good...

./indra/newview/llappviewer.cpp:1215:	// Destroy the UI


./indra/newview/llviewerwindow.cpp:1628:	// TODO: Eliminate magic constants - please used named constants if changing this - don't be a programmer hater

Yeah, remember the tao, damnit!

./indra/llmessage/llthrottle.cpp:149:// This is a HACK and should be dealt with more properly on
./indra/llmessage/llhttpassetstorage.cpp:966:					////HACK (probably) I am sick of this getting requeued and driving me mad.
./indra/llmessage/llxfer_vfile.cpp:338:// hacky - doesn't matter what this is

oh well we got code and as long as it's hacky... who cares what the code is about ^_^

./indra/llmessage/llcircuit.h:335:	// HACK - this should become protected eventually, but stupid !@$@# message system/circuit classes are jumbling things up.
./indra/llmessage/message.cpp:2062:			// HACK HACK HACK HACK HACK!
./indra/llmessage/llcachename.cpp:633:		// COUNTER-HACK to combat James' HACK in exportFile()...

↑ That's one of my favourites ^^

./indra/llwindow/llwindowmacosx.cpp:207:// MBW -- HACK ALERT
./indra/llui/llbutton.cpp:634:		//FUGLY HACK FOR "DEPRESSED" BUTTONS

depressed buttons...

./indra/llcrashlogger/llcrashlogger.cpp:230:		// This is a 'little' hacky, but its the best simple solution.
./indra/llrender/llfontgl.cpp:961:			// Handle crappy embedded hack
./indra/llrender/llglslshader.cpp:100:	//hack to make apple not complain
./indra/llcommon/llstring.h:437:// Hack - used for evil notecards.

What's an evil notecard?

./indra/newview/llvoiceclient.cpp:1149:		// HACK: THIS DOES NOT BELONG HERE

err... where does it belong? Why is it still there?

./indra/newview/skins/silver/xui/en-us/panel_status_bar.xml:90:  <!-- Totally unsexy button hack to get a sexy bevel for sexy search bevel -brent -->


./indra/llimagej2coj/llimagej2coj.cpp:288:		// Awful hacky cast, too lazy to copy right now.

And I'm to lazy to quote more of the source code ^_^