http://bugs.winehq.org/show_bug.cgi?id=12044
Summary: Garry's mod crashes upon player death caused by prop. Product: Wine Version: 0.9.57. Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P3 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: blacksash@badako.nl
Created an attachment (id=11395) --> (http://bugs.winehq.org/attachment.cgi?id=11395) Crashlog from garry's mod
In the game garry's mod (available for $10 on Steam), the game crashes when the player is killed by crushing or ramming with any kind of prop. Any collision that would normally kill a player will crash the game with an unhandled exception.
Death by guns or falling works normally, as do things like killing a player inside a pod. Attached is a +trace log made by running steam and calling Gmod as it's startup app.
The lines: 1970: fixme:d3d:handleStreams Tweening is only valid with vertex shaders 1971: fixme:d3d:handleStreams Tangent and binormal bump mapping is only valid with vertex shaders Are caused by me spawning a car to test the crushing crash (I held it over my head and let it go.)
The lines: 2121: fixme:dbghelp_dwarf:dwarf2_parse_variable Unsupported form for const value srgb_cmp (a) And similar are displayed at the exact moment the crash occurs.
Since, upon death, the FOV is supposed to turn red, and this doesn't happen, perhaps there is some rendering bug causing the game to crash because it cannot change the colour?
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #1 from Bas Koopmans winebugs@badako.nl 2008-04-03 13:48:56 --- Nothing yet? I'm trying to make a +trace +relay log but the log turned out a massive 6Gb when the game wasn't even at the menu screen... Any ideas on what I should try to get?
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #2 from Bas Koopmans winebugs@badako.nl 2008-04-03 14:11:40 --- Created an attachment (id=11835) --> (http://bugs.winehq.org/attachment.cgi?id=11835) Contains some of the running output up to the crash and the aftermath
http://bugs.winehq.org/show_bug.cgi?id=12044
William wwarsin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #3 from William wwarsin@gmail.com 2008-04-11 19:59:14 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=12044
William Chaambers WillSWC@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |WillSWC@gmail.com
--- Comment #4 from William Chaambers WillSWC@gmail.com 2008-05-15 15:48:54 --- Can we get an update on this? Because this is a Very popular game and if we can get it working I've no doubt i can get some more friends on Linux. ^_^
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #5 from Lei Zhang thestig@google.com 2008-05-15 15:54:47 --- Have you tried wine 1.0-rc1?
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #6 from William Chaambers WillSWC@gmail.com 2008-05-16 00:11:47 --- (In reply to comment #5)
Have you tried wine 1.0-rc1?
I just tried Wine 1.0-rc1. Exact same thing happens. Instantly freezes just before it hits. Death by any other message i could find worked just fine and it's not the redscreen or ragdoll as ragdolls and death by grendes works just fine. This is really a unplayable bug...
http://bugs.winehq.org/show_bug.cgi?id=12044
William wwarsin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wwarsin@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=12044
kevin ksoviero@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ksoviero@gmail.com
--- Comment #7 from kevin ksoviero@gmail.com 2008-06-20 06:02:12 --- been having the exact same problem and im using 1.0 final. is there any progress on this?
http://bugs.winehq.org/show_bug.cgi?id=12044
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |capsup@live.dk
--- Comment #8 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-27 10:34:49 --- *** Bug 13245 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #9 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-27 10:48:25 --- *** Bug 14142 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #10 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-27 22:45:40 --- *** Bug 14143 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #11 from William Chaambers WillSWC@gmail.com 2008-07-23 00:24:30 --- Bug still exists in 1.1.1 Everyone else apparently works just fine.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #12 from William wwarsin@gmail.com 2008-08-03 19:47:55 --- Is it possible that this isn't a Garry's mod problem but a source/hl2 engine problem and has anyone tried to email Garry about this problem?
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #13 from Bas Koopmans winebugs@badako.nl 2008-08-04 02:37:46 --- I have submitted a bug on garrysmod.com, but I re-read it and it was another issue. I will submit this bug on garrysmod.com/bugs and see if it looks familiar to the devvers there.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #14 from Bas Koopmans winebugs@badako.nl 2008-08-04 02:43:12 --- I have submitted this bug on Garrysmod.com/bugs, though I fear that they will not accept it because Wine is being used. We will see.
For reference, this is the link: http://bugs.garrysmod.com/view.php?id=1466
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #15 from William Chaambers WillSWC@gmail.com 2008-08-22 19:28:24 --- Bug Confirmed in WINE 1.1.3
http://bugs.winehq.org/show_bug.cgi?id=12044
haarp liquitsnake@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |liquitsnake@gmx.net
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #16 from haarp liquitsnake@gmx.net 2008-08-27 17:56:06 --- Shooting NPCs seems to cause the same crash.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #17 from Luke Bratch l_bratch@yahoo.co.uk 2008-08-28 14:56:46 --- Kevin, please do not reply directly to wine-bugs, post in Bugzilla instead. Email read:
"actually, that would be a new bug, because when i tested it, it didn't do that. can anyone confirm this?"
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #18 from haarp liquitsnake@gmx.net 2008-08-28 14:59:18 --- Well, spawn a few NPCs, grab the Combine Rifle and shoot them in the face. For me, it crashes when they're about to die
http://bugs.winehq.org/show_bug.cgi?id=12044
Bob-Berto Blacklemon67@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Blacklemon67@gmail.com
--- Comment #19 from Bob-Berto Blacklemon67@gmail.com 2008-09-29 19:53:39 --- Do you think there could be a Garry's Mod addon that can fix this?
http://bugs.winehq.org/show_bug.cgi?id=12044
Arkadiusz Piekarz piekarzarkadiusz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piekarzarkadiusz@gmail.com
--- Comment #20 from Arkadiusz Piekarz piekarzarkadiusz@gmail.com 2008-10-07 16:09:00 --- Blacklemon67 posted an add-on which should fix that bug - http://www.garrysmod.org/downloads/?a=view&id=53943
Found on Wine forum - http://forum.winehq.org/viewtopic.php?t=2498
http://bugs.winehq.org/show_bug.cgi?id=12044
Jordan M smackdat1@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |smackdat1@gmail.com
--- Comment #21 from Jordan M smackdat1@gmail.com 2008-12-30 00:11:28 --- It would appear that this bug no longer occurs as of wine 1.1.11. I just dropped a jeep on my head, and I died and respawned just fine.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #22 from Jordan M smackdat1@gmail.com 2008-12-30 00:13:24 --- strange, I just did it again and I crashed. It must not be deaths by collision specifically that is causing it
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #23 from Bas Koopmans winebugs@badako.nl 2009-01-07 06:12:45 --- Confirmed that this bug is still present in 1.1.11. Adding the propdeathfix addon to Gmod fixes the problem for your own death, but not for the deaths of NPCs in the world (which seems to be a separate piece of code required.)
The author of the fix added to the description that he didn't know how to fix this (yet).
The fact that it is fixable with a add-on does raise some questions as to where the problem lies, as it then may well be a bug in the game itself rather than wine.
For compatibility reasons however, it still would be ideal for the game not to crash under wine as it does not do so under windows.
http://bugs.winehq.org/show_bug.cgi?id=12044
Robin L r0bin.456456@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |r0bin.456456@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=12044
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |laurikoivunen@hotmail.com
--- Comment #24 from Dmitry Timoshkov dmitry@codeweavers.com 2009-02-25 02:51:03 --- *** Bug 17515 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #25 from Python1320 laurikoivunen@hotmail.com 2009-02-25 08:41:34 --- (In reply to comment #24)
*** Bug 17515 has been marked as a duplicate of this bug. ***
It's not really a duplicate as mine is a server side bug and really stops garrysmod hosting on wine. I don't want to "troll", but did you even read what I wrote or is this just some way to merge all bugs related to one specific application to one bug report? I did search, I did see this thread, I did not think it is a duplicate as they're totally different crashes.
In any case, I ask developers to check my bug report too.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #26 from haarp liquitsnake@gmx.net 2009-04-12 17:21:43 --- AppDB remarks that switching winver to 98 gets rid of this bug. I can confirm this myself.
http://bugs.winehq.org/show_bug.cgi?id=12044
Warren Dumortier nwarrenfl@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nwarrenfl@gmail.com
--- Comment #27 from Warren Dumortier nwarrenfl@gmail.com 2009-04-13 13:27:36 --- Strange, so it's not really fixed yet... Does it work well otherwise?
http://bugs.winehq.org/show_bug.cgi?id=12044
ShoGoKi jonathan.lavergne@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.lavergne@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #28 from haarp liquitsnake@gmx.net 2009-04-14 18:02:49 --- Maybe it IS fixed. Didn't bother to test that, although I doubt it. Yes, it works fine on winver=98
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #29 from Python1320 laurikoivunen@hotmail.com 2009-04-15 11:25:52 --- (In reply to comment #28)
Maybe it IS fixed. Didn't bother to test that, although I doubt it. Yes, it works fine on winver=98
In that case the bug I reported isn't a duplicate as it still occurs even with winver 98. Just tried with the latest wine. Stop hitting the duplicate button so hard :)
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #30 from Bas Koopmans winebugs@badako.nl 2009-07-04 05:28:19 --- This bug is not fixed as of 1.1.24 In a fresh wineprefix, with no winecfg or registry changes, the crash still occurs.
Setting the windows version to windows 98 seems to fix the crash, although I have only tried this in single player.
I will test 1.1.25 soon and report if there is any difference.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #31 from Bas Koopmans winebugs@badako.nl 2009-08-02 04:42:42 --- Same thing still happens with 1.1.25 and 1.1.26.
Garrysmod will still crash when killing NPCs with props.
And again setting the winver for garrysmod's hl2.exe to win98 somehow fixes this.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #32 from Warren Dumortier nwarrenfl@gmail.com 2009-11-29 04:38:11 --- This is still present in Wine 1.1.33, and setting to win98 fixes it, it even works very well then.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #33 from William wwarsin@gmail.com 2010-05-09 23:07:04 --- Still exists in 1.1.42
settings gmod to run in Windows 98 mode fixes it.
http://bugs.winehq.org/show_bug.cgi?id=12044
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com
--- Comment #34 from Jerome Leclanche adys.wh@gmail.com 2011-10-28 07:08:47 CDT --- Is this still an issue in wine-1.3.31+?
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #35 from Sam Edwards CFSworks@gmail.com 2012-02-21 04:22:08 CST --- Created attachment 39003 --> http://bugs.winehq.org/attachment.cgi?id=39003 Workaround (Lua autorun)
Drop this Lua file into garrysmod/garrysmod/lua/autorun (creating it if it doesn't exist) to work around the bug by replacing the problematic physics-prop killicon with the default.
Obviously, this will not work on ScriptEnforcer-protected servers.
http://bugs.winehq.org/show_bug.cgi?id=12044
Sam Edwards CFSworks@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |CFSworks@gmail.com
--- Comment #36 from Sam Edwards CFSworks@gmail.com 2012-02-21 04:26:22 CST --- Wine 1.4-rc4 here, I found that the problem is caused by Wine being unable to render the toilet icon used for physics-prop deaths. (I guess Wine and toilets don't mix well after all...)
I'll have to get in a discussion with the Wine developers about the underlying problem... it's related to TrueType, and I'm afraid I don't know enough about how Wine/Windows handles TrueType to keep working on it on my own.
I've attached a workaround, a small Lua file that you can drop into your "lua/autorun" directory to disable that killicon on the client, but it's not perfect - the underlying bug still needs to be fixed. :)
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #37 from Dmitry Timoshkov dmitry@baikal.ru 2012-02-21 04:36:42 CST --- Toilet-icon problem maybe related to bug 7698.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #38 from Sam Edwards CFSworks@gmail.com 2012-02-21 04:48:10 CST --- Dmitry,
I suspected as such. If you're interested, here's what I've learned so far:
Running with WINEDEBUG=-all,+font reveals that the init_freetype function actually gets called right before the crash. (Perhaps something more serious happens and Wine attempts to re-init to recover?) I even ran all of the output through a '| grep init_freetype' for good measure and found that the only situation where Wine attempts to re-initialize FreeType is where GMod attempts to render the toilets -- and not just as a killicon: I have modified ingame objects (e.g. Wiremod screens) to use this font and the same thing happens whenever any of them attempt to display "9" (the codepoint of the toilet)
If you want to try digging around a bit, the reinit-and-crash seems to be caused by: trace:font:GetGlyphOutlineW (0x110c, 0039, 0006, 0x33c16c, 972, 0x33bd90, 0x33c190) The font is a TTF with SHA1=83edb89c48e1c72995cd04bf3f9f088d2382b725 (can be found if you run a Google search for "Headhumper.ttf" - though its original filename is "HL2MP.ttf")
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #39 from Dmitry Timoshkov dmitry@baikal.ru 2012-02-21 05:50:02 CST --- (In reply to comment #38)
If you want to try digging around a bit, the reinit-and-crash seems to be caused by: trace:font:GetGlyphOutlineW (0x110c, 0039, 0006, 0x33c16c, 972, 0x33bd90, 0x33c190) The font is a TTF with SHA1=83edb89c48e1c72995cd04bf3f9f088d2382b725 (can be found if you run a Google search for "Headhumper.ttf" - though its original filename is "HL2MP.ttf")
The problem in the bug 7698 is about buffer overflow caused by glyph 0x39 in hl2mp.ttf, you may try a workaround described in that bug report.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #40 from Sam Edwards CFSworks@gmail.com 2012-02-21 19:45:56 CST --- I'm now 90% certain that this is the same as bug 7698...
Turning on Windows 98 mode fixed the problem. After a little reverse-engineering, I found that Source uses GetGlyphOutlineA where available, and falls back to ExtTextOutA when GetGlyphOutlineA fails. I turned Windows 98 mode back off and modified GetGlyphOutline* to return GDI_ERROR unconditionally, and the crash went away!
The difference between this and bug 7698 is that this crash occurs immediately, while 7698 takes some time before it dies. My explanation for this is that Garry's Mod renders its killicons from a Lua function, and so the call stack is far different from pure-Source, and Garry's Mod's stack is far more sensitive to buffer overflows while rendering a font glyph. When this happens in other games, it probably just corrupts a little bit of memory each time until the game finally crashes.
I'm going to try loading some Counter-Strike Source killicons in GMod and see which ones cause crashes. We should then know for sure if my guess is correct.
If anybody wants to help reverse-engineer this, the culprit function is located in vguimatsurface.dll. Look for the subroutine that calls GetGlyphOutlineA (there is only one). For me the entry point is located at 0x1001A7B0.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #41 from Sam Edwards CFSworks@gmail.com 2012-02-26 19:11:33 CST --- Upgraded to 1.4-rc5, bug still happens, but I've figured out what's going on.
Source likes to render its font glyphs into textures. The function causing the crash is designed to render a font into an RGBA buffer, which the caller uses to turn into a texture. To figure out what Y-coordinate to start rendering into, Source uses (lptm->tmAscent - lpgm->gmptGlyphOrigin.y). As long as gmptGlyphOrigin.y is not greater than tmAscent, this will be a non-negative number, and it will start copying into the buffer at a valid Y position.
In the case of the toilets, the gmptGlyphOrigin.y is 45, while the tmAscent for its font is 43, which results in Source attempting to copy into its texture buffer at -2: an out-of-bounds range.
This means that the problem is either with Wine's reporting of the text metrics or the glyph origin, since it should not be giving an origin with a greater Y than the ascent. I haven't tested this on Windows, so I don't know which function is returning an incorrect value, but if I were to guess I'd say it's the GetTextMetrics call.
At any rate, a WARN should probably be added to GetGlyphOutline when this occurs, so that we can see if this is the same as bug 7698.
http://bugs.winehq.org/show_bug.cgi?id=12044
Jan Kalab pitlicek@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pitlicek@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=12044
johan.gardhage@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |johan.gardhage@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=12044
Julian Rüger jr98@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jr98@gmx.net
http://bugs.winehq.org/show_bug.cgi?id=12044
Florian Friedrich friedrich@hooster.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |friedrich@hooster.de
--- Comment #42 from Florian Friedrich friedrich@hooster.de 2012-07-18 09:27:20 CDT --- Applying the patch in bug 7698 to wine 1.5.8 fixes the bug for me.
http://bugs.winehq.org/show_bug.cgi?id=12044
Yuri Shishenko yurishish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |yurishish@gmail.com
--- Comment #43 from Yuri Shishenko yurishish@gmail.com 2012-08-14 10:20:33 CDT --- This bug appears in wine 1.5.10.
http://bugs.winehq.org/show_bug.cgi?id=12044
--- Comment #44 from Sam Edwards CFSworks@gmail.com 2013-05-02 18:26:50 CDT --- This bug has been fixed by commit 21dbe1c949af569daf0a4db4eef45e40fc780f0b.
http://bugs.winehq.org/show_bug.cgi?id=12044
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |21dbe1c949af569daf0a4db4eef | |45e40fc780f0b Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #45 from Austin English austinenglish@gmail.com 2013-05-02 18:34:13 CDT --- (In reply to comment #44)
This bug has been fixed by commit 21dbe1c949af569daf0a4db4eef45e40fc780f0b.
Fixed.
http://bugs.winehq.org/show_bug.cgi?id=12044
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #46 from Alexandre Julliard julliard@winehq.org 2013-05-10 13:41:03 CDT --- Closing bugs fixed in 1.5.30.