Difference between revisions of "LSL Write Once Debug Everywhere"

From Second Life Wiki
Jump to navigation Jump to search
(→‎Running Mac OS X: hackintosh)
 
(22 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Multi-lang}}{{LSL Header}}{{RightToc}}
{{LSL Header|ml=2}}{{RightToc}}


=Why Debug Everywhere=
=Why Debug Everywhere=
Line 7: Line 7:
Consequently, copying your LSL script from one place to another can then make your script fail to run well, or even fail to compile.
Consequently, copying your LSL script from one place to another can then make your script fail to run well, or even fail to compile.


The many places you can run your LSL script include the Linux, Mac OS X, and Windows clients from SecondLife.com that connect by broadband Internet to the main grid at Linden Labs. Other compilers and other grids also exist, for such purposes as looping thru the compile, edit, test process while offline.
The many places you can run your LSL script include the Linux, Mac OS X, and Windows clients from SecondLife.com that connect by broadband Internet to the main grid at Linden Lab. Other compilers and other grids also exist, for such purposes as looping thru the compile, edit, test process while offline.


This article explains how you can develop LSL scripts that run well and compile without error in all these many places.
This article explains how you can develop LSL scripts that run well and compile without error in all these many places.


=Works At My Desk=
=Works at my Desk=


Ways in which your script can run fine at your desk while choking at mine include the following.
Ways in which your script can run fine at your desk while choking at mine include the following.


==Astonishing compile-time error messages==
==Astonishing Compile-Time Error Messages==


The [[LSLEditorBugs]] article explains how a bug in an LSL compiler can make your script fail to compile in one place despite compiling and running well in another.
The [[LSLEditorBugs]] article explains how a bug in an LSL compiler can make your script fail to compile in one place despite compiling and running well in another.  


The [[LSL_Errors]] article explains how one LSL compiler reporting "ERROR : Syntax error" can mean what another LSL compiler would describe as "ERROR : Byte code assembly failed -- out of memory". Naturally, different LSL compilers provide different efficiencies. For example, the 2007-08 Mac OS X Second Life client could compile 692 cascaded else-if's at a time when the Windows Second Life client could not compile 19 cascaded else-if's.
The [[LSL_Errors]] article explains how one LSL compiler reporting "ERROR : Syntax error" can mean what another LSL compiler would describe as "ERROR : Byte code assembly failed -- out of memory". Naturally, different LSL compilers provide different efficiencies. For example, the 2007-08 Mac OS X Second Life client could compile 692 cascaded else-if's at a time when the Windows Second Life client could not compile 19 cascaded else-if's.
Line 41: Line 41:
The http://www.apple.com/macosx/bootcamp/ tool from Apple walks you thru the process of repartitioning your internal ATA hard drive without scrambling it, but only if you have an Intel-based Mac, not a Motorola-based Mac and not an Intel-based PC.
The http://www.apple.com/macosx/bootcamp/ tool from Apple walks you thru the process of repartitioning your internal ATA hard drive without scrambling it, but only if you have an Intel-based Mac, not a Motorola-based Mac and not an Intel-based PC.


Companies like [[Parallels|http://www.parallels.com/]] and [[VMware|http://www.vmware.com/]] sell you tools for running Windows in parallel with your usual operating system. You can even run Windows in parallel with itself, just to test different configurations without disrupting your normal Windows experience.
Companies like [http://www.parallels.com/ Parallels] and [http://www.vmware.com/ VMware] sell you tools for running Windows in parallel with your usual operating system. You can even run Windows in parallel with itself, just to test different configurations without disrupting your normal Windows experience.


==Running Linux==
==Running Linux==
Line 55: Line 55:


Searching the web finds a Linux CD-R Knoppix for Second Life, but only a version that requires NVIDIA graphics without supporting the ATI Radeon graphics often found in Mac's.
Searching the web finds a Linux CD-R Knoppix for Second Life, but only a version that requires NVIDIA graphics without supporting the ATI Radeon graphics often found in Mac's.
'''Update 2010/2011'''
As of 2010/2011, the above doesn't apply any more. While Linux remains an Operating System largely for users with at least intermediate general computer skills, great progress has been made in developing ''out-of-the-box'' Linux distributions. In particular, [http://www.ubuntu.com/ Ubuntu], as of at least 10.04, runs both the version 1.23 and version 2.x Second Life clients and major Third Party Viewers (I've tested Ascent, Imprudence and Pheonix) on fresh x86 and x86_64 installations without any further preparation or command-line fu.


==Running Mac OS X==
==Running Mac OS X==
Line 61: Line 65:


Mac OS X doesn't work at all if you don't have a Mac.
Mac OS X doesn't work at all if you don't have a Mac.
Well, that's not strictly true. There are Hackintoshes, but that's shady legal ground.


==Running Windows==
==Running Windows==
Line 68: Line 74:
The Windows installer's claim that you need administrator privilege to install appears to be false. People have seen copies of "C:\Program Files\SecondLife\" mostly work when dragged to into the "%userProfile%\Downloads\" of other Windows machines, without administrator privilege.
The Windows installer's claim that you need administrator privilege to install appears to be false. People have seen copies of "C:\Program Files\SecondLife\" mostly work when dragged to into the "%userProfile%\Downloads\" of other Windows machines, without administrator privilege.


=See Also=
=Also see=


See also: [[LSL Alternate Editors]], [[LSLEditorBugs]]
Also see: [[LSL Alternate Editors]], [[LSLEditorBugs]]

Latest revision as of 15:43, 29 April 2011

Why Debug Everywhere

The LSL scripts that you write once can then run in many places.

Consequently, copying your LSL script from one place to another can then make your script fail to run well, or even fail to compile.

The many places you can run your LSL script include the Linux, Mac OS X, and Windows clients from SecondLife.com that connect by broadband Internet to the main grid at Linden Lab. Other compilers and other grids also exist, for such purposes as looping thru the compile, edit, test process while offline.

This article explains how you can develop LSL scripts that run well and compile without error in all these many places.

Works at my Desk

Ways in which your script can run fine at your desk while choking at mine include the following.

Astonishing Compile-Time Error Messages

The LSLEditorBugs article explains how a bug in an LSL compiler can make your script fail to compile in one place despite compiling and running well in another.

The LSL_Errors article explains how one LSL compiler reporting "ERROR : Syntax error" can mean what another LSL compiler would describe as "ERROR : Byte code assembly failed -- out of memory". Naturally, different LSL compilers provide different efficiencies. For example, the 2007-08 Mac OS X Second Life client could compile 692 cascaded else-if's at a time when the Windows Second Life client could not compile 19 cascaded else-if's.

Astonishingly different clients

The LSL Alternate Editors article lists other places within your own operating system that you can try running your LSL, besides the usual client that SecondLife.com offers free of charge.

Running Alternative Operating Systems

Running another operating system to test your script may be easier or harder than you think.

Techniques that can let you restart your PC or Mac to run an alternate operating system include:

  1. Inserting a DVD or CD disc
  2. Plugging in a USB Flash Drive (UFD)
  3. Repartitioning your internal ATA hard drive (without scrambling it)
  4. Adding an external FireWire hard drive

Which technique works best for you varies according to your setup, in particular your boot BIOS.

Which technique works best for you will also vary bizarrely in accord with the copy restrictions added for you by the operating system vendor. For example, Microsoft Windows will often refuse to run from anywhere except from a partition of your internal ATA hard drive.

The http://www.apple.com/macosx/bootcamp/ tool from Apple walks you thru the process of repartitioning your internal ATA hard drive without scrambling it, but only if you have an Intel-based Mac, not a Motorola-based Mac and not an Intel-based PC.

Companies like Parallels and VMware sell you tools for running Windows in parallel with your usual operating system. You can even run Windows in parallel with itself, just to test different configurations without disrupting your normal Windows experience.

Running Linux

Linux demands skill & attention to run well enough to support Second Life.

As yet, Linux demands too much skill & attention: we haven't yet found a "how to" guide to tell us how people who don't already run OpenGL 2.0 in Linux can rapidly learn to run Second Life in Linux.

Techniques we've tried that don't let us run Second Life in Linux include:

  1. Linux CD-R Ubuntu Feisty 7.04 - ACPI vs. recent Apple hardware
  2. Linux CD-R Knoppix 2007-01-04 - "Window creation error"
  3. Linux DVD-R Knoppix 2007-01-04 - "Window creation error"

Searching the web finds a Linux CD-R Knoppix for Second Life, but only a version that requires NVIDIA graphics without supporting the ATI Radeon graphics often found in Mac's.

Update 2010/2011

As of 2010/2011, the above doesn't apply any more. While Linux remains an Operating System largely for users with at least intermediate general computer skills, great progress has been made in developing out-of-the-box Linux distributions. In particular, Ubuntu, as of at least 10.04, runs both the version 1.23 and version 2.x Second Life clients and major Third Party Viewers (I've tested Ascent, Imprudence and Pheonix) on fresh x86 and x86_64 installations without any further preparation or command-line fu.

Running Mac OS X

Mac OS X just works, if you have a Mac.

Mac OS X doesn't work at all if you don't have a Mac.

Well, that's not strictly true. There are Hackintoshes, but that's shady legal ground.

Running Windows

Windows demands skill & attention to run well enough to support Second Life.

The Windows installer's claim that you need administrator privilege to install appears to be false. People have seen copies of "C:\Program Files\SecondLife\" mostly work when dragged to into the "%userProfile%\Downloads\" of other Windows machines, without administrator privilege.

Also see

Also see: LSL Alternate Editors, LSLEditorBugs