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

Castle of the Winds Crash (With Reproduceable steps) #1127

Closed
Frostbyte8 opened this issue Mar 3, 2022 · 14 comments
Closed

Castle of the Winds Crash (With Reproduceable steps) #1127

Frostbyte8 opened this issue Mar 3, 2022 · 14 comments

Comments

@Frostbyte8
Copy link

Steps to Reproduce:

  1. Start a new came with Castle2.exe
  2. Max out Intelligence (it should fill 3 squares worth). The other stats don't matter. Push Ok.
  3. When it asks you what spell you want for each level: choose these 6 spells: Minor Wounds, Detect Objects, Light, Magic Arrow, Phase Door, Cold Ball (NOT BOLT), and Shield.
  4. The story will come up. Click [Done].
  5. On the eastern part of the Town, enter all 10 shops once. No need to buy anything, just enter and leave.
  6. In the quick spell bar, click Cold Ball, push esc, and repeat until you the message that says "You don't have enough mana" appears. Click [NO]. Now Sleep by pushing SHIFT-R.
  7. Repeat steps 5 and 6 until the game crashes. I had to do this about 3 times, but on other attempts it took as many as 5.

You'll get an error like this one:
Error

@cracyc
Copy link
Contributor

cracyc commented Mar 5, 2022

There might be a small memory leak in the program when a shop is entered and exited. Winevdm was very sensitive to this because it didn't resize the local heap properly. #1131 should fix that problem.

@Frostbyte8
Copy link
Author

Tried it again, and after a few times of going into the shops and leaving them, it crashes.

I ran the trace command as per the instructions so here it is:
cotw_trace.zip

I also didn't see the bug_report.md file. Sorry about that:

OS: Windows 10 2004
Version: 2280

@cracyc
Copy link
Contributor

cracyc commented Mar 15, 2022

I was able to repo your previous crash but this one is different.

address=75F3B522
access address=66C2BBC8
VM context
EAX:4B0001,ECX:0008,EDX:3004B,EBX:36DC
ESP:6E62,EBP:6EB0,ESI:000F,EDI:0000
ES:12E7,CS:1297,SS:12E7,DS:12E7,FS:0000,GS:0000
IP:05A5, address:66C3AC2D
EFLAGS:00003A03

Interrupt 0D #GP (1297:059F) flags 3A03 err 0000
cmp     word ptr cs:[bx+21h],0h

I can go in and out of shops and cast magic as much as I want without anything happening.

@Frostbyte8
Copy link
Author

Did you rest after using magic and re-enter the shops? The shops change what they have in them when a day of in game time passes.

@cracyc
Copy link
Contributor

cracyc commented Mar 30, 2022

Was able to repo, takes a bit of time though. Fairly sure #1140 will fix it.

@Frostbyte8
Copy link
Author

I've tested the latest build was able to play without any issues at all, and can confirm that it is fixed.

@cracyc
Copy link
Contributor

cracyc commented Apr 5, 2022

👍
You can close this issue then.

@CNodd
Copy link

CNodd commented Jul 24, 2023

Hello,
I just had this issue happen to me, too. I've played 12+ hours on my save file and now it's corrupted, with no backup (didn't know save files could get corrupted!).

Please let me know what info is needed so this bug can be fixed (I'm pretty new here). I believe I'm using the latest and greatest version.

Also, is there a way to uncorrupt my save file so I don't lose 12+ hours?

Thank you!

@cracyc
Copy link
Contributor

cracyc commented Jul 24, 2023

What version are you using? The changes that fixed this issue were added after 0.8.1 so you need the development version. If not I'd need some way to reproduce it quickly, playing for 12 hours isn't possible.

Also, is there a way to uncorrupt my save file so I don't lose 12+ hours?

Not that I know of.

@CNodd
Copy link

CNodd commented Jul 25, 2023

Thanks, Cracyc - I appreciate the response.

I'm using otvdm v0.8.1. What is the Development Version? A less-stable but more advanced beta? I downloaded what I thought was the most advanced, but most stable version within the past few weeks.

Thanks also for addressing the corrupt file issue. I realize it was probably 20+ hours. Ah well, I've learned some things. Multiple save files, for one! If anyone has an idea of how to uncorrupt the file, I'm all ears.

Thanks again.

@cracyc
Copy link
Contributor

cracyc commented Jul 25, 2023

A less-stable but more advanced beta?

It's the build of the top of the git tree. The 0.8.1 is quite old now and the dev version is quite stable with lots of fixes. Get the current one at https://ci.appveyor.com/project/otya128/winevdm/builds/47524417/job/xsdvklqmshvbid3u/artifacts. There is a newer reported issue with CotW at #1214 but that doesn't seem to include save corruption. If you can reproduce it, mention it there.

@CNodd
Copy link

CNodd commented Jul 26, 2023

Thanks again, Cracyc!

Downloaded and clicked install on both the "install" and "install (no console)" shortcuts. I didn't do anything to uninstall the old version (not sure how I found it - perhaps a link from another website) - will failing to uninstall the old version cause a problem? How do I know if I'm running the proper version now? Happy to read about what I should be doing if you don't mind directing me to where to look?

Thanks, also, for the tip on #1214 . I'm glad it appears to be infrequent, resolved easily (close and try again), and most importantly doesn't corrupt save files! I'll post there if I notice anything.

Last, to confirm: when loading my corrupted save file using the new install, it gives the same error (as anticipated). If for some reason it would be helpful to have that file, I'd be happy to provide.

@cracyc
Copy link
Contributor

cracyc commented Jul 26, 2023

If you run it on the command line it'll show the build number.

If for some reason it would be helpful to have that file, I'd be happy to provide.

You'd have to find people who are reverse engineering this game to be able to fix the save file if it's even possible.

@CNodd
Copy link

CNodd commented Jan 24, 2024

Thanks! I restarted and didn't have any bugs through the rest of the playthrough. This program/addon to run dos games works great! Thank you!!!

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

No branches or pull requests

4 participants