Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007859opensim[REGION] OpenSim Corepublic2016-03-23 19:232016-03-23 19:31
ReporterMandarinka Tasty 
Assigned To 
PriorityhighSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformUnixOSUnix 3.14.32.6OS Version64-bit
Product Version 
Target VersionFixed in Version 
Summary0007859: Command: save prims xml2 does not save required file
DescriptionI have found following problem with console command: save prims xml2:

Syntax of the command:
save prims xml2 [<prim name> <file name>] - Save named prim to XML2

When I use this command, it does not save required linkset to specified file.
Steps To ReproduceTo reproduce please:

1. create any primitive or linkset and name it as: A

2. type in console screen command: save prims xml2 A A.xml

then we expect that named prim:A wil be saved to a file: A.xml

but console shows following output:


Region (MANDARINKA - OAR) # save prims xml2 A A.xml
Saving prims with name Primitive in xml2 format for region MANDARINKA - OAR to prim-backup.xml

So we can see, that name of our prim A has been replaced by name Primitive and file's anme has been also replaced by default name: prim-backup.xml

We can find thsi file inside our bin path, but it is empty:

<scene>

</scene>

So simulator , simply saying, does not understand proper command:

save prims xml2 A A.xml
Additional InformationI have analysed source file: OpenSim.cs

and I have found this:

protected void SavePrimsXml2(string module, string[] cmdparams)
        {
            if (cmdparams.Length > 5)
            {
                SceneManager.SaveNamedPrimsToXml2(cmdparams[3], cmdparams[4]);
            }
            else
            {
                SceneManager.SaveNamedPrimsToXml2("Primitive", DEFAULT_PRIM_BACKUP_FILENAME);
            }
        }

So easily we can notice that the reason of the issue is improper value of

cmdparams.Length > 5

It should not be larger than 5, because opensim searches length > 5 in our

command: save prims xml2 A A.xml <- but length = 5

I have deliberately typed command:

"save prims xml2 A A.xml a" with additional parameter a and then it has worked like it should work.

So approprate condition should look:

protected void SavePrimsXml2(string module, string[] cmdparams)
        {
            if (cmdparams.Length > 4)
            {
                SceneManager.SaveNamedPrimsToXml2(cmdparams[3], cmdparams[4]);
            }
            else
            {
                SceneManager.SaveNamedPrimsToXml2("Primitive", DEFAULT_PRIM_BACKUP_FILENAME);
            }
        }
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
Script Engine
EnvironmentMono / Linux64
Mono VersionOther
Viewer
Attached Files

- Relationships

-  Notes
(0030116)
Mandarinka Tasty (reporter)
2016-03-23 19:31

There appears parallel problem with command: load xml2.

Syntax should be: load xml2 <filename>,

but neither load xml2, nor load xml2 A.xml does not load primitive to the scene,

and that I do not know why.

Protected void: LoadXml2 shows that:

protected void LoadXml2(string module, string[] cmdparams)
        {
            if (cmdparams.Length > 2)
            {
                try
                {
                    SceneManager.LoadCurrentSceneFromXml2(cmdparams[2]);
                }
                catch (FileNotFoundException)
                {
                    MainConsole.Instance.Output("Specified xml not found. Usage: load xml2 <filename>");
                }
            }
            else
            {
                try
                {
                    SceneManager.LoadCurrentSceneFromXml2(DEFAULT_PRIM_BACKUP_FILENAME);
                }
                catch (FileNotFoundException)
                {
                    MainConsole.Instance.Output("Default xml not found. Usage: load xml2 <filename>");
                }
            }
        }

but SceneManager does not load anything.

- Issue History
Date Modified Username Field Change
2016-03-23 19:23 Mandarinka Tasty New Issue
2016-03-23 19:31 Mandarinka Tasty Note Added: 0030116


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker