Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003963opensim[REGION] Scripting Enginepublic2009-08-02 06:172015-03-16 12:55
ReporterKharmen Spad 
Assigned Tojustincc 
PrioritynormalSeverityminorReproducibilityalways
Statuspatch feedbackResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003963: blank variable not preserved on re-rez/restart
DescriptionIf a script variable is set to " ", its value will not be preserved if the object is taken to inventory then re-rezzed, or if the region in which the object is rezzed restarts, in which cases the value will be an empty string, "". This will cause scripts which use " " for unused menu buttons to fail.
Additional InformationTest script:
string a; string b;

default
{
    state_entry()
    {a="a";b=" ";}
    
    touch_start(integer num)
    {llSay(0,"a: "+"*"+a+"*");llSay(0,"b: "+"*"+b+"*");}
}
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (1 Region per Sim)
Physics EngineODE
EnvironmentMono / Windows
Mono Versiontrunk
Viewer
Attached Filespatch file icon 0001-Avoid-removal-of-whitespace-from-LSL-strings-fixes-i.patch [^] (1,269 bytes) 2015-03-06 16:08 [Show Content]

- Relationships
has duplicate 0007162new String variables containing only spaces are reset to empty on simulator restart 

-  Notes
(0012703)
melanie (administrator)
2009-08-02 06:19

This is an issue with the underlying XML serialization, which appears to trim whitespace. Of course that should not be happening.
(0019476)
makopoppo (manager)
2011-08-12 00:59

This is still an issue in OpenSim 0.7.2-dev.
(0026033)
Magnuz (reporter)
2014-05-11 04:13

This is still an issue in OpenSim 0.7.6 Release.
(0027761)
Shy Robbiani (reporter)
2015-03-06 16:07

Changed handling to preserve whitespace when .state doc is loaded.

Please note, the patch does not resolve another issue where whitespace gets removed from LSL string variables when objects or attachments are rezzed from inventory.
(0027840)
justincc (administrator)
2015-03-11 16:28
edited on: 2015-03-11 16:29

Nice find though my reservation about applying this patch by itself is that it would introduce inconsistency in behaviour.

Do you have any lead on why this doesn't work for rezzed items? Perhaps a change also needs to be made in SceneObjectPartInventory.RestoreSavedScriptState()? Or could it be that whitespace is being obliterated by an HG related asset transformation such as that in HGAssetMapper.TransformXml()?

(0027866)
Shy Robbiani (reporter)
2015-03-16 12:55

The reason for why this doesn't work for rezzed items is simple, it happens at another location which I haven't found yet. I will take a look at the places you mentioned as soon I find some time.

The patch here is really at the place where the white space gets removed when the XML is loaded. It's easy to debug to see what happens. The only concern I had myself was that it could have negative impact on other state attributes, but I could not find any. In other words, I cant see any reason for why the state values shouldn't be left unchanged when loaded.

- Issue History
Date Modified Username Field Change
2009-08-02 06:17 Kharmen Spad New Issue
2009-08-02 06:17 Kharmen Spad SVN Revision => 10108
2009-08-02 06:17 Kharmen Spad Run Mode => Grid (1 Region per Sim)
2009-08-02 06:17 Kharmen Spad Physics Engine => ODE
2009-08-02 06:17 Kharmen Spad Environment => Mono / Windows
2009-08-02 06:17 Kharmen Spad Mono Version => trunk
2009-08-02 06:19 melanie Note Added: 0012703
2011-08-12 00:59 makopoppo Note Added: 0019476
2011-08-12 00:59 makopoppo Status new => acknowledged
2014-05-11 04:11 Magnuz Relationship added has duplicate 0007162
2014-05-11 04:13 Magnuz Note Added: 0026033
2015-03-06 16:07 Shy Robbiani Note Added: 0027761
2015-03-06 16:07 Shy Robbiani Status acknowledged => patch included
2015-03-06 16:08 Shy Robbiani File Added: 0001-Avoid-removal-of-whitespace-from-LSL-strings-fixes-i.patch
2015-03-11 16:28 justincc Note Added: 0027840
2015-03-11 16:28 justincc Assigned To => justincc
2015-03-11 16:28 justincc Status patch included => patch feedback
2015-03-11 16:29 justincc Note Edited: 0027840 View Revisions
2015-03-11 16:29 justincc Note Edited: 0027840 View Revisions
2015-03-16 12:55 Shy Robbiani Note Added: 0027866


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker