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

Loading a Diablo save games corrupts Hellfire stash #5580

Closed
ChaosMarc opened this issue Dec 7, 2022 · 5 comments · Fixed by #6571
Closed

Loading a Diablo save games corrupts Hellfire stash #5580

ChaosMarc opened this issue Dec 7, 2022 · 5 comments · Fixed by #6571

Comments

@ChaosMarc
Copy link
Contributor

ChaosMarc commented Dec 7, 2022

Operating System

Windows x64

DevilutionX version

1.4.1 (latest release)

Describe

I was trying to migrate some of my SP Diablo save games to Hellfire by renaming them from .sv to .hsv. The migration itself worked as expected: all items were still present and everything looked good until I opened the shared stash which looked like this:
image

I've attached the broken hellfire stash file. Please let me know if a save game of one of the migrated chars is needed

stash.zip

PS: As I have no recent backup file of the stash I would be really grateful if it could be restored 😇

To Reproduce

  1. Create SP hellfire save game and store some items in stash page 1, save game and click "start new" in the esc menu
  2. Go to the settings and switch to diablo
  3. Create SP diablo save game, do nothing, save and click "start new" in the esc menu
  4. Go to the settings and switch back to hellfire
  5. Go to save game directory and rename the diablo save game from .sv to .hsv (update number if nessessary)
  6. Go back to the game (in hellfire mode), load game with the newly migrated Diablo char
  7. Check your stash: It switched to page 3 and when switching to page 1 the stored items are broken

Expected Behavior

Stash is not corrupted when migrating Diablo saves to Hellfire

Additional context

No response

@AJenbo AJenbo added the invalid This doesn't seem right label Dec 7, 2022
@ChaosMarc
Copy link
Contributor Author

ChaosMarc commented Dec 7, 2022

@AJenbo I've updated my post. it is reproduceable and happens every time a renamed diablo save game is loaded in hellfire. no further actions or saving the game are needed.

This is a zip with the following content:

  • single_0.hsv - initial hellfire char
  • single_1.hsv - migrated diablo char
  • stash.hsv - broken stash after loading single_1.hsv in hellfire for the first time
    data.zip

@AJenbo
Copy link
Member

AJenbo commented Dec 7, 2022

Converting the stash is not supported. Hellfire items are 4 bytes larger then Diablo items and so there will be a miss alignment when trying to read them.

@ChaosMarc
Copy link
Contributor Author

But I didn't migrate the stash. just the char

@AJenbo AJenbo removed the invalid This doesn't seem right label Dec 7, 2022
@AJenbo
Copy link
Member

AJenbo commented Dec 7, 2022

It might be because gbIsHellfireSaveGame isn't returned to it's previous state between loading a migrated save and loading the stash.

@ChaosMarc ChaosMarc changed the title Corrupted Hellfire Stash Loading a Diablo save games corrupts Hellfire stash May 10, 2023
@ChaosMarc
Copy link
Contributor Author

A few days ago I almost ruined my hellfire stash again by playing around with importing a diablo save game to hellfire. This time though I had a recent backup :) Anyway, it reminded me of this issue here. Shouldn't it be labeled as a bug which it, at least to me, clearly is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants