Piotrekol / StreamCompanion

osu! information extractor, ranging from selected map info to live play data
MIT License
375 stars 59 forks source link

osu! crash #44

Open LosTigeros opened 5 years ago

LosTigeros commented 5 years ago

My osu! client always crashes when I'll open StreamCompanion while both osu! (latest stable) and OBS (22.0.2 latest stable) are running.

Faulting application name: osu!.exe, version: 1.3.3.7, time stamp: 0x5c5ba714
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0xfed31cc0
Faulting process id: 0x1b68
Faulting application start time: 0x01d4c1f97957fdfd
Faulting application path: D:\osu!\osu!.exe
Faulting module path: unknown
Report Id: fc4643e2-c0c2-4601-9a2d-f01628d06d5d
Faulting package full name: 
Faulting package-relative application ID: 
Module D:\Program Files (x86)\StreamCompanion\Plugins\Dlls\osuOverlay.dll has caused an access violation exception (0xC0000005) when trying to execute instructions from a non-executable address at memory location 0x0a501cc0 on thread 0

Previous .NET Exceptions Report (Exceptions in all .NET Thread Stacks)

Thread ID: 0
Exception Type: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack Trace:
OpenTK.Platform.Windows.Functions.SwapBuffers(IntPtr) 
OpenTK.Platform.Windows.WinGLContext.SwapBuffers() 
OpenTK.Graphics.GraphicsContext.SwapBuffers() 
#=zyF4QgABESiY7HZLp$eo87MI=.#=ztLHfIVftyY5a() 
#=zk1S2l3tGmpfbFFCqsMaVUvYXC80k.#=ztLHfIVftyY5a() 
#=zZM5oHHr$gTlI_8WSZA==.#=zxFcvJtM=() 
#=zPsWWCagXm7IWrOkdlA==.#=zIcO9JDXj9cTx(System.Object, System.EventArgs) 
#=zKdKpC4duoDe3fCA651Kq4_s=.#=z2inkWso=(System.Object, System.EventArgs) 
#=z0nlU_Ers60PXFo8sp1AhVrQ=.#=zxd8lEBJekOadwqmZdQ==(System.Object, System.EventArgs) 
System.Windows.Forms.Application+ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32) 
System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32) 
System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext) 
System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext) 
System.Windows.Forms.Application.Run(System.Windows.Forms.Form) 
#=z0nlU_Ers60PXFo8sp1AhVrQ=.#=zUT_1oz8=() 
#=zPsWWCagXm7IWrOkdlA==.#=zUT_1oz8=() 
#=zg1eYzryQU9dCkrUOZA==.#=zFi3JYAZIYE3s(System.String, Boolean, Boolean) 
#=zg1eYzryQU9dCkrUOZA==.#=zAyS9nyQ=(System.String[]) 
#=zg1eYzryQU9dCkrUOZA==.#=zNolCxaI=() 
#=qDwpQMIv7ufPBLsAKqovRKu9XFNBQXPU$2zQCG4irobU=.#=zvRTJ2CU=() 
Thread ID: 0
Exception Type: System.Runtime.Remoting.RemotingException
Message: Failed to connect to an IPC Port: The system cannot find the file specified.
Stack Trace:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage) 
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32) 
osu.Helpers.InterProcessOsu.WakeUp() 
#=zg1eYzryQU9dCkrUOZA==.#=zAyS9nyQ=(System.String[]) 

Previous .NET Exceptions Report (Exceptions in all .NET Heaps)

Exception Type: System.Exception
Count: 1
Message: <none>
Stack Trace: <none>
Exception Type: System.OutOfMemoryException
Count: 1
Message: <none>
Stack Trace: <none>
Exception Type: System.StackOverflowException
Count: 1
Message: <none>
Stack Trace: <none>
Exception Type: System.ExecutionEngineException
Count: 1
Message: <none>
Stack Trace: <none>
Exception Type: System.Threading.ThreadAbortException
Count: 2
Message: <none>
Stack Trace: <none>
Exception Type: System.Runtime.Remoting.RemotingException
Count: 1
Message: Failed to connect to an IPC Port: The system cannot find the file specified.
Stack Trace: Same as above
Exception Type: System.AccessViolationException
Count: 1
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack Trace: Same as above

Exception Information WARNING - DebugDiag was not able to locate debug symbols for D:\Program Files (x86)\StreamCompanion\Plugins\Dlls\osuOverlay.dll, so the information below may be incomplete.

In osu!PID14040Date02_11_2019__Time_12_23_04PM956Second_Chance_Exception_C0000005.dmp the Module D:\Program Files (x86)\StreamCompanion\Plugins\Dlls\osuOverlay.dll has caused an access violation exception (0xC0000005) when trying to execute instructions from a non-executable address at memory location 0x0a501cc0 on thread 0

Piotrekol commented 5 years ago

As you may have guessed it's somehow caused by SC ingame overlay plugin, so as a start disabling it will allow you to run SC. Were you able to run it successfully in the past? (if not please provide your pc specs) Are you sure you're not running out of memory? (Exception Type: System.OutOfMemoryException)

There's also System.StackOverflowException in the logs but I don't have any recursive calls that could cause this in overlay code.

LosTigeros commented 5 years ago

It runs fine if I start SC first and then osu! client.

It runs fine but if you want to be sure here are my specs: CPU: FX-6300 overclocked to 4.1GHz (25°C now so not overheating) GPU: Radeon R9 270 on 18.12.11 drivers (latest ones have bug with alt tabbing which takes like 8 seconds) RAM: 8GB 1866MHz (available over 4GB where I have more things opened now) SSD: 37GB free HDD: 37.6GB free; 660GB free

And I'm 100% sure that I'm not running out of memory. I remember that my app was throwing System.OutOfMemoryException when it tried to load corrupted image so I'm pretty sure it's not because of available RAM on PC itself.

Just to let you know - osu! is alt-tabbed when it crashes (but it's not a rule because it crashed before to me when I had it on fullscreen before SC loaded).

Oh and in OBS with unchecked Capture third-party overlays SC overlay is flickering (where I think it shouldn't be visible at all).

And I have a dmp file created while it crashed.

InfinityGhost commented 5 years ago

I remember that my app was throwing System.OutOfMemoryException when it tried to load corrupted image so I'm pretty sure it's not because of available RAM on PC itself.

Is it possible you have a corrupt install as well? Try a fresh install and see if that changes anything.

Just to let you know - osu! is alt-tabbed when it crashes

Seems like its possible that the graphics memory is protected when its tabbed out, which would make sense of the access violation, but I haven't seen a case yet of that happening myself.

LosTigeros commented 5 years ago

Is it possible you have a corrupt install as well? Try a fresh install and see if that changes anything.

I think it's rather corrupted image in some beatmap which causes that exception to raise because as you can see it's being catched by internal code in osu!

Fresh install didn't change anything.

  1. Opened up OBS
  2. Opened up osu!
  3. Waited for OBS to detect osu!
  4. Opened up SC After few seconds osu! crashes. I think it crashes while initializing that overlay. When I'll start it again - it works fine.

My map matching tab: image

My output patterns: image

Piotrekol commented 5 years ago

I think it's rather corrupted image in some beatmap which causes that exception to raise because as you can see it's being catched by internal code in osu!

OpenTK.Platform.Windows.Functions.SwapBuffers(IntPtr) is a method that is hooked by overlay dll(and where all drawing happens - calculating/pooling is mostly working on separate thread), so sadly I wouldn't say that it is corrupted image.

When I'll start it again - it works fine.

Maybe it's somehow related to memory mapped files, with aren't created by SC until first osu! event is sent(so usually few seconds after starting SC). I'll test that right now.

LosTigeros commented 5 years ago

I was saying about that System.OutOfMemoryException exception, not System.AccessViolationException caused by overlay.

I was debugging osu! process, not SC so there might be some exceptions outside that OpenTK method

Piotrekol commented 5 years ago

Managed to reproduce using your exact steps. when you skip obs at start(and start it after osu/SC) it works just fine. Not exactly sure what in obs could be causing something like this.

LosTigeros commented 5 years ago

If I'd have debug symbols for osuOverlay dll then maybe there'd be something in there x;

Piotrekol commented 5 years ago

See your discord DMs.

timelessnesses commented 3 years ago

@Piotrekol I have this issue too!

timelessnesses commented 3 years ago

When I open it osu! keep crashing!