mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-04-25 06:06:03 +03:00
[GH-ISSUE #4241] VS 2013 RTM,many games crash on startup with X64 release build #1725
Labels
No labels
Atrac3+
Audio
CPU emulation
D3D11
D3D9 (removed)
Depth / Z
Feature Request
Font Atlas
GE emulation
Guardband / Range Culling
HLE/Kernel
I/O
Input/Controller
MP3
Multithreading
Needs hardware testing
Networking/adhoc/infrastructure
No Feedback / Outdated?
OpenGL
PGF / sceFont
PSMF / MPEG
Platform-specific (Android)
Platform-specific (Windows)
Platform-specific (iOS)
PowerVR GPU
SDL2
Saving issue
User Interface
Vulkan
arm64jit
armjit
armv6
x86jit
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ppsspp#1725
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daniel229 on GitHub (Oct 19, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/4241
X64 debug build works fine,win32 release and debug build work fine.

crashed games list :
7th dragon 2020 2 JPN
Kingdom Heart BBS FM JPN
Fate Extra CCC JPN
Sword Art Online JPN
Dragon Ball Tag Versus JPN
ETC.
@hrydgard commented on GitHub (Oct 19, 2013):
Hm, I think we had some pretty bad memory overwrite around this code a while ago... maybe the new optimizer in 2013 changes the order of things in memory, exposing some new overwrite that we just didn't notice before.
Needs investigation indeed.
@thedax commented on GitHub (Oct 19, 2013):
That one's not crashing for me with VS2013 RTM..bad game ISO perhaps? Unfortunately, I don't have any of the other games listed, but in my experience I've seen zero crashes with my x64 release build so far. Maybe make sure you're not using any crazy optimisation settings.
@daniel229 commented on GitHub (Oct 20, 2013):
I have not changed anything except update Visual C++ compiler and libraries.I think these ISOs are not bad dumps.The stack traces are the same when they crashes,and these games all need PGD decrypted.
@thedax commented on GitHub (Oct 20, 2013):
Oh, right, I forgot: I use an english patched ISO(I patched it myself from Japanese), so the PGD stuff is probably not an issue for me..is yours not touched in any way?
@daniel229 commented on GitHub (Oct 20, 2013):
One of my games still crashes with PGD decrypted.
@solarmystic commented on GitHub (Oct 20, 2013):
I'd like to chime in that Kingdom Heats BBS: FM (JP, english patched edition I have) also crashes using an x64 release build I compiled with MSVC 2013 RTM Express. No crazy settings used, just the defaults, and the project files upgraded to MSVC 2013.
Stack trace from x64 release build on MSVC 2013:
Locals:
Tried to get a stacktrace from an x64 debug build using MSVC 2013, but it works fine, just like @daniel229 reported earlier on. Win32 and Win32 Debug builds also work fine, strangely enough.
Also works perfectly fine on the latest buildbot builds (both 32bit and 64bit) that are currently compiled with MSVC 2010.
Quite strange, since other games I have do not exhibit this issue when PPSSPP is compiled with MSVC 2013 RTM.
@daniel229 commented on GitHub (Oct 23, 2013):
change /O2 to /Od,It works again, X64 build can not use /O1,/02,Ox optimization in vs2013.

@daniel229 commented on GitHub (Oct 23, 2013):
Only need disable optimization in project libkirk.
@hrydgard commented on GitHub (Oct 23, 2013):
Ah good! Thanks for investigating.
libkirk has some gnarly code..
@hrydgard commented on GitHub (Oct 23, 2013):
If you want to investigate more, you can put this in various places in the code, and see if you can narrow it down:
#pragma optimize( "", off )
Every function below that pragma will not be optimized. So you can turn on optimization, put that at the top of a suspicious file and see if it fixes it. If it does, move it down the file until it breaks - the last function will be the one that gets miscompiled with optimization.
@daniel229 commented on GitHub (Oct 23, 2013):
It is the function in amctrl.c.
int sceDrmBBMacFinal(MAC_KEY *mkey, u8 *buf, u8 *vkey){}
@daniel229 commented on GitHub (Oct 23, 2013):
It's the sub_158(u8 *buf, int size, u8 *key, int key_type) inside int sceDrmBBMacFinal(MAC_KEY *mkey, u8 *buf, u8 *vkey)
@hrydgard commented on GitHub (Oct 23, 2013):
Feel free to send a pull request to turn off optimization in that file until we can figure out in detail what's going wrong.
Either do
at the top, or turn it off in the vcproj. This is not really a speed bottleneck so it's fine if it's not optimized.
@daniel229 commented on GitHub (Oct 23, 2013):
only disable in vs2013?
@hrydgard commented on GitHub (Oct 23, 2013):
sure :)
@xsacha commented on GitHub (Dec 3, 2013):
This issue is the same as https://github.com/hrydgard/ppsspp/issues/3411
So it affects some 64-bit GCC as well when -O3.
From the 'Locals' output, this looks very suspicious:
Apparently tmp1 = tmp. Although tmp1 has never been used before other than a memcpy. So why does it have the same address as tmp?
@hrydgard commented on GitHub (Dec 5, 2013):
@xsacha, yeah that can't be good. bizarre. optimizer bug? could try declaring one of them or both volatile...
@daniel229 commented on GitHub (Jan 21, 2014):
Still existed in Visual Studio 2013 Update 1
@daniel229 commented on GitHub (May 13, 2014):
Still presented on update 2
@daniel229 commented on GitHub (Aug 3, 2015):
Fixed in update 5.
@gamelaster commented on GitHub (Aug 4, 2015):
Yup, Fixed on Update 5/VS2015
@unknownbrackets commented on GitHub (Dec 20, 2015):
Should we close this then?
-[Unknown]