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

Present an error message when failing to open a file that should exist. #7603

Merged
merged 1 commit into from Dec 4, 2018

Conversation

3 participants
@jordan-woyak
Contributor

jordan-woyak commented Dec 2, 2018

This could happen with savestate loads, permission issues, or use by other processes.
Prior to this Dolphin assumed any existing file could be opened and crashes from invalid variant access.
In my case DropBox sync was causing random crashes.
Failing to open a file during savestate load will likely still crash but at least the user will know why.

@delroth delroth requested a review from leoetlino Dec 3, 2018

};
// Use the custom deleter from above.
std::shared_ptr<File::IOFile> file_ptr =

This comment has been minimized.

@leoetlino

leoetlino Dec 3, 2018

Member

I'd use auto here as it's clear what the type is, but feel free to ignore this.

This comment has been minimized.

@jordan-woyak

jordan-woyak Dec 4, 2018

Contributor

Good call. I've eliminated the redundant type specification.

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:fs-open-file-fix branch 2 times, most recently from 0889658 to 8e2d422 Dec 4, 2018

Present an error message when failing to open a file that should exist.
This could happen with savestate loads, permission issues, or use by other processes.
Prior to this Dolphin assumed any existing file could be opened and crashes from invalid variant access.
Failing to open a file during savestate load will likely still crash but at least the user will know why.

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:fs-open-file-fix branch from 8e2d422 to 122ce28 Dec 4, 2018

@delroth delroth merged commit 2c57e70 into dolphin-emu:master Dec 4, 2018

10 checks passed

default Very basic checks passed, handed off to Buildbot.
Details
lint Build succeeded on builder lint
Details
pr-android Build succeeded on builder pr-android
Details
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
Details
pr-deb-x64 Build succeeded on builder pr-deb-x64
Details
pr-freebsd-x64 Build succeeded on builder pr-freebsd-x64
Details
pr-osx-x64 Build succeeded on builder pr-osx-x64
Details
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
Details
pr-win-dbg-x64 Build succeeded on builder pr-win-dbg-x64
Details
pr-win-x64 Build succeeded on builder pr-win-x64
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment