hogsy / jaded

A repository for raising any tickets relating to Jaded, the Community Patched Jade Engine. There is no code here.
https://oldtimes-software.com/jaded/
1 stars 0 forks source link

[BUG] Memory corruption when applying materials #57

Open hogsy opened 1 week ago

hogsy commented 1 week ago

Summary

Moonlow raised this with me this morning, but it appears a problem that was encountered before has been reproduced, and this time with steps! :confetti_ball:

image

A video is also available here.

According to what they said, first you need to apply a material to an object and then afterwards, go to another world using the same material you had applied previously.

Here's a paste of what was said...

So I loaded RIV_FPP_Labo first, then added the BRK_JB_B_M material to an object, then saved, then I went to the Waterfall base. And the textures where all messed up (the same textures I added to the object in the first level)

It doesn't use a different material, but the material just chose random textures. Also, if you don't save, the changes don't happen. If you do save, the materials stay broken

Yeah, I can see it clearly lists different textures in the materials Like BRK_JB_B_Mur orignally used BRK_JB_B_Mur as it's texture But now it uses a different texture Like a rock texture or whatever What texture it uses depends on the level it seems

And I've not looked yet, but a guess on my part...

Yeah, it's probably doing something dumb from the sounds of it like I'd guess the material is still resident in memory because you've done something with it, and that's not getting cleared upon loading another world, but all the textures get reloaded, so the indexes aren't the same as before... It'll hopefully be an easy fix.

Steps to Reproduce

  1. First load up world A, apply a material to an object
  2. Load world B (this should have objects using the same material)
  3. Materials should be messed up

Expected Result

Well, nothing should corrupt.

Actual Result

Textures in the last material that was dragged onto the object get changed.

A temporary solution might be to make sure any material is closed in the material editor if one is active prior, as I suspect this might be what's going on - I want to test this case, though.

Screenshots or Videos

N/A

Additional Information

May or may not be related to material editor. Either way, that material is probably being kept resident in memory when loading another world.