MantisBT - opensim
View Issue Details
0007464opensim[REGION] Script Functionspublic2015-03-02 12:482015-03-03 16:13
FreakyTech 
BlueWall 
normalminoralways
closedfixed 
master (dev code) 
master (dev code) 
Standalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
BulletSim
Unknown
Other
0007464: notecard parser and osMakeNotecard do not handle all notecard variants correctly
The byte length in notecards is calculated wrong when using UTF8 characters.

This results into wrong length embedded into the notecard.

Additionally, notecards with inventory cannot be parsed at all and result into faults.

No tags attached.
patch regenerated-0001-corrected-script-notecard-parser.-It-now-handles-not.patch (17,350) 2015-03-03 15:20
http://opensimulator.org/mantis/file_download.php?file_id=4110&type=bug
patch regenerated-0006-corrected-osMakeNotecard-string-data.patch (2,020) 2015-03-03 15:41
http://opensimulator.org/mantis/file_download.php?file_id=4111&type=bug
Issue History
2015-03-02 12:48FreakyTechNew Issue
2015-03-02 12:48FreakyTechFile Added: 0006-corrected-osMakeNotecard-string-data.patch
2015-03-02 12:49FreakyTechFile Added: 0008-corrected-script-notecard-parser.-It-now-handles-not.patch
2015-03-02 12:49FreakyTechStatusnew => patch included
2015-03-03 13:07BlueWallAssigned To => BlueWall
2015-03-03 13:07BlueWallStatuspatch included => assigned
2015-03-03 13:22BlueWallNote Added: 0027691
2015-03-03 14:45BlueWallNote Added: 0027696
2015-03-03 14:47BlueWallNote Added: 0027697
2015-03-03 14:47BlueWallStatusassigned => feedback
2015-03-03 14:52FreakyTechNote Added: 0027698
2015-03-03 14:52FreakyTechStatusfeedback => assigned
2015-03-03 14:55FreakyTechNote Edited: 0027698bug_revision_view_page.php?bugnote_id=27698#r3774
2015-03-03 15:01FreakyTechNote Edited: 0027698bug_revision_view_page.php?bugnote_id=27698#r3775
2015-03-03 15:04BlueWallNote Added: 0027699
2015-03-03 15:20FreakyTechFile Added: regenerated-0001-corrected-script-notecard-parser.-It-now-handles-not.patch
2015-03-03 15:20FreakyTechNote Added: 0027700
2015-03-03 15:29FreakyTechNote Edited: 0027700bug_revision_view_page.php?bugnote_id=27700#r3777
2015-03-03 15:33FreakyTechNote Added: 0027701
2015-03-03 15:36BlueWallNote Added: 0027702
2015-03-03 15:37FreakyTechNote Added: 0027703
2015-03-03 15:38BlueWallNote Added: 0027704
2015-03-03 15:40BlueWallNote Added: 0027705
2015-03-03 15:41FreakyTechFile Added: regenerated-0006-corrected-osMakeNotecard-string-data.patch
2015-03-03 15:41FreakyTechNote Added: 0027706
2015-03-03 15:42FreakyTechNote Edited: 0027706bug_revision_view_page.php?bugnote_id=27706#r3779
2015-03-03 15:51FreakyTechNote Added: 0027707
2015-03-03 16:00FreakyTechFile Deleted: 0006-corrected-osMakeNotecard-string-data.patch
2015-03-03 16:00FreakyTechFile Deleted: 0008-corrected-script-notecard-parser.-It-now-handles-not.patch
2015-03-03 16:01FreakyTechNote Added: 0027708
2015-03-03 16:02BlueWallNote Added: 0027709
2015-03-03 16:13BlueWallMono VersionNone => Other
2015-03-03 16:13BlueWallNote Added: 0027710
2015-03-03 16:13BlueWallStatusassigned => resolved
2015-03-03 16:13BlueWallFixed in Version => master (dev code)
2015-03-03 16:13BlueWallResolutionopen => fixed
2015-03-03 16:13BlueWallStatusresolved => closed

Notes
(0027691)
BlueWall   
2015-03-03 13:22   
0008-corrected-script-notecard-parser.-It-now-handles-not.patch is failing here ...

fatal: corrupt patch at line 377
Patch failed at 0001 corrected script notecard parser. It now handles notecards with inventory as well.
   
 }
diff -- <<< 377
i
--- a/
+++ b/Open
@@ -59
(0027696)
BlueWall   
2015-03-03 14:45   
had to revert b519a5e62ae5ce7d408a8206c06371e1316aa5e8 because libomv didn't like the format of the notecard in tests.
(0027697)
BlueWall   
2015-03-03 14:47   
The first one applied and works well in-world, but it fails the tests and hangs our jenkins. The second one would not apply cleanly. See earlier notes about it.

Thanks
(0027698)
FreakyTech   
2015-03-03 14:52   
(edited on: 2015-03-03 15:01)
could be order of applying so doing a recheck since I have that in my fork for quite a while without problems at all.

I have tested that parser with viewer generated notecards and those parsed all successfully. As well as parsing osMakeNotecard as input for vieweers.

I guess I re-generate those patch files then.

And I take a look at that libomv parser if it is according to text length being a byte count.

(0027699)
BlueWall   
2015-03-03 15:04   
I guess it is possible that the 2nd patch needed to the in there too. This is a copy of the test failures. In both cases it is using the notecard.

Test Case Failures:
1) OpenSim.Region.ScriptEngine.Shared.Tests.OSSL_ApiAppearanceTest.TestOsAgentSaveAppearance : System.InvalidCastException : Cannot cast from source type to destination type.
at OpenSim.Region.ScriptEngine.Shared.Tests.OSSL_ApiAppearanceTest.TestOsAgentSaveAppearance () [0x0012d] in /var/lib/jenkins/jobs/opensim_core/workspace/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs:154
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00064] in /home/abuild/rpmbuild/BUILD/mono-3.0.6/mcs/class/corlib/System.Reflection/MonoMethod.cs:231

2) OpenSim.Region.ScriptEngine.Shared.Tests.OSSL_ApiAppearanceTest.TestOsOwnerSaveAppearance : System.InvalidCastException : Cannot cast from source type to destination type.
at OpenSim.Region.ScriptEngine.Shared.Tests.OSSL_ApiAppearanceTest.TestOsOwnerSaveAppearance () [0x00111] in /var/lib/jenkins/jobs/opensim_core/workspace/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs:113
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00064] in /home/abuild/rpmbuild/BUILD/mono-3.0.6/mcs/class/corlib/System.Reflection/MonoMethod.cs:231
(0027700)
FreakyTech   
2015-03-03 15:20   
(edited on: 2015-03-03 15:29)
added a regenerated patch based on all commits that have been done already

libomv does not match Second Life Viewers in implementation.

Linden viewers have byte count after text length

(0027701)
FreakyTech   
2015-03-03 15:33   
OpenSim.Framework.SLUTIL.ParseNotecardToString can actually handle parsing a notecard to its string content.

one character to trigger a UTF-8 generation is <ALT> <2> <5> <5> via NumPad.
(0027702)
BlueWall   
2015-03-03 15:36   
Still fails to apply ...

fatal: corrupt patch at line 377
(0027703)
FreakyTech   
2015-03-03 15:37   
and I missed something interestingly a space between text length and the actual number
(0027704)
BlueWall   
2015-03-03 15:38   
One minute. I am checking something.
(0027705)
BlueWall   
2015-03-03 15:40   
ok, got it to apply - I will build and test now
(0027706)
FreakyTech   
2015-03-03 15:41   
(edited on: 2015-03-03 15:42)
added the second patch including the missing space.

the appearance notecards should not require UTF-8 characters. So, those are normally identical.

Somehow, the merge killed that space on first patch file version.

(0027707)
FreakyTech   
2015-03-03 15:51   
that space was in a separate commit I overlooked that.
(0027708)
FreakyTech   
2015-03-03 16:01   
deleted the broken patches and left the intact ones.
(0027709)
BlueWall   
2015-03-03 16:02   
ok, thanks. The first is applied. Will get the second in a few min.
(0027710)
BlueWall   
2015-03-03 16:13   
Thanks for the patches!