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 when opening "VFS Tool" #16084

Closed
oltolm opened this issue Sep 16, 2024 · 10 comments · Fixed by #16146
Closed

Emulator crashes when opening "VFS Tool" #16084

oltolm opened this issue Sep 16, 2024 · 10 comments · Fixed by #16146
Labels

Comments

@oltolm
Copy link
Contributor

oltolm commented Sep 16, 2024

Start a game and close it. Click "Utilities" -> "VFS Tool" and the emu will crash.

---------------------------
RPCS3: Fatal Error
---------------------------

<style>
	p {white-space: nowrap;}
</style>
<p>
	<p>Verification failed (object: 0x0)<br>
(in file C:/src/rpcs3/Utilities/mutex.cpp:7[:2], in function void shared_mutex::imp_lock_shared(u32))<br>
Emulation is stopped<br>
Build: 0.0.33-16934-0a24cd49 Alpha | fixes | local_build<br>
Date: 2024-09-16T20:50:34</p><br>
	HOW TO REPORT ERRORS:<br>
	<a href='https://github.com/RPCS3/rpcs3/wiki/How-to-ask-for-Support'>https://github.com/RPCS3/rpcs3/wiki/How-to-ask-for-Support</a><br>
	Please, don't send incorrect reports. Thanks for understanding.<br>
</p>

---------------------------
OK   
---------------------------
rpcs3.exe caused a Fast Fail at location 00007FFB27D7286E in module ucrtbase.dll with code 7 (FATAL_APP_EXIT).

AddrPC           Params
00007FFB27D7286E 000012F600000003 0000000000000003 000012BEE7AD8E00  ucrtbase.dll!abort+0x4e
00000000006B7B07 0000000000000000 0000000000000000 0000000000000000  rpcs3.exe!report_fatal_error+0x1437
0000000000DACB6D 0000000000000000 00007FFB2A1A1040 00007FFA73200000  rpcs3.exe!thread_ctrl::emergency_exit+0x88d
0000000000D82716 000000D5469F3B20 00007FFA81223CBE 000000000000037F  rpcs3.exe!fmt::raw_verify_error+0x3c6
0000000000682915 000000D5469F1BE8 000000D500001FBD 0000000000000000  rpcs3.exe!ensure<bool>+0xb5
0000000000D77008 0000000000000000 0000129CE85AD550 000000000000002B  rpcs3.exe!shared_mutex::imp_lock_shared+0x1f8
00000000009D0742 0000000100000010 0000000000000000 000000000010000B  rpcs3.exe!shared_mutex::lock_shared+0x1a2
00000000009D01C7 000000000010000B 00007FFB2A1C2848 00000000FFFFFB00  rpcs3.exe!reader_lock::reader_lock+0xc7
0000000001882F23 0000129AE7C95440 000012A2E88C4FC8 0000129AE8288E70  rpcs3.exe!vfs::get+0x633
0000000002F0ADE2 000012A4E7A33720 00007FFA73707B00 000000D5469F2910  rpcs3.exe!vfs_tool_dialog::handle_vfs_path+0x2a2
0000000002F0AA6A 00007FFA82FF0378 184E4CB6FE28162E 0000000000000000  rpcs3.exe!vfs_tool_dialog::vfs_tool_dialog+0x34a
0000000001603AE1 0000000000000001 000012A4E7A33720 000000D5469F2C00  rpcs3.exe!main_window::CreateConnects()::$_58::operator()+0x61
00000000016039C3 000012B8E7A85AD0 00007FFA82BDC4A7 12AC433B756597BC  rpcs3.exe!QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, main_window::CreateConnects()::$_58>::call+0xf3
00000000016038A3 0000000000000000 000000D5469F2BD0 8000000000000000  rpcs3.exe!QtPrivate::FunctorCallable<main_window::CreateConnects()::$_58>::call<QtPrivate::List<>, void>+0x23
0000000001603840 0000129CE7B29B90 00007FFA7338B4AB 12AC433B7565979C  rpcs3.exe!QtPrivate::QCallableObject<main_window::CreateConnects()::$_58, QtPrivate::List<>, void>::impl+0x90
00007FFA732E49BC 0000000000000000 000000150000053F 0000000000000000  Qt6Core.dll!doActivate<false>+0x5bc
00007FFA8163E326 000012C6E7A4CB80 0000129CE7B2A810 00007FFA7329C580  Qt6Gui.dll!QAction::activate+0x136
00007FFA82BDBFE1 000000B900000059 0000000000000000 0000000000032001  Qt6Widgets.dll!QMenuPrivate::activateCausedStack+0x71
00007FFA82BD9843 000000D5469F2FD0 00007FFA819127D0 0000000000000000  Qt6Widgets.dll!QMenuPrivate::activateAction+0x2c3
00007FFA82BE0A65 DB197B5500000000 00007FFA73707B00 0000129AE7C95200  Qt6Widgets.dll!QMenu::mouseReleaseEvent+0x1a5
00007FFA82A5D57E 0000000000000018 0000000000000001 000000D5469F3138  Qt6Widgets.dll!QWidget::event+0x8ce
00007FFA82BE1164 000000D5469F32B0 184E4CB6FE280F7E 000000D5469F3320  Qt6Widgets.dll!QMenu::event+0x4e4
00007FFA82A08F70 00007FFA81FC4E92 00007FFA8120F84B 00007FFA81223BFE  Qt6Widgets.dll!QApplicationPrivate::notify_helper+0xf0
00007FFA82A0B59A 0000000000000000 4067200000000000 0000000000000000  Qt6Widgets.dll!QApplication::notify+0x190a
00007FFA7328FAFD 8000000000000000 8000000000000000 3FE0000000000000  Qt6Core.dll!QCoreApplication::notifyInternal2+0xad
00007FFA82A09540 000012A4E7A33720 0000000000000000 000000D500000000  Qt6Widgets.dll!QApplicationPrivate::sendMouseEvent+0x330
00007FFA82A761D3 000000D5469F37C0 000012AAE7BB9FB0 000000D5469F3B20  Qt6Widgets.dll!QWidgetWindow::handleMouseEvent+0xb73
00007FFA82A74E50 184E4CB6FE28080E 00007FFA73707B00 0000000000000001  Qt6Widgets.dll!QWidgetWindow::event+0x70
00007FFA82A08F70 0000000000000001 000000D5469F3B48 000000D5469F38C0  Qt6Widgets.dll!QApplicationPrivate::notify_helper+0xf0
00007FFA82A09EA9 0000000000004604 000000D5469F3B80 00001298E7A6B830  Qt6Widgets.dll!QApplication::notify+0x219
00007FFA7328FAFD 000000D546164000 00007FFB01702220 0000000000030000  Qt6Core.dll!QCoreApplication::notifyInternal2+0xad
00007FFA81223CBE 0000000000000000 0000000000000000 0000129AE7B84440  Qt6Gui.dll!QGuiApplicationPrivate::processMouseEvent+0x80e
00007FFA8128D3DA 000012B8E7A21320 0000000000000001 00000000000000A4  Qt6Gui.dll!QWindowSystemInterface::sendWindowSystemEvents+0x1ca
00007FFA7342C733 000000D5469FD870 0000000000000080 000000D5469F6F78  Qt6Core.dll!QEventDispatcherWin32::processEvents+0x53
00007FFA815A94C5 000000D5469F6F78 0000000000000001 0000000000000000  Qt6Gui.dll!QWindowsGuiEventDispatcher::processEvents+0x15
00007FFA73299CE6 000000D5469F6EE0 00000294E7A00000 000000D5469FD020  Qt6Core.dll!QEventLoop::exec+0x216
00007FFA732902A3 00000000000003E8 0000000000003D09 00000000000001F4  Qt6Core.dll!QCoreApplication::exec+0x83
00000000006CD5CD 000000000000000E 000000D5469FF830 00000294E7737D0F  rpcs3.exe!qMain+0x1306d
0000000001725038 0000000000000001 000000000C439F50 000000000C439F48  rpcs3.exe!main+0xd8
0000000000621313 0000000000000000 0000000000000000 0000000000000000  rpcs3.exe!__tmainCRTStartup+0x1b3
0000000000621156 0000000000000000 0000000000000000 0000000000000000  rpcs3.exe!WinMainCRTStartup+0x16
00007FFB29997374 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x14
00007FFB2A1BCC91 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x21
@FlexBy420
Copy link

