PDA

View Full Version : Corrupt Image and Mouse Update Error



LordEntrails
November 17th, 2021, 03:47
Just went and opened up a development campaign to get it ready for module export for my session later this week and found that the image I created using FGU assets is corrupt and throws console error MOUSE UPDATE.

Can anyone help me figure out how to recover this? The session.db files don't seem to help. Note, If you load db.session.20210817.xml you will see an early version of the image does open.

Note, I was using the NPC Maker extension with this campaign so their is a possibility it corrupted something, though I see no evidence of such in the db.xml.

To reproduce;
- Open the 5E campaign.
- Open console window
- Open the image "Kruthik Hives"
- Notice that the image appears blank, but their are numerous asset layers
- Click in image, notice console errors (note, they do not always reproduce, attached logs have errors)

Logs and campaign attached.

Zacchaeus
November 17th, 2021, 09:28
I can certainly confirm the error; but I've no idea of the cause I'm afraid.

LordEntrails
November 17th, 2021, 15:36
Thanks Mr Z. I looked through the db.xml and it looks well formed. But no idea.

Moon Wizard
November 17th, 2021, 15:53
Thank you for the example campaign. I've recreated the issue, and forwarded it on to Carl to review. The exception is tied to attempting to perform a zoom on this map (i.e. mouse wheel).

Regards,
JPG

LordEntrails
November 17th, 2021, 16:14
Thanks Moon, appreciate it.

Carl, something else I noticed now. Open the image, open the image control panel (if its not), resize the image window via bottom right corner, window does not refresh correctly. (Edit: it's only this image that exhibits this behavior, other images work as expected.)

50005

LordEntrails
December 7th, 2021, 03:58
I noticed in the db.xml file the following about the layer parent IDs.


<layer>
<name>Folder(7)</name>
<id>49</id>
<parentid>-32</parentid>
<type>folder</type>
<children>50,51</children>
<matrix>-1.000732,0,0,0,-0.0004882813,-1.000977,0,0,0,0,1,0,1975,2675,0,1</matrix>
</layer>
<layer>
<name>Barrel2.png(7)</name>
<id>50</id>
<parentid>49</parentid>
<type>image</type>
<bitmap>images/Terrain Objects/Barrel2.png@Torstans Asset Pack</bitmap>
<matrix>-0.5,0,0,0,0,-0.5,0,0,0,0,1,0,1325,975,0,1</matrix>
<color>#CC461C00</color>
</layer>


Notice how some of the parentid's are negative and some are not. Are both formats correct? Might this be the issue?

EDIT: nvm, top level folders have a negative parent id. Not sure what the negative references, maybe order. Sub folders have a positive id that matches the higher level folder object id.

EDIT2: some testing notes. Thought it might be due to length of some layer names. No joy, that does not seem to be an issue.

LordEntrails
December 7th, 2021, 19:20
I've isolated the issue. It is the "Exits" folder. Not sure what about this is poor, but, if you delete the image layers in the folder, you will not be able to delete the folder itself through the UI, but if you delete it from the xml, then the image opens and appears and works as normal.

Note, the children of the folder do not get cleaned up correctly when the objects are deleted. This might be the issue. Any ideas what might be wrong here?


<layer>
<name>Exits</name>
<id>72</id>
<parentid>-3</parentid>
<type>folder</type>
<children>95,92,129,127,130,126,124,123,121,120,118,117,115, 114,112,111,109,108,106,105,146,140,131,143,134,11 9,128,113,125,122,116,110,107</children>
</layer>

LordEntrails
December 8th, 2021, 00:19
Solved.

That folder listed 33 children. Only 20 objects listed that folder as the parent. I adjusted the XML to list only those children that have that object as their parents. The corrected list is;


95,92,105,106,108,109,111,112,114,115,117,118,120, 121,123,124,126,127,129,130

ddavison
December 8th, 2021, 15:39
Hey LordEntrails,

It sounds like you were able to manually clean up the issue. Are you able to reproduce the problem with a specific set of steps?

It sounds like there might be an issue with deleting layers in folders... but I don't know that I completely follow the steps from start to finish.

LordEntrails
December 8th, 2021, 16:00
I have not tried to reproduce the corruption, but I can tell you what happened (from forensics) is that a folder (layer) ended up with children that did not exist (had been deleted). (Edit: note I can reproduce the issue as I have versions of the corrupt db.xml) One of the clues of this was that during image opening, the display of the image control panel paused during the display of this folder. (I did not capture an image of this, but should be able to if of value.)

Note, the campaign was created ~Aug 16, 2021 and FG would have been on the current build give or take a few days.

What caused the corruption I can only speculate, possibilities include

moving objects in and out of sub-folders (before deleting) (Previously there were issues with folders being inside folders right?)
deleting objects via image (select>Delete key)
deleting object via deleting layer


If the timeline fits in when the sub-folder issue was present and has since been resolved I would let this go unless their appears other reports of this. Even if not, not sure it's worth trying to reproduce without other reports.