Facepunch / garrysmod-issues

Garry's Mod issue tracker
136 stars 56 forks source link

surface.CreateFont related crash #5918

Open danx91 opened 4 days ago

danx91 commented 4 days ago

The issue I'm reporting is highly unreliable to reproduce and I'm not even sure what's causing this, but it's something related to fonts for sure, very likely related to one of latest updates. It's not a big issue for me as I figured workaround, but I think it's still worth reporting it - in worst case it will be closed as "Cannot confirm".

Story

So, today I started GMod to develop my gamemode as usual but as soon as my gamemode started, game just froze and silently crashed after second or so (I haven't changed anything in code since last time I was testing my gamemode). I spent nearly 3 hours commenting out large parts of my code hoping to find the cause and finally I isolated single surface.CreateFont call that was causing all this. The part of code that was causing crash:

timer.Simple( 1, function()
    surface.CreateFont( "impacted_test", { --This line crashes my game
        font = "Impacted", --Not tied to specific font, tried other fonts like Arial and it crashed too
        size = 16, --Size also doesn't matter - other sizes also crashed
    } )

       --Some other irrelevant code
end )

Details

Dump file

39f8c885-468f-4ff6-aa43-2e7e323426be.dmp

robotboy655 commented 3 days ago

Would you be willing to share your gamemode (privately if you must) that reproduces the issue? From what you wrote, it sounds like it happened every time for your gamemode.

I'd need only whatever parts render text realistically. My work email is on my GitHub profile.

danx91 commented 3 days ago

I have another followup to what I send you in email, I got idea to test older version of gamemode that's publicly available on both GitHub and workshop (it hasn't been updated for 9 months at all) and this version is also crashing the game - of course that was not the case before. Additionally, I asked 2 other friends to run this older workshop version and it crashed their game as well. This should be final proof that it's not caused by any of my recent additions to my gamemode and it started happening recently. I don't know if it's helpful for you, but I'm writing this just in case.

robotboy655 commented 2 days ago

I was unfortunately not able to reproduce the crashes, even after installing those 50 addons.

I have pushed a potential fix, but I will have to kindly ask you to verify if the crash is fixed on x86-64 beta, since I cannot reproduce it.

danx91 commented 2 days ago

It got very strange now... At first, after downloading update, everything seemed fine - i was able to start gamemode like 30 times in a row without crash and then it just started crashing every single time again (like wtf, I have completely no idea why it worked like that). Friend of mine, is still getting crash every try even after the update. Dump file is still pointing to segfault in materialsystem.dll (I'm attaching new dmp file just in case). I also tried factory reset, integrity check and clearing all gmod folders with no luck.

Additionally, I asked 3 more people to test it - 2 of them are getting crash right away or after slight changes in delay time, 1 can't get crash no matter what.

That's unfortunate you can't reproduce it, if you don't have any idea what's causing this and my evidence is not convincing enough, you can close this issue and I'll just change the delay to some higher number as workaround. Anyway, thanks for your efforts.

cd163496-4b32-4f62-9e91-97434bbf28c4.dmp