-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Segmentation fault in Valkyria Chronicles 2 #5046
Comments
This is fairly repeatable on my end, but not so much that a savestate would guarantee crashing for you. Any suggestions for debugging and giving you info? The function called is: Which is pretty unhelpful i feel. |
This is a segfault in jit somewhere. A savestate before it could be helpful, savedata would be a lot better. Seeing the assembly around the crash might help but I'm sure it's just a memory access so probably not much... I also recommend trying:
-[Unknown] |
Unfortunately, VC2 doesn't have a in-mission save. Fast memory disabling does indeed 'stop' it crashing. The log says: the savestate (just wait for the hang) https://drive.google.com/file/d/0BzxkBmaf1EiWcURrN2NCU1RDZE0/edit?usp=sharing |
Eh, in wine 32 bits trying to load that gives me 'Error: After "MetaFileSystem", found 1701996868 (0x65726944) instead of save marker 66 (0x42). Aborting savestate load...' Seems like savestates are not very compatible between platforms (wine 64 bits didn't even start ppsspp). |
Hmm. They used to be, must be a recent bug, darn... -[Unknown] |
Hmm, unfortunately I don't have the Europe version to test the savestate... For the savestate thing, are you sure that they are both exactly the same version of PPSSPP? Savestates are not backwards compatible. -[Unknown] |
No. I just used the last stable version at first. But later i tried git, it went down in flames too in wine 32 bits version (with a different error). Though maybe, that was just the segmentation fault manifesting. 64 bits kept not working on wine64 |
Has this improved at all in the latest build? We've fixed some things this could be caused by for sure. Also, I think I fixed some cross platform issues with savestates. -[Unknown] |
Nope. Last few lines of all debug log: Only one error as you can see. Haven't tried wine. As usual, disabling fast memory fixes this. |
Oh, okay. If you have fast memory disabled, it should log something like "invalid getpointer" or "invalid address". Seeing that part of the log would help. Also, if you could savestate again with the latest version and upload that, I can try and see if it works in Windows now. -[Unknown] |
https://gist.github.com/i30817/9032649 It starts with that I will upload a new savestate to google drive soon. |
Just to be sure, if you set "PSPModel" to "PSP-1000" and make sure that hacks (such as the timer hack, locked cpu speed, and Read Framebuffers to Memory) are all disabled, this still happens, right? -[Unknown] |
Yeah. I tried software mode too. |
Does this still happen? If you disable fast memory, and disable "ignore illegal memory reads" (not sure the name of the setting currently, it's under Debug on Windows), does the log show anything interesting, or does it still hard crash? If it does still hard crash, can you get a gdb trace with symbols at all? -[Unknown] |
The setting is |
Correct. What that will do is make the emulation halt when a bad memory access occurs (fast mem must be off.) The PSP would crash in this situation so it's technically more correct. Then the log will end with information about the bad access. -[Unknown] |
With those settings PPSSPP doesn't crash but still blackscreens and the game is stuck. The debug log doesn't show anything interesting i think:
With fast memory off and IgnoreBadMemAccess=True again With fast memory on and IgnoreBadMemAccess=True it cores dump right away as usual. |
Some progress? The shutdown segfault from the 'Exit to menu' gave this backtrace in gdb
|
Hmm. Maybe font related then? Pretty sure this game does use sceFont. Does this happen even with official PSP fonts? Maybe we can try commenting out the sceKernel line that registers the sceFont functions. -[Unknown] |
the backtrace of the ingame segfault with fast memory off (with IgnoreBadMemAccess or not) is still useless,
|
Thing is, i am using the official fonts. If i delete them from the PPSSPP flash0 dir the savestate segfaults right away in __FontShutdown. Maybe i'm missing a few and the game freaks out, there was a warning about those. Or maybe the segfaults are for different things. |
The reason the backtrace is useless is that it's in jit. You can try turning jit off but it will probably still not mean much since it will be from interp most likely... zh_gb.pgf isn't a real font that should be there, don't worry about that. What if you comment out this line? Line 1389 in 0a8e6c2
This will prevent sceFont from running at all, but it will also break savestates. Hmm. I wonder if it's some struct alignment issue affecting only Linux. This hmm: Line 131 in 0a8e6c2
What if you put -[Unknown] |
what in every single attribute of the all the structs in that file? Or just the last? |
oh wait, the syntax is after struct not before, let me try it |
Didn't help the Exit to menu crash (or the others). |
doh, i should have just compiled with Debug for line numbers, wait a moment for that backtraceable segfault |
well, debug compiling breaks very spectacularly so no line numbers. |
@i30817 just comment out this one line: https://github.com/hrydgard/ppsspp/blob/master/ext/xbrz/xbrz.cpp#L621 I doubt it will matter to your issue |
thanks
|
Does this still happen? -[Unknown] |
This issue is being closed because it hasn't been updated with feedback. It's hard to tell when fixes in PPSSPP might fix other games, and sometimes certain settings or cheats may cause bugs that can't be fixed. If you have more information or can confirm it still happens in the latest git builds, please reply to this issue and it'll be reopened. If you have a new issue with the same game, just create a new issue instead. -[Unknown] |
I used gdb:
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 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-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/i30817/Documents/Netbeans_projects/ppsspp/PPSSPPSDL...done.
(gdb) continue
The program is not being run.
(gdb) run
Starting program: /home/i30817/Documents/Netbeans_projects/ppsspp/PPSSPPSDL
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffec762700 (LWP 28753)]
[Thread 0x7fffec762700 (LWP 28753) exited]
[New Thread 0x7fffec762700 (LWP 28754)]
OpenGL 2.0 or higher.
D: /home/i30817/Documents/Netbeans_projects/ppsspp/native/file/zip_read.cpp:302: D: Registered VFS for prefix : /home/i30817/Documents/Netbeans_projects/ppsspp/assets/
D: /home/i30817/Documents/Netbeans_projects/ppsspp/native/file/zip_read.cpp:302: D: Registered VFS for prefix : /home/i30817/Documents/Netbeans_projects/ppsspp/
D: /home/i30817/Documents/Netbeans_projects/ppsspp/native/file/zip_read.cpp:302: D: Registered VFS for prefix : /home/i30817/
[New Thread 0x7fffed53c700 (LWP 28755)]
Pixels: 960 x 544
Virtual pixels: 960 x 544
I: /home/i30817/Documents/Netbeans_projects/ppsspp/native/gfx_es2/gl_state.cpp:127: I: GPU Vendor : X.Org ; GL version str: 3.0 Mesa 9.1.7
I: /home/i30817/Documents/Netbeans_projects/ppsspp/native/gfx/texture.cpp:283: I: ZIM loaded: 1 levels
I: /home/i30817/Documents/Netbeans_projects/ppsspp/native/gfx/texture.cpp:314: I: Gen-binding texture
[New Thread 0x7fffebf61700 (LWP 28756)]
[New Thread 0x7fffeb760700 (LWP 28757)]
[New Thread 0x7fffe885f700 (LWP 28758)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffeb760700 (LWP 28757)]
0x0000000040259197 in ?? ()
(gdb) backtrace
#0 0x0000000040259197 in ?? ()
#1 0x0000000000001000 in ?? ()
#2 0x0000000000001000 in ?? ()
#3 0x00007ffff7bce740 in ?? ()
from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00007ffff7ffd060 in ?? () from /lib64/ld-linux-x86-64.so.2
#5 0x0000000000000001 in ?? ()
#6 0x00007fffeb75fc90 in ?? ()
#7 0x0000000001f63370 in ?? ()
#8 0x00000000008092a3 in MIPSComp::Jit::RunLoopUntil(unsigned long long) ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
I tried the voodoo in this stackoverflow link first answer: http://stackoverflow.com/questions/9809810/gdb-corrupted-stack-frame-how-to-debug
(gdb) set $pc = (void *)$rsp
(gdb) set $rsp = $rsp + 8
(gdb) backtrace
#0 0x0000000000001000 in ?? ()
#1 0x0000000000001000 in ?? ()
#2 0x00007ffff7bce740 in ?? ()
from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x00007ffff7ffd060 in ?? () from /lib64/ld-linux-x86-64.so.2
#4 0x0000000000000001 in ?? ()
#5 0x00007fffeb75fc90 in ?? ()
#6 0x0000000001f63370 in ?? ()
#7 0x00000000008092a3 in MIPSComp::Jit::RunLoopUntil(unsigned long long) ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
But as you can see it didn't work. Maybe i will try valgrind too.
The text was updated successfully, but these errors were encountered: