Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008448opensim[REGION] OpenSim Corepublic2019-01-10 20:502019-01-11 22:20
Reportermewtwo0641 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0008448: Materials and textures now broken in Master
DescriptionMaterials and textures seem to be very broken now in master and show up with wrong material settings and textures or none at all.

It's hard to tell when this started because the items affected are permanently damaged so it makes git bisect a bit difficult. I do know that it has happened in the commits within the past 24 hours or so between commit a98b7f and f7619b

I get a flood of error messages in the console along with it:

2019-01-10 22:42:19,026 ERROR [EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. Destination array is not long enough to copy all the items in the collection. Check array index and length. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.BitConverter.ToInt16(Byte[] value, Int32 startIndex)
   at OpenMetaverse.Helpers.TEOffsetFloat(Byte[] bytes, Int32 pos)
   at OpenMetaverse.Primitive.TextureEntry.FromBytes(Byte[] data, Int32 pos, Int32 length)
   at OpenMetaverse.Primitive.TextureEntry..ctor(Byte[] data, Int32 pos, Int32 length)
   at OpenSim.Region.OptionalModules.Materials.MaterialsModule.GetStoredMaterialsInPart(SceneObjectPart part) in D:\OpenSim\opensim\OpenSim\Region\OptionalModules\Materials\MaterialsModule.cs:line 306
   at OpenSim.Region.OptionalModules.Materials.MaterialsModule.EventManager_OnObjectAddedToScene(SceneObjectGroup obj) in D:\OpenSim\opensim\OpenSim\Region\OptionalModules\Materials\MaterialsModule.cs:line 174
   at OpenSim.Region.Framework.Scenes.EventManager.TriggerObjectAddedToScene(SceneObjectGroup obj) in D:\OpenSim\opensim\OpenSim\Region\Framework\Scenes\EventManager.cs:line 1577
   
2019-01-10 22:45:01,700 ERROR [EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. Index was outside the bounds of the array. at OpenMetaverse.Helpers.TERotationFloat(Byte[] bytes, Int32 pos)
   at OpenMetaverse.Primitive.TextureEntry.FromBytes(Byte[] data, Int32 pos, Int32 length)
   at OpenMetaverse.Primitive.TextureEntry..ctor(Byte[] data, Int32 pos, Int32 length)
   at OpenSim.Region.OptionalModules.Materials.MaterialsModule.GetStoredMaterialsInPart(SceneObjectPart part) in D:\OpenSim\opensim\OpenSim\Region\OptionalModules\Materials\MaterialsModule.cs:line 306
   at OpenSim.Region.OptionalModules.Materials.MaterialsModule.EventManager_OnObjectAddedToScene(SceneObjectGroup obj) in D:\OpenSim\opensim\OpenSim\Region\OptionalModules\Materials\MaterialsModule.cs:line 174
   at OpenSim.Region.Framework.Scenes.EventManager.TriggerObjectAddedToScene(SceneObjectGroup obj) in D:\OpenSim\opensim\OpenSim\Region\Framework\Scenes\EventManager.cs:line 1577
   
2019-01-10 22:45:01,870 DEBUG [CompleteMovement] end: 2340ms
2019-01-10 22:45:01,910 WARN [Materials]: request for unknown material ID: 00000000-0000-0000-0000-000000cf2b00
2019-01-10 22:45:01,920 WARN [Materials]: request for unknown material ID: 00000000-0000-0000-0000-00000000ffff
2019-01-10 22:45:01,920 WARN [Materials]: request for unknown material ID: 00000000-0000-0000-4000-000000000000
2019-01-10 22:45:01,930 WARN [Materials]: request for unknown material ID: 00000000-0000-0000-0000-00ffffff3cb8
2019-01-10 22:45:01,930 WARN [Materials]: request for unknown material ID: 549db323-7b37-5a85-7c6e-52b3fa81f143
2019-01-10 22:45:01,940 WARN [Materials]: request for unknown material ID: e278e051-8216-006f-3902-c0d82b00dfa1
2019-01-10 22:45:01,950 WARN [Materials]: request for unknown material ID: 9db3237b-375a-857c-6e52-b3fa002f7375
2019-01-10 22:45:01,950 WARN [Materials]: request for unknown material ID: f06cac8d-18a6-8578-fd87-e6bc514c0a2f
2019-01-10 22:45:01,960 WARN [Materials]: request for unknown material ID: a0c0318e-def6-ae31-e278-e0518216e856
2019-01-10 22:45:01,960 WARN [Materials]: request for unknown material ID: ac8d18a6-8578-fd87-e6bc-514c0a2ff06c
2019-01-10 22:45:01,960 WARN [Materials]: request for unknown material ID: ac8d18a6-8578-fd87-e6bc-514c0a2f00cf
2019-01-10 22:45:02,870 WARN [Materials]: request for unknown material ID: 00000000-0000-0000-0000-cf2b003cf1c2
2019-01-10 22:45:02,880 WARN [Materials]: request for unknown material ID: 00004083-fffd-fb7f-0000-000000000000
2019-01-10 22:45:02,890 WARN [Materials]: request for unknown material ID: 3f0001a0-0300-e000-0000-00001b002001
2019-01-10 22:45:02,890 WARN [Materials]: request for unknown material ID: fd87e6bc-514c-0a2f-00a8-2d054c070000
2019-01-10 22:45:02,900 WARN [Materials]: request for unknown material ID: 7d02a8cf-2b00-ac2f-7375-d0850701d085
2019-01-10 22:45:02,910 WARN [Materials]: request for unknown material ID: 000000ff-ffff-3cb8-a571-55b773754c07
TagsNo tags attached.
Git Revision or version numbermaster
Run Mode Grid (Multiple Regions per Sim)
Physics EngineubODE
Environment.NET / Windows64
Mono VersionNone
Viewer
Attached Files

- Relationships

-  Notes
(0033754)
aiaustin (developer)
2019-01-11 02:19
edited on: 2019-01-11 02:21

I see this too.. not the errors, but the [Materials] messages... including on latest dev master opensim-0.9.0.1-713-gab35bf5.zip

But I believe it started much earlier than the last 24 hours.. I say this perhaps a week ago and maybe earlier. I had not yet investigated this but on checking just now I see these warnings when attaching some items which on examination of the textures do not look complicated. They just have a diffuse normal texture, no texture is in bumpiness or shininess.

10:15:29 - [ATTACHMENTS MODULE]: Updating asset for attachment 054f8abc-8a61-4f68-bdae-d354e82aafae, attachpoint 36
10:15:29 - [ATTACHMENTS MODULE]: Updating asset for attachment 7411d494-6a12-42bf-97b5-eef2f97b7d04, attachpoint 38
10:15:31 - [Materials]: request for unknown material ID: d6914214-c79d-2447-f045-d8cdde26b911
10:15:31 - [Materials]: request for unknown material ID: dc0f9d17-42f0-dd9d-9d24-ff25de476329
10:15:31 - [Materials]: request for unknown material ID: 02e1141c-3277-f077-a077-ea3a7c310bf7
10:15:31 - [Materials]: request for unknown material ID: 27175c43-f6b7-d87e-2feb-7823d929cc0d
10:15:31 - [Materials]: request for unknown material ID: f189485b-1d8c-312f-7acf-2b631baa8780
10:15:31 - [Materials]: request for unknown material ID: c4faeb6d-b981-cadb-afbd-6dd5f23f329c
10:15:31 - [Materials]: request for unknown material ID: 32aba689-e9d0-9a78-4ed4-398e68125944
10:15:31 - [Materials]: request for unknown material ID: 759265a5-915f-2fdb-fda9-33a4923510b2
10:15:31 - [Materials]: request for unknown material ID: e10274c2-f521-58f0-39a2-63250c4580bf
10:15:31 - [Materials]: request for unknown material ID: f80ca5d8-f5cd-7f73-5633-a12258692c21
10:15:31 - [Materials]: request for unknown material ID: 0b4294da-6604-1912-c738-d3265524cc75
10:15:31 - [Materials]: request for unknown material ID: 156b56e5-c26c-ba4f-0737-ce21fc1ea12d
10:15:31 - [Materials]: request for unknown material ID: 7602cee9-4eb5-b7ba-cb81-1ebfa62e1d7e

(0033755)
UbitUmarov (administrator)
2019-01-11 03:20

the errors where a issue on commit f7619b6...
should be fixed on ab35bf5...

still no idea about those materials :(
(0033756)
UbitUmarov (administrator)
2019-01-11 03:42

made some testing with simple materials, and no issue :(
(0033757)
mewtwo0641 (reporter)
2019-01-11 04:16

The error messages seem to be gone now but there still seem to be issues with textures and materials. From what I can tell the objects that are affected are objects that have scripting to change textures and materials; They aren't being applied with the correct parameters it looks like. The horizontal scale is being set to 0.0 (Where in previous revisions this was never an issue) and may possibly also apply to vertical scale as well. I reverted the textures back to their original settings then reset the scripts in it and horizontal scale is set back to 0.0 again as soon as a function is called to modify prim appearance.
(0033758)
UbitUmarov (administrator)
2019-01-11 04:33

tested with llOffsetTexture llScaleTexture llRotateTexture
and seen no issues
(0033759)
mewtwo0641 (reporter)
2019-01-11 05:00

I've tracked it down to using llSetAlpha(), llSetLinkAlpha(), and set alpha via llSetPrimitiveParams* when toggling very fast between different alphas. The affected objects on my grid are objects that use "animation" via toggling alphas on a mesh with multiple faces.

As far as I can tell I only see this issue concerning mesh objects; The horizontal and vertical repeats on the mesh are being set to some really high negative value (Or 0.0) instead of retaining their original values.

This has only been an issue very recently that I have noticed and previously have had no problems with it. It may be also unrelated to this mantis but I am unsure.

Here is a simple script that demonstrates the issue. You will need a mesh object with 8 faces on it. I understand this isn't a practical use case for switching alphas like this but it shouldn't be breaking the textures/materials either.

default
{
    state_entry()
    {
        integer i = 0;
        
        for(i = 0; i <= 7; i++)
        {
            llSetLinkAlpha(LINK_SET, 0.0, i);
            llSetLinkAlpha(LINK_SET, 1.0, i);
        }
    }
}
(0033760)
aiaustin (developer)
2019-01-11 05:44
edited on: 2019-01-11 08:33

As mewtwo0641 speculated the errors he got may be a separate issue to the materials warnings... and that may explain why I started to see this a week (or a little more?) ago.

I have identified the issue as being one mesh part of Fred Beckhusen's Wonder Woman avatar.. originally from his outworldz.com:9000 grid.

I just took a fresh copy from that and wore (only) the "Wonder Woman" single attachment in that... nothing else is necessary for this test... and I get the same Material warnings. Though the attachment appears to work fine otherwise and visually all textures look to display correctly. I checked each face texture and they all look to have sensible (1, 1) settings for repeats, etc. and have no animations or scripts in them at all.

[Note later I fixed this by getting a fresh working copy from one of my regions on OSGrid and that solved the materials warning issue]

(0033763)
mewtwo0641 (reporter)
2019-01-11 06:50

@aiaustin - Did you try that script in one of the mesh pieces of that avatar? I am curious to know if textures go wonky on any mesh other than the ones I have tested.
(0033765)
aiaustin (developer)
2019-01-11 08:14
edited on: 2019-01-13 02:03

Interesting. testing on grid on latest dev master latest dev master opensim-0.9.0.1-713-gab35bf5.zip

I put the script into the mesh object. It reduced the number of materials warnings to 5 from 13... no errors appear on console.

But then when I examined the mesh I see it is well and truly messed up with negative and weird values for scale and repeats per metre... e.g. in one item I saw...

Horizontal Scale = -1.#QNAN
vertical Scale = -170141
Repeats per metre = -913070

I can change the vertical scale or repeats per metre (e.g. to 1) but for some reason I cannot set the horizontal scale to a new value in the Edit mode.

Original before I added your script were all sensible values … mostly (all I think) horizontal/vertical scale = 1.

and I don't seem to be able to convert that to 0.

My materials warning issue is probably a different issue. Ignore it for now. I managed to get a working version of the mesh without the warnings from my OSGrid region and that works when taken back as a replacement part for the mesh previously generating those warning. Put it down to a glitch for me. I will keep the broken mesh with warnings in case it proves useful in future testing... but I am replacing the broken mesh in the box on Openvue region on Openvue grid.

(0033767)
mewtwo0641 (reporter)
2019-01-11 08:32

I am unsure what the materials warning is all about. The material warnings on mine have seemingly disappeared but the issue with the repeats remain.

For the record the repeats on my object were all pretty sensible as well, 1.0 horizontal and 1.0 vertical.
(0033769)
UbitUmarov (administrator)
2019-01-11 09:38

the issue is the same: a few silly bugs

made some changes on master.
(0033778)
mewtwo0641 (reporter)
2019-01-11 22:20

A few minutes testing on master and it seems a lot better now, thank you Ubit!

Gonna leave this open for a while so I can verify longer term testing is good.

- Issue History
Date Modified Username Field Change
2019-01-10 20:50 mewtwo0641 New Issue
2019-01-10 21:11 mewtwo0641 Description Updated View Revisions
2019-01-11 02:19 aiaustin Note Added: 0033754
2019-01-11 02:21 aiaustin Note Edited: 0033754 View Revisions
2019-01-11 03:20 UbitUmarov Note Added: 0033755
2019-01-11 03:42 UbitUmarov Note Added: 0033756
2019-01-11 04:16 mewtwo0641 Note Added: 0033757
2019-01-11 04:33 UbitUmarov Note Added: 0033758
2019-01-11 05:00 mewtwo0641 Note Added: 0033759
2019-01-11 05:44 aiaustin Note Added: 0033760
2019-01-11 05:45 aiaustin Note Edited: 0033760 View Revisions
2019-01-11 05:46 aiaustin Note Edited: 0033760 View Revisions
2019-01-11 06:50 mewtwo0641 Note Added: 0033763
2019-01-11 08:14 aiaustin Note Added: 0033765
2019-01-11 08:15 aiaustin File Added: 2019-01-11-WW-Messed-Up-Texture-Settings.jpg
2019-01-11 08:32 mewtwo0641 Note Added: 0033767
2019-01-11 08:32 aiaustin Note Edited: 0033765 View Revisions
2019-01-11 08:33 aiaustin Note Edited: 0033760 View Revisions
2019-01-11 08:34 aiaustin Note Edited: 0033765 View Revisions
2019-01-11 09:38 UbitUmarov Note Added: 0033769
2019-01-11 22:20 mewtwo0641 Note Added: 0033778
2019-01-13 02:02 aiaustin File Deleted: 2019-01-11-WW-Messed-Up-Texture-Settings.jpg
2019-01-13 02:03 aiaustin Note Edited: 0033765 View Revisions


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker