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

Emulator crashes in Final Fantasy X during intro #72

Closed
jpd002 opened this issue Jul 3, 2015 · 10 comments
Closed

Emulator crashes in Final Fantasy X during intro #72

jpd002 opened this issue Jul 3, 2015 · 10 comments
Labels

Comments

@jpd002
Copy link
Owner

jpd002 commented Jul 3, 2015

Crashes when "Sinspawn Ammes" appears.

Reported by @HerPizzaFace in #27

Screen shots:
https://cloud.githubusercontent.com/assets/12665021/8274006/025d7894-1853-11e5-8b79-b9bf545e43f5.jpg
https://cloud.githubusercontent.com/assets/12665021/8274007/03a87d70-1853-11e5-9672-eac4e070f926.jpg

Hardware specs:
CPU: i3-4160 (AVX 2.0, SSE4.1/4.2, MMX, SSE3, SSE2, SSSE3, FMA, MMX, SSE).
GPU: Intel HD 4400 (although I'm pretty sure the GPU isn't the issue).

@jpd002 jpd002 changed the title Final Fantasy X crashes during intro when Sinspawn Ammes appears Emulator crashes in Final Fantasy X during intro Jul 3, 2015
@jpd002 jpd002 added the bug label Jul 3, 2015
@jpd002
Copy link
Owner Author

jpd002 commented Jul 4, 2015

@HerPizzaFace From the looks of the crash dump, it seems that an unhandled exception occurred, but there's no way to see where it happened. I've made a special build that will display a message box when an exception is caught:

http://purei.org/downloads/play/special/Play-HerPizzaFace-ExceptionCatcher.exe

So in theory, you should get a message box at the same moment you are getting the crash on that build. The message should give me more info about the cause of the problem.

@ghost
Copy link

ghost commented Jul 4, 2015

Okay, this is what it says:
cantreadafterendplayffx

I have no idea what that could mean.

@jpd002
Copy link
Owner Author

jpd002 commented Jul 4, 2015

Thanks, I was not expecting that at all... You're playing from a ISO/BIN disk image?

My guess is that there was an issue reading the disk image file, I might not be handling large ISO files properly. I'll do some testing on my side to see if that's the problem.

@jpd002
Copy link
Owner Author

jpd002 commented Jul 4, 2015

Ok, I could reproduce the issue using a .BIN dump of the disk. Shouldn't be too hard to fix now that I can debug the thing.

@jpd002
Copy link
Owner Author

jpd002 commented Jul 4, 2015

Not a problem with large file support after all, it's just that Win32's ReadFile (called by fread) reports an error when trying to read a file on a write-protected memory region (rather than triggering an exception that the emulator could catch).

Quite easy to fix and will be in Sunday's build.

@jpd002
Copy link
Owner Author

jpd002 commented Jul 5, 2015

@HerPizzaFace2 I'm testing games using ISZ files (UltraISO compressed disk images) for the most part and the crash doesn't happen because the protected memory is being written by user code (rather than a system call function) when using this compressed ISO format, which in turn causes the emulator's exception handler to be called.

The protected memory change is not so old (3 weeks ago), so people might have played the game successfully before that change was made. CSO files would also work properly.

@jpd002
Copy link
Owner Author

jpd002 commented Jul 5, 2015

Fixed in c844eb3. Will be in tomorrow's weekly build.

@jpd002
Copy link
Owner Author

jpd002 commented Jul 7, 2015

Awesome! Glad it works! Thanks for testing and reporting the bug! :)

@jpd002 jpd002 closed this as completed Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
@jpd002 and others