forum

[resolved] Beta crashes unpredictably

posted
Total Posts
8
Topic Starter
Score_Under
Problem Details:

Osu! beta crashes randomly and this exception is the last thing I see from it before it dies.

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at dje_qRW3Q4XFMDF787UEJVUMWW2UTQYPEPFSZCCE5WWUV58K3BVW8KNY72PNLDPZP4M7PUMCGM6EVJ8LGD_ejd.#=qHvgL5lXuVXvXrDEdHDEumR2aJlL0$dqJFqhTeDF97xI=(IntPtr #=q4AqCJd4ixQFagdtl1m3e66QIaijMsLaMrWn6nPv3imo=, IntPtr #=qKmfA9lBDWseiWE3Tm3V7Sw==, Int32& #=qmWayeQuiAzOqOLwzwvqeN9KXoAgEsKLzx$VSG2R2X1U=, IntPtr #=quIoyYLaUJlbFOJzlAyTopw==, Int32 #=qmX9BqCDU5Mhk8vWGs1wWEQ==)
at #=qqGfaEwUpR9p4hATnFgYleEcB7W8Tx_Pq1TbKjorgfPk9uzlZyn3kkb_uGh0Q41x5.#=qxLKnFb5ODX$dzPZlupiENQ==()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

This may be a wine-only issue, but it only started happening when I updated the beta.

osu! version: 20150514.10beta

edit: also happens in cutting edge:
SPOILER
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at dje_qRW3Q4XFMDF787UEJVUMWW2UTQYPEPFSZCCE5WWUV58K3BVW8KNY72PNLDPZP4M7PUMCGM6EVJ8LGD_ejd.#=qKZxsdYoOSx1jGRbpqzOTDQ==(IntPtr #=qm8WAsYbOKgdzf7ZUIX6_dgcyjMaESMnxBUClCvwUljQ=, Int32 #=qf5kOwoxCFFyKC9ecn0G2iQ==, IntPtr #=qx859JVsPLEX8HoCHA_tK5KTTx89NZM9LzjUloAdVu1E=, Int32 #=qUSFLcaTCwsUftbtD2tQwEg==, Int32 #=qTlH5YWPJjc565Zw0lamDJA==, Int32 #=qYrcM_Oamn4LjE4vM0VvwQw==)
at #=qqGfaEwUpR9p4hATnFgYleEcB7W8Tx_Pq1TbKjorgfPk9uzlZyn3kkb_uGh0Q41x5.#=qxLKnFb5ODX$dzPZlupiENQ==()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

edit2: changed title randomly→unpredictably because I'm a pedant
peppy
Wait...

You got BETA running on WINE??