Unable to reproduce.

@oltolm
Copy link
Contributor Author

oltolm commented Sep 16, 2024

Did you start a game first?

@FlexBy420
Copy link

Well yeah :bruh:

@Megamouse
Copy link
Contributor

Missing log file

@oltolm
Copy link
Contributor Author

oltolm commented Sep 19, 2024

RPCS3.zip
Log file.

@AniLeo AniLeo added GUI and removed Meta: Invalid labels Sep 20, 2024
@Megamouse
Copy link
Contributor

Closing since the user is running from C:\Program Files

@oltolm
Copy link
Contributor Author

oltolm commented Sep 20, 2024

This log is from a new installation not in C:\Program Files.
RPCS3_new.zip

@AniLeo AniLeo reopened this Sep 20, 2024
@digant73
Copy link
Contributor

digant73 commented Sep 25, 2024

not having a crash but I saw more than one time that adding a path (e.g. for dev_hdd0) the path is not taken into account (e.g. the added path contains contents that should be discovered clicking on the refresh button). I have to remove the path and add it again and it will finally work

EDIT: sorry my mistake. I confirm the same issue

@oltolm
Copy link
Contributor Author

oltolm commented Sep 26, 2024

I found the bug.

In Emulator::Kill System.cpp line 3587 fs_manager is reset.

g_fxo->reset();

fs_manager is initialized only in vfs::mount

bool vfs::mount(std::string_view vpath, std::string_view path, bool is_dir)
{
	if (vpath.empty())
	{
		// Empty relative path, should set relative path base; unsupported
		vfs_log.error("Cannot mount empty path to \"%s\"", path);
		return false;
	}

	// Workaround
	g_fxo->need<vfs_manager>();

When you open the "VFS Tool" vfs::get gets called which does not initialize the vfs_manager.

@digant73
Copy link
Contributor

digant73 commented Sep 27, 2024

I found the bug.

In Emulator::Kill System.cpp line 3587 fs_manager is reset.

g_fxo->reset();

fs_manager is initialized only in vfs::mount

bool vfs::mount(std::string_view vpath, std::string_view path, bool is_dir)
{
	if (vpath.empty())
	{
		// Empty relative path, should set relative path base; unsupported
		vfs_log.error("Cannot mount empty path to \"%s\"", path);
		return false;
	}

	// Workaround
	g_fxo->need<vfs_manager>();

When you open the "VFS Tool" vfs::get gets called which does not initialize the vfs_manager.

good. Consider to open a PR with the fix

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

Successfully merging a pull request may close this issue.

5 participants