I bought the game Stardew Valley on steam, installed it, launched it. Nothing happened :(...
When I took a look in the eventviewer I saw the following information:
Application: Stardew Valley.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.BadImageFormatException at StardewValley.Program.Main(System.String)
To me this sounds like a bad dll or a wrong architecture for a dll, but I haven't been able to sort out what the problem is. Right after that:
Faulting application name: Stardew Valley.exe, version: 1.0.5940.30711, time stamp: 0x5705b1ef Faulting module name: KERNELBASE.dll, version: 10.0.10586.162, time stamp: 0x56cd55ab Exception code: 0xe0434352 Fault offset: 0x000bdad8 Faulting process id: 0x23d8 Faulting application start time: 0x01d19eee1ec0b80d Faulting application path: F:\Steam\steamapps\common\Stardew Valley\Stardew Valley.exe Faulting module path: C:\WINDOWS\SYSTEM32\KERNELBASE.dll Report Id: b8cdbcca-597d-4eb4-a44c-47f2b8c510a5 Faulting package full name: Faulting package-relative application ID:
Fault bucket 108078241334, type 1 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: Stardew Valley.exe P2: 1.0.5940.30711 P3: 5705b1ef P4: KERNELBASE.dll P5: 10.0.10586.162 P6: 56cd55ab P7: e0434352 P8: 000bdad8 P9: P10:
I like to fix my own problems, but after 6 hours I give up. I used Dependency Walker to inform me about missing dll's or incompatible versions. One of the strange things is that the game exe is x86 and all loaded dll's are x64. My wife also has the game and it works on her machine, however Dependency Walker reported no big differences. She only got a few more dll's available (which I copied afterwards, but didn't help).
Here is what I tried (with reboots in between):
I decompiled the exe to look at its references, which are:
All these dll's were succesfully resolved.
What more can I do to try to fix this issue? I will reinstall my system in two months from now, which might help, but I think it is too radical to do it now for the sake of 1 program that refuses to launch.
Here is a crash dump which will expire on 27-04-2016.
I also looked into the crash dump and tried to debug it with Visual Studio 2015. I'm getting the following error: An unhandled exception of type 'System.BadImageFormatException' occurred in Unknown Module.
Additional information: Could not load file or assembly 'Microsoft.Xna.Framework.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) If there is a handler for this exception, the program may be safely continued.
I do not understand this error. I already reinstalled it twice!
However, when I search for the dll, I find multiple version located at the following places:
When I look at the references with DotPeek it says it takes this one: C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.dll (which exists).
I finally fixed it. Here is the solution:
I had the x64
X3dAudio_7.dll in the sysWow64 folder and the x86
X3dAudio_7.dll in the system32 folder. I switched them, reinstalled XNA and everything worked!
I found this out by opening Microsoft.Xna.Framework.dll in Dependency Walker. I noticed that all refered DLL's were x64 except for this one.
It may not seem logical but, if you have a x64 installation of windows, all x64 dll's go into the system32 folder and the x86 dll's into the SysWow64 folder.
I was going to just add a comment but can't yet, and this is unlikely to work anyway, but it's worth a shot since you probably haven't tried it.
You might want to uninstall the game before doing this, but it's up to you really as you seem to have a pretty decent grasp on this stuff anyway.
With Steam closed
1) Start > Run > %temp% (clear all that junk out)
2) Clear out the temporary files in
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files and
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
3) Run the .NET repair utility (and possibly update .NET to the latest stable version which might be 4.6.2): https://www.microsoft.com/en-us/download/details.aspx?id=30135
Then maybe reboot and try again, or reinstall the game if you removed it before doing that stuff.
Edit: and all of that stuff you've uninstalled/reinstalled, did you install both the x64 and x86 versions?
Also seems to be some relevant discussions here
User contributions licensed under CC BY-SA 3.0