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

dev_hdd0 reading problem; emulator crashes on start #1494

Closed
TheCrueltySage opened this issue Feb 10, 2016 · 6 comments
Closed

dev_hdd0 reading problem; emulator crashes on start #1494

TheCrueltySage opened this issue Feb 10, 2016 · 6 comments

Comments

@TheCrueltySage
Copy link

Decided to try out compiling this emulator for Steins;Gate Zero, which I heard runs fine.
However, the emulator crashes when I try to run ./rcps3 with the following log.

vm::g_base_addr = 0x7faef6b37000
vm::g_priv_addr = 0x7fadf6b37000
14:05:42: Debug: Unknown accel modifier: 'ctrl '
14:05:42: Debug: Unrecognized accel key ' s', accel string ignored.
Fatal error: Access violation reading location (nil) at 0x7fafff24dc00.
Please report this error to the developers.
Aborted
The particular values shift around, but (nil) and everything else stays the same.

gdb backtrace:

GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://bugs.gentoo.org/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from rpcs3...done.
(gdb) show configuration
This GDB was configured as follows:
configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-auto-load-dir=$debugdir:$datadir/auto-load
--with-auto-load-safe-path=$debugdir:$datadir/auto-load
--without-expat
--with-gdb-datadir=/usr/share/gdb (relocatable)
--with-jit-reader-dir=/usr/lib64/gdb (relocatable)
--without-libunwind-ia64
--with-lzma
--with-python=/usr (relocatable)
--without-guile
--with-separate-debug-dir=/usr/lib/debug (relocatable)
--without-babeltrace

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)
(gdb) handle SIGSEGV nostop noprint
Signal Stop Print Pass to program Description
SIGSEGV No No Yes Segmentation fault
(gdb) run
Starting program: /home/[edited out]/Downloads/rpcs3/bin/rpcs3
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
vm::g_base_addr = 0x7ffeeb936000
vm::g_priv_addr = 0x7ffdeb936000
14:06:02: Debug: Unknown accel modifier: 'ctrl '
14:06:02: Debug: Unrecognized accel key ' s', accel string ignored.
[New Thread 0x7ffde96f0700 (LWP 14278)]
[New Thread 0x7ffde8eef700 (LWP 14279)]
[New Thread 0x7ffde3fff700 (LWP 14280)]
[New Thread 0x7ffde37fe700 (LWP 14281)]
Fatal error: Access violation reading location (nil) at 0x7ffff404cc00.
Please report this error to the developers.

Program received signal SIGABRT, Aborted.
0x00007ffff3fcad98 in raise () from /lib64/libc.so.6
(gdb) backtrace

0 0x00007ffff3fcad98 in raise () from /lib64/libc.so.6

1 0x00007ffff3fcc21a in abort () from /lib64/libc.so.6

2 0x000000000173bf44 in signal_handler (sig=11, info=0x7fffffffc3b0, uct=0x7fffffffc280)

at /home/[edited out]/Downloads/rpcs3/Utilities/Thread.cpp:1248

3

4 0x00007ffff404cc00 in opendir () from /lib64/libc.so.6

5 0x000000000174273d in fs::dir::open (this=0x3940a88,

dirname="/home/[edited out]/Downloads/rpcs3/bin/dev_hdd0/game")
at /home/[edited out]/Downloads/rpcs3/Utilities/File.cpp:859

6 0x00000000012e887a in vfsLocalDir::Open (this=0x3940a30,

path="/home/[edited out]/Downloads/rpcs3/bin/dev_hdd0/game")
at /home/[edited out]/Downloads/rpcs3/rpcs3/Emu/FS/vfsLocalDir.cpp:15

7 0x00000000012dbc32 in VFS::OpenDir (this=0x36779c0, ps3_path="/dev_hdd0/game/")

at /home/[edited out]/Downloads/rpcs3/rpcs3/Emu/FS/VFS.cpp:158

8 0x00000000012d5eb7 in vfsDir::Open (this=0x7fffffffcba0, path="/dev_hdd0/game/")

at /home/[edited out]/Downloads/rpcs3/rpcs3/Emu/FS/vfsDir.cpp:28

9 0x00000000012d5e1c in vfsDir::vfsDir (this=0x7fffffffcba0, path="/dev_hdd0/game/")

at /home/[edited out]/Downloads/rpcs3/rpcs3/Emu/FS/vfsDir.cpp:21

10 0x00000000016042ba in GameViewer::LoadGames (this=0x3913640)

at /home/[edited out]/Downloads/rpcs3/rpcs3/Gui/GameViewer.cpp:85

11 0x0000000001605a6f in GameViewer::Refresh (this=0x3913640)

at /home/[edited out]/Downloads/rpcs3/rpcs3/Gui/GameViewer.cpp:177

12 0x0000000001603f72 in GameViewer::GameViewer (this=0x3913640, parent=0x3808b50)

at /home/[edited out]/Downloads/rpcs3/rpcs3/Gui/GameViewer.cpp:54

13 0x000000000165a8d5 in MainFrame::MainFrame (this=0x3808b50)

at /home/[edited out]/Downloads/rpcs3/rpcs3/Gui/MainFrame.cpp:127

14 0x0000000000c80dbf in Rpcs3App::OnInit (this=0x376f920)

at /home/[edited out]/Downloads/rpcs3/rpcs3/rpcs3.cpp:181

15 0x0000000000c87829 in wxAppConsoleBase::CallOnInit (this=0x376f920) at /usr/include/wx-3.0/wx/app.h:93

16 0x00007ffff6f93f42 in wxEntry(int&, wchar_t**) () from /usr/lib64/libwx_baseu-3.0.so.0

17 0x0000000000c80399 in main (argc=1, argv=0x7fffffffdcf8)

at /home/[edited out]/Downloads/rpcs3/rpcs3/rpcs3.cpp:5

The configuration is default. RPCS3.log is empty, as is every other file in .config/rpcs3.

The system is Gentoo Unstable with some git builds (nothing that rpcs3 directly depends on, though). Tried using compilers GCC 5.3.0 and Clang 3.6.2 in succession, also trying out GCC without fitting Clang. The result is always the exact same backtrace (with minor differences like path variables not being shown in Clang-compiled version because of a bug). The version of the emulator is the current last Git version(303a109), though trying out the packed four-days-old source code at Bigpet with the label (f66468f) gives the same error, apparently.
My CPU is Intel Core i7-3612QM. My usual CFLAGS and CXXFLAGS are "-march=corei7-avx -mtune=corei7-avx -O2 -pipe -fstack-protector-strong", however unsetting CFLAGS and compiling the program without them gives no difference (the backtrace I used above was specifically for a program compiled with no custom cflags).
I have an Optimus system that I handle with bumblebee (usually primus). Running rpcs3 with either primusrun or optirun makes no difference from running it via integrated Intel card (except for mising "Aborted" at the end with optirun or two "Aborted" in the row with primusrun). And it's not like it gets to even load anything, anyway.

I have no idea what the problem is. Can you help me?

@TheCrueltySage TheCrueltySage changed the title dev_hd0 reading problem; emulator crashes on start dev_hdd0 reading problem; emulator crashes on start Feb 10, 2016
@lvonasek
Copy link

in Utilities/Files.cpp replace line
const auto ptr = ::opendir(m_path.get());
with
const auto ptr = ::opendir(dirname.c_str());

@TheCrueltySage
Copy link
Author

Thanks! The fix worked.
Tried updating to the latest version, just this alone didn't fix it. Tried the fix you offered and finally managed to run the emulator. Didn't try anything else yet, but at least it loads.

@tambry tambry added the Bug label Feb 26, 2016
@tambry
Copy link
Contributor

tambry commented Feb 26, 2016

That sure looks like a typo. If you don't mind you could make a PR to get the fix merged.

@TheCrueltySage
Copy link
Author

Sorry, I don't have much experience with Github. Can't figure out how to do it.

@lvonasek
Copy link

same for me - thats why I wrote it into comment

@tambry
Copy link
Contributor

tambry commented Feb 26, 2016

I'll do it myself then.

@tambry tambry closed this as completed in 06cbe4a Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants