Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make some changes on camera limitator and hit save, then do some other changes on camera limitator and hit save again cause save failure #230

Closed
shinespeciall opened this issue Jul 6, 2020 · 4 comments · Fixed by #261
Assignees
Labels
bug Something isn't working correctly

Comments

@shinespeciall
Copy link
Member

There is no data corruption directly on the rom, i mean the game can run without crash and the editor can load the rom.
Save failure will happen again after you closing the editor and open the rom in another editor, change the camera limitator and hit save.
It should be caused by chunk invalidation code, perhaps the pointer reset is fine.

@shinespeciall shinespeciall added the bug Something isn't working correctly label Jul 6, 2020
@Goldensunboy
Copy link
Collaborator

Repro:

  • Open a ROM
  • Select "Camera" from the Edit Mode pane
  • Change camera setting to "Use Camera Limitators"
  • Click "+" to add a camera limitator
  • Save ROM
  • Press the up arrow on the limitator's X spinbox (changes from 2 to 3)
  • Save ROM
  • Observe that there is save chunk corruption and an error message in the output widget

@Goldensunboy
Copy link
Collaborator

The issue is that with camera limitators, there are 2 types of chunks; one of type CameraPointerTableType, and N chunks of type CameraBoundaryChunkType. The code which creates invalidation chunks for the old CameraBoundaryChunkType chunks (Level.cpp:355) uses the address of the pointers themselves in the CameraPointerTableType table, instead of the values of the pointers as they should. If unfixed, this causes unrecoverable chunk leak when saving levels with camera limitators.

@Goldensunboy
Copy link
Collaborator

There is an additional bug here which is also causing chunk leak within the if-block at Level.cpp:327:

  • When changing from camera limitators to another type (like fixed), then invalidation chunks are not created for existing limitators

@shinespeciall
Copy link
Member Author

current solution: if you really want to use the feature with some unknown risk, you can use beta-9 build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants