Space Engineers

Space Engineers

View Stats:
marksher Aug 7, 2016 @ 5:36am
System.AccessViolationException
Hi, I'm having a crash when opening the game, doesn't even get into the main menu.

Things I tried:

Removing mods
Reinstalling Direct X
System integrity check scan
Delete (incl. appdata) then reinstall the game
Reverted to older nvidia drivers
Safe mode delete then reinstall nvidia drivers
Made sure .NET is up to date
Repair .NET

switching to dx9 branch the game works fine but dx11 is a no go

Windows 7 64bit
NVIDIA GeForce GTX 970
Intel i5-3570K CPU @ 4.40GHz
16gb memory

Pls help thanks

Here is the error from the log:
2016-08-07 20:26:48.557 - Thread: 7 -> Exception occured: System.TypeInitializationException: The type initializer for 'VRageRender.MyRenderContext' threw an exception. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at SharpDX.Direct3D11.Device.CreateDeferredContext(Int32 contextFlags, DeviceContext deferredContextOut)
at SharpDX.Direct3D11.DeviceContext..ctor(Device device)
at VRageRender.MyRenderContext.LazyInitialize()
at VRageRender.MyRenderContext..cctor()
--- End of inner exception stack trace ---
at VRageRender.MyRender11.set_DeviceContext(DeviceContext value)
at VRageRender.MyRender11.CreateDeviceInternal(IntPtr windowHandle, Nullable`1 settingsToTry)
at VRageRender.MyRender11.CreateDeviceInternalSafe(IntPtr windowHandle, Nullable`1 settingsToTry)
at VRageRender.MyRender11.CreateDevice(IntPtr windowHandle, Nullable`1 settingsToTry)
at VRageRender.MyDX11Render.CreateDevice(IntPtr windowHandle, Nullable`1 settings)
at VRage.MyRenderThread.RenderThreadStart(Object param)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
2016-08-07 20:26:48.557 - Thread: 7 -> InnerException:
2016-08-07 20:26:48.557 - Thread: 7 -> Exception occured: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at SharpDX.Direct3D11.Device.CreateDeferredContext(Int32 contextFlags, DeviceContext deferredContextOut)
at SharpDX.Direct3D11.DeviceContext..ctor(Device device)
at VRageRender.MyRenderContext.LazyInitialize()
at VRageRender.MyRenderContext..cctor()
< >
Showing 1-15 of 74 comments
Dan2D3D  [developer] Aug 7, 2016 @ 10:02am 
Hi marksher, have you tried all the community solutions?

Usually just use the search tool of the forum to find similar crashes with solutions in.

> Try by deleting the CFG file to reset.

How to delete the CFG file:

Go to the SpaceEngineers folder
C: users / your username / appdata / roaming / spaceengineers
then delete the ''SpaceEngineers.cfg'' file

OR
Type in your explorer it's faster to find the folder: %appdata%\SpaceEngineers

Deleting the CFG will reset all settings to default.

> Try the game
Last edited by Dan2D3D; Aug 7, 2016 @ 5:21pm
KevMscotland Aug 7, 2016 @ 4:12pm 
Similar issue myself.

Problem from Log:
================================
2016-08-08 00:04:34.719 - Thread: 8 -> Exception occured: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at SharpDX.Direct3D11.DeviceContext.DrawIndexedInstanced(Int32 indexCountPerInstance, Int32 instanceCount, Int32 startIndexLocation, Int32 baseVertexLocation, Int32 startInstanceLocation)
at VRageRender.MyDepthPass.RecordCommandsInternal(MyRenderableProxy proxy, Int32 section)
at VRageRender.MyRenderingWorkRecordCommands.DoWork(WorkData workData)
at ParallelTasks.WorkItem.DoWork(Int32 expectedID)
at ParallelTasks.FixedPriorityScheduler.Worker.WorkerLoop(Object o)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
=================================

I've got the latest Nvidia Drivers.
.NET 4.6.1 installed.
Deleted the cfg file (Even deleted the folder and did a fresh game install)

I however do get a menu screen, I just can't load into the game worlds.

Specs:
============
Windows 10
Nvidia GTX 980
16GB Ram
Intel i7 4790
Dan2D3D  [developer] Aug 7, 2016 @ 5:25pm 
Hi KevMscotland, you can't create a new world?

Make sure the world is from the version you are playing because worlds created in the Dev version will not work in the stable version.

I know some Win10 users had to install Steam and the game on the C: drive to fix.
marksher Aug 7, 2016 @ 5:48pm 
Hi Dan2D3D, yes I have tried all solutions from the Steam forums and the official forums, and yes as stated I have fully deleted game including the appdata folder and have deleted the cfg on many occasions. I have rerun game cache verify, opened Steam as admin, open the game as admin, tried turning uac on and off... thanks
Dan2D3D  [developer] Aug 7, 2016 @ 5:56pm 
Hi marksher, thanks for telling.

You said NETFramework uptodate > that means you have the 4.6.1 and Windows Service Pack 1 installed.

If you are sure all of that is OK, it must be something else!

Game and Steam is installed on the C: drive?
marksher Aug 7, 2016 @ 6:04pm 
Hi Dan2D3D, yes 4.6.1 and SP1 installed, Steam and the game are on different drives, I saw that fix but thought that was only a Windows 10 issue... thing is I can run the game using dx9 but not dx11...
Dan2D3D  [developer] Aug 7, 2016 @ 8:01pm 
Maybe the game is using the integrated graphic (if there is one) > Make sure the game is using the ''NVIDIA GeForce GTX 970'' in options.


marksher Aug 7, 2016 @ 9:33pm 
Don't have intergrated graphics, will try putting the game on C drive when I get home, thanks
marksher Aug 8, 2016 @ 3:28am 
Hi, changing game install drive did not fix the issue... anything else to try? Thanks
Dan2D3D  [developer] Aug 8, 2016 @ 8:04am 
Really not lucky, the game works fine on my side and you did all the first things to do, so must be a failed installation of NETFramework OR DirectX.

It's recommended to do a fresh installation of the NETFrame and DirectX.

Recommended by Keen team :

http://www.spaceengineersgame.com/game-wont-start-issues.html

EXE of NETFrame and DirectX can be found in the SE folder here:
C:\Program Files (x86)\Steam\SteamApps\common\SpaceEngineers\_CommonRedist
KevMscotland Aug 8, 2016 @ 10:28am 
Update:

I reinstalled the game on the C Drive - Still fails to boot into a game world. I get the menu, a loading screen with music.
For tutorial 1 I even get the spawn menu pop up... then nothing. Just sits on the loading screen.

Also, after much pain, I finally managed to completely reinstall .NET framework since:
a) It's now inbuilt to Windows 10 and a pain to remove
b) The installers don't let you reinstall as they believe things are already installed even when removed from Programs & features because of point a).

Currently.... problem still persists.
KevMscotland Aug 8, 2016 @ 10:38am 
Latest log error:

2016-08-08 18:33:50.968 - Thread: 6 -> Exception occured: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at SharpDX.Direct3D11.DeviceContext.DrawIndexedInstanced(Int32 indexCountPerInstance, Int32 instanceCount, Int32 startIndexLocation, Int32 baseVertexLocation, Int32 startInstanceLocation)
at VRageRender.MyDepthPass.RecordCommandsInternal(MyRenderableProxy proxy, Int32 section)
at VRageRender.MyRenderingWorkRecordCommands.DoWork(WorkData workData)
at ParallelTasks.WorkItem.DoWork(Int32 expectedID)
at ParallelTasks.FixedPriorityScheduler.Worker.WorkerLoop(Object o)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
2016-08-08 18:33:50.969 - Thread: 6 -> Hiding window
2016-08-08 18:33:54.777 - Thread: 1 -> Updating continues.
2016-08-08 18:33:54.786 - Thread: 1 -> GC Memory: 2,609,201,888 B
2016-08-08 18:33:54.794 - Thread: 1 -> MyGuiScreenBase.UnloadContent - START
2016-08-08 18:33:54.794 - Thread: 1 -> MyGuiScreenBase.UnloadContent - END
2016-08-08 18:34:19.581 - Thread: 1 -> MyGuiScreenBase.UnloadContent - START
2016-08-08 18:34:19.581 - Thread: 1 -> MyGuiScreenBase.UnloadContent - END
2016-08-08 18:34:24.802 - Thread: 1 -> GC Memory: 2,688,579,832 B
2016-08-08 18:34:54.811 - Thread: 1 -> GC Memory: 2,745,783,136 B
2016-08-08 18:35:24.819 - Thread: 1 -> GC Memory: 2,803,054,448 B
2016-08-08 18:35:54.828 - Thread: 1 -> GC Memory: 2,860,141,264 B
2016-08-08 18:36:24.841 - Thread: 1 -> GC Memory: 2,917,090,560 B
2016-08-08 18:36:54.850 - Thread: 1 -> GC Memory: 1,508,281,128 B
2016-08-08 18:37:24.858 - Thread: 1 -> GC Memory: 1,565,367,304 B
Dan2D3D  [developer] Aug 8, 2016 @ 11:06am 
Guys! I found 2 reports with ''SharpDX.Direct3D11'' Exception, I think they know and are working on a fix.

You could add your Log to this thread for direct help from devs:

http://forums.keenswh.com/threads/01_139_006-client-exception-occured-sharpdx-crash-after-20-40min.7385197/

Older one :

http://forums.keenswh.com/threads/game-freezes-shortly-after-starting-crash-at-sharpdx-direct3d11-devicecontext-drawindexed.7373947/
KevMscotland Aug 8, 2016 @ 11:46am 
Looks like you might be on to something Dan. Developers appear to still be working on a fix so guess I'll have to sit and wait. registered for forum and will post logs when I can.
< >
Showing 1-15 of 74 comments
Per page: 1530 50

Date Posted: Aug 7, 2016 @ 5:36am
Posts: 74