Design file appears to have been partially corrupted


#1

I was trying to add some new states inside of one of my components and subform got into a weird state. A duplicate of my new state showed up. I was right clicking on the state menu but I was unable to switch states or delete the duplicate. Then, when trying to save my file, I got the following error:

I tried a save as and got the same error. After quitting and re-opening Subform, the same error gets spit out. However I do seem to be able to continue editing the project (I was very happy to realize that I hadn't actually just lost 45 minutes of work.) After re-saving, the error went away. I do have a copy of the version of the file that triggers the error 100% of the time it is opened. I don't want to share the design file with the whole forum but I'll email it to you, @kevin.


Using keyboard shortcuts to select type not performing as expected
#2

I am proceeding with work on that design file. However today I got into another buggy state with it that might be related.
I had to change the structure of list view row component that had both a "pressed" and "deselected" state (add some container children and change layout.) I made my edits to the "Deselected" state. I thought it would be easiest to just duplicate that state and then make the minor styling changes needed to re-create the "pressed" state rather than trying to manually apply the changes to the existing "pressed" state. But after making the new state, the text children of all but the first instance of this component vanished from the hierarchy and became unselectable on the artboard even though they were still rendering. The open disclosure triangles still appeared indicating they had children, but no children were visible.

I tried deleting these instances to see if re-adding them again would fix the issue, but I was unable to delete them and received the following error:

This error is 100% reproducible when loading the design file; I will send you the updated version.


#3

I was able to recover (for now, anyway) by deleting the whole "scroll container" parent and re-creating it, then adding back the List Row component instances.


#4

I took a look at the original file you sent me, and the issue is that the selection was somehow retaining a reference to a deleted element.

I'm not exactly sure how this could happen. It sounds like you were working with a lot of components, so it could be that I made a mistake in how the selection changes when component instances are deleted or when states change.

I'll dig into this further, but in the mean time your solution (just saving out the file again) makes sense, since when you click on something else you replace the selection.


#5

Hi @eliotlash, I tracked down the issue with the second file. The problem is (technically speaking) that the wires between the component instances somehow got crossed, so that they were all linked to one object instead of each to their own object.

Deleting the instances and recreating them should be a safe solution, but until I track down the underlying cause it's possible you may end up in this wires-crossed state again.

I'll keep looking for the root cause, but wanted to give you an update.
Thanks for the report.