Please give me details on how.
Topic Starter
Score_Under
[edit: FWIW I haven't had that crash since the latest cutting edge update]
Please read this post all the way through before you dive into it, I've built this post up over the course of several .NET installs of various kinds, so I have probably tried to put a little too much information into here, and it's a little scattered.

Make sure your wine and winetricks are up to date. I recommend the d3dstream branch of wine for better performance. After Osu! is installed, if you are on the d3dstream branch, you will need to manually enable CSMT in the registry to take advantage of the performance gains. Make sure you set that registry key in the right WINEPREFIX.

I have some shell scripts to launch it, they are mostly unimportant:
SPOILER
"osu" (runs osu with high i/o priority, I did this because I thought I could get away with playing osu while waiting for things to compile :) )
#!/bin/sh
cd ~/music/osu!
exec ionice -c best-effort -n 0 -- wine32-osu osu!.exe "$@"
"wine32-osu" (runs something in osu's wineprefix)
#!/bin/sh
export WINEPREFIX="$HOME/.osu-wine" WINEARCH=win32
exec wine "$@"

To get Osu! beta working from scratch (on Arch Linux, Linux 4.0.2, wine-d3dstream wine-1.7.18-2929-gc27b0fe, winetricks 20141130; YMMV):
  1. Set your WINEPREFIX and WINEARCH. WINEPREFIX doesn't matter so long as you can write there, WINEARCH is win32. See the code box below.
  2. Use winetricks to install .NET 4.0. (again, see code box below for this or any future steps).
    1. If wine asks to install mono, press cancel.
    2. Gecko doesn't hurt
    3. .NET 4.5 didn't work first time I tried it, but I got it working today.
  3. If you have already got a recent installation of Osu! beta or cutting edge somewhere, you can stop here and just run it.
  4. Use winecfg to turn on virtual desktop (Graphics -> Emulate a virtual desktop). This fixes an issue (for me at least) where the .NET 3.0 installer hangs on some desktop environments.
  5. Use winetricks to install msxml3. It will save you a lot of hassle if you just do this right now. If not, there is a chance the dotnet35 install will tell you to download this dependency but it won't allow you to restart the install so you have to trash the WINEPREFIX.
  6. Use winetricks to install dotnet35.
    1. Make sure no other wine programs in that WINEPREFIX are running, because winetricks will sometimes try to wait for those to finish.
    2. In one of my tries installing dotnet35 I got an error from wordpad. If you get this, OK through the error and terminate the wordpad process. I only got it once out of several tries though.
    3. This takes about 20 minutes, give or take.
    4. If it asks to restart, either button just does the same.
    5. You may want to move the virtual desktop to a different workspace while it's going, because at some point it starts focus stealing like mad.
  7. Disable virtual desktop again, it's ugly :P
  8. Install Osu! under wine using the default installer. Make sure that osu is *outside* of the WINEPREFIX. This isn't 100% necessary but I highly recommend it just in case you need to wipe the WINEPREFIX for some reason.
  9. Switch release stream, maybe play partway through a map while you wait, restart osu when it's done. It should work on all release streams.
For future launches of osu, you *need* the "export" command used here before you run wine. That's why I made a shell script as a launcher for it - so I can just run the script and osu pops up, rather than using the terminal.

export WINEPREFIX="$HOME/.osu-wine" WINEARCH=win32  # If you use a different terminal to perform any of the commands, make sure you first run this command in it again
winetricks dotnet40
winecfg # Enable virtual desktop here
winetricks msxml3
winetricks dotnet35
winecfg # Disable it again
wine 'osu!install.exe' # Install, change release stream, restart it

There is a slightly faster way to get this all set up, which doesn't require winecfg and is a whole lot less painful in general, but if something goes wrong it may be harder to figure out what happened:
export WINEPREFIX="$HOME/.osu-wine" WINEARCH=win32
winetricks -q msxml3 dotnet40 dotnet35
wine 'osu!install.exe'

If you want to try .NET 4.5, similar process, just don't install dotnet40, and install dotnet45 instead of dotnet35. It worked for me last time, but the time before that I couldn't get it to work. "winetricks -q dotnet45" took just shy of 20 minutes when I tried in a fresh wine prefix.
edit: Cutting edge and beta don't work if .NET 4.5 is installed but stable does. Beta seems to work once, then updates and breaks.

Screenshots:
Beta running in wine: https://a.pomf.se/umofja.png
Cutting edge running in wine: https://a.pomf.se/oghxqh.png
Cutting edge gets decent FPS with all graphical thingies enabled: https://a.pomf.se/svraph.png
peppy
I believe I was trying with dotnet45 previously (we changed our build target midway), so 40 may just work. I'll give it a try. Thanks for the details explanations, and good to hear your issue is fixed. That FPS is pretty nice.
Topic Starter
Score_Under
Sorry, I think I spoke too soon regarding it not happening again.

Stack trace from b20150518.6cuttingedge
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at dje_qT4JAE64656U6F7528URAXMA26UYKDPWAABJCS9TLJUAJNSSKSQVDASD9DPCSB332DLAZXSCC7TQTS_ejd.#=qAztGl3WxL5WK$wl7kFYPYpK$66G4C78Mmd74mb3mSVA=(IntPtr #=qRNUXKpxx1kVQHW8UMnXLf9j0H8qElIu6T5S3zvxG7eM=, IntPtr #=qJeAAuxP3J7VYqzsYYQlT0A==, Int32& #=qr2fl2PyBvqj3PdE5vIehHBdoF71db6oa1fJuIeX0u30=, IntPtr #=qAugOm0bU4oBG09LLlw6mpA==, Int32 #=qkW8xcaxDuOmymCZE3zIheQ==)
at #=qA$KoEZ1Xw_2CRJrSP6Y0fArtSd$1EtfQlRo$XwPv8ImoGHGv42j11NKIaOUOMKTD.#=qfoMhIDH98Ogs1$r_gTI0fA==()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Stack trace on cutting edge (20150521.1)
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at dje_qYHMRNRSZEAEMLBASRFKHXFSWGLVAQZGBFFJHX4XTZBF5PJ697P5SJHWSA6KKJHDLETVXQSLJZEQAF_ejd.#=qnrqi41oRfAMDfTiofQlEfQ==(IntPtr #=qa9auRCTcgJuYyEKePeGOoCZTu_nWHytUEPopPdqqkb0=, Int32 #=qLnRG78H_t6X8xksvkmIW2g==, IntPtr #=qu2Io9cmajFUP$ucxbvKbRDlKjXTE5nx4SPxxCXR4JMw=, Int32 #=qSrFeTjY7k65VsdeOWu6S7g==, Int32 #=qBmjb7m3BxpYSzHdm_eSpjg==, Int32 #=qSB6c4zXYbGAQ0mQdNkUQ$A==)
at #=qsLqbWp0v5TuESEh4yPHTTRPDnC78P0mrCTCgn1UlPXJTfkx_zz_TlULn5Nhot2LD.#=q5NqYgjcYM8gBpCiZEoGZUg==()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

After some testing I'm pretty sure that this bug is the same as the one in this thread: t/330009
Crap quality video of the crash in action: https://youtu.be/qAtzdSsfRGc

Also, I've found that it's mostly consistent!

Steps to reproduce:
0. Watch the video I linked, mostly just look at the end.
1. Download this map: Utada Hikaru - Beautiful World
2. Turn video on.
3. Play the first few seconds of the hardest difficulty, and start dragging the slider that I reset on in my video (the third one on the map). It's also possible, if a little trickier, to reproduce this on the first slider on the map.
4. Still holding the slider tap key, before the slider finishes, hold down quick reset too. It helps if you rebind quick reset to be near your tapping keys for this, though I tried mouse-only and still reproduced it.
This should take you about three attempts until it crashes. With a little luck it will crash first time.

Maps I've reproduced it on
  1. The first slider of Duca - Futari Iro (hard) -- btw, this map needs its proper japanese name (Duca - 二人色), not sure where to request that.
  2. The first slider of mikitoP - 1, 2 Fan Club (cRyo's hard)
  3. The second slider of yuikonnu & ayaponzu* - Super Nuko World (alacat's Hard) -- this one took ages to reproduce but eventually happened
  4. The first slider of Nomizu Iori - Black + White (TV Size) (gu's Insane), near the end of the slider track
  5. The first slider of Sadohara Kaori - To Be Continued? (TV Size) (Hard)
  6. The first slider of ONE OK ROCK - The Beginning (Hard)
  7. The first slider of u's - Sore wa Bokutachi no Kiseki (TV Size) (Guy's Hard)
  8. The first slider of Kyary Pamyu Pamyu - PONPONPON (Normal)
  9. The second slider of MPAA - Piracy - It's a Crime (Normal)

It seems to be a combination of:
  1. Quick reset (I haven't reproduced it on the pause screen or with PF)
  2. Video playing
  3. Active slider (edit: might not actually be necessary? I think it's happened without it before)
  4. (Bad) luck -- probably a race condition judging by the stack trace, but then again the top could be anything so I can't be sure
  5. Some magic pixie dust, because it doesn't seem to happen on all video maps
Topic Starter
Score_Under
Since I've put in a lot of edits I'm going to bump: Using the reproduction steps above, can anyone confirm this? (On beta or cuttingedge)

Btw, the edit counter only starts when I posted this, so it has even more edits :^)
VeilStar

Score_Under wrote:

Steps to reproduce:
0. Watch the video I linked, mostly just look at the end.
1. Download this map: Utada Hikaru - Beautiful World
2. Turn video on.
3. Play the first few seconds of the hardest difficulty, and start dragging the slider that I reset on in my video (the third one on the map). It's also possible, if a little trickier, to reproduce this on the first slider on the map.
4. Still holding the slider tap key, before the slider finishes, hold down quick reset too. It helps if you rebind quick reset to be near your tapping keys for this, though I tried mouse-only and still reproduced it.
This should take you about three attempts until it crashes. With a little luck it will crash first time.
I could (very) consistently replicate this with that map (with video), but failed to replicate it in any other map (with video, and on a slider), but that might be attributed to luck.
BanchoBot
Issue(s) in this thread have been addressed by the following changes:
  1. Fix crash when using quick-retry on beatmaps with video. (smoogipooo)
The changes will be applied to builds newer than b20150522.1cuttingedge.

Please follow up in this thread if you believe more work needs to be done to fix the mentioned issues. If they have not yet been resolved, please provide any new details that may have arisen after this build.
Please sign in to reply.

New reply