FAForever / fa

Lua code for FAF
228 stars 234 forks source link

EXCEPTION_ACCESS_VIOLATION at address 0x0095854f #1445

Closed Uveso closed 2 years ago

Uveso commented 8 years ago

This error shows up several times. (possibility: 32Bit memory full)

25 Jul 2013: http://forums.faforever.com/viewtopic.php?f=26&t=4555 20 Jan 2015 http://forums.faforever.com/viewtopic.php?p=90768#p91716 10 Oct 2015: http://forums.faforever.com/viewtopic.php?f=31&t=10938 23 Oct 2015: http://forums.faforever.com/viewtopic.php?f=31&t=11003 17 Jan 2016 http://pastebin.com/iZ6wBQQR 27 Aug 2016: http://forums.faforever.com/viewtopic.php?f=3&t=13011 29 Sep 2016 http://forums.faforever.com/viewtopic.php?f=3&t=13208 01.Nov 2016 http://forums.faforever.com/viewtopic.php?f=2&t=13399#p138167 05 Jan 2017 http://forums.faforever.com/viewtopic.php?f=79&t=13776 21.Mar 2017 http://forums.faforever.com/viewtopic.php?f=3&t=14158#p145712 29.Jul 2017 http://forums.faforever.com/viewtopic.php?f=15&t=14930 02.Feb 2018 Reported from discord user 02.Oct.2018 https://github.com/FAForever/fa/issues/1445#issuecomment-426048893 02.Dec.2018 https://github.com/FAForever/fa/issues/1445#issuecomment-443334222 02.Sep.2019 https://forums.faforever.com/viewtopic.php?f=3&t=18065 03.Jan.2020 http://forums.faforever.com/viewtopic.php?f=3&t=18575 24.Apr.2021 https://forum.faforever.com/topic/1533

Hints from user: while watching a replay that causes this error: the crash occures about 10 min earlier than yesterday ingame

I get this crash if idle engie mod is enabled

Reducing fidelity settings eliminates it

speed2CZ commented 8 years ago

Happened to CookieNoob in the new coop mission at 1h mark http://forums.faforever.com/viewtopic.php?f=2&t=13399#p138167

CookieNoob commented 8 years ago

happened again... (same mission, differnent time) game.txt debugwindow.txt

speed2CZ commented 7 years ago

Tokyto always crashes in Novax Station Assault, +-10min after getting into second part of the mission https://gist.github.com/speed2CZ/1ec9ed69ff5450b9ce277d2b36006c22

speed2CZ commented 7 years ago

And another one http://forums.faforever.com/viewtopic.php?f=79&t=13776

Ellesedil commented 7 years ago

I'm the player in question for the above crash, and I just had this happen a second time.

https://forums.faforever.com/viewtopic.php?f=79&t=13776&p=142637#p142637

Both instances occurred while playing on a large map as Aeon. I was also playing the Equilibrium mod both times. Not sure if any of those things are a trend or not, but I thought I'd mention them.

When the game freezes with this exception, the music does stop while several sound effects wind up getting stuck in small loops. I didn't notice this the first time it crashed, but I definitely noticed the second time.

Exotic-Retard commented 7 years ago

it shouldnt be related to the mod i guess, we dont change sounds in it

PhilipJFryFAF commented 6 years ago

log from a discord user

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at address 0x0095854f
    attempted to write memory at 0x037e0000

Callstack:
    Unknown symbol (address 0x0095854f)(edited)

j4RbZ3Ey.txt

Uveso commented 6 years ago

i viewed the log and the last line was:

Game.prefs(1): invalid control char near `char(0)'

I guess the old game.pref file from the user is not available ?

Eonfge commented 6 years ago

Can confirm that this issue is still a thing.

Base info

Ubuntu 18.04 LTS Nvidia 396.54 Wine 1.13 PulseAudio 12.2 FAF CLient 0.18.1+git

Reporting data

0x0095854f_log.txt 0x0095854f_hardinfo_report.txt

Replay

8632123-Eonfge.zip

Uveso commented 6 years ago

Thanks for reporting this.

Your log shows many of these errors: warning: Error running lua script: ..lua\sim\unit.lua(5105): attempt to call field IsInCombat (a nil value) But 'IsInCombat' is not a main game variable. This is from a modded unit.lua file. Please check what mod is causing this error.

SpheroidDev commented 6 years ago

Same issue.

 EXCEPTION_ACCESS_VIOLATION (0xc0000005) at address 0x0095854f
    attempted to write memory at 0x028d1980

Crash each time after 30-40 minutes on Dual Gap map. It starts a couple weeks ago with no specific software or hardware changes/updates.

I did reinstall all FAF/SC software with total cleanup. I tried to change system sound configuration several times and some other tips wich mentioned on FAF forum. Still nothing helps.

sc_crash_report_2018_10_02_spheroid.txt

brief_system_info_2018_10_02_spheroid.txt replay-8636154-Spheroid.zip

Eonfge commented 6 years ago

@Uveso That would be the TvG experience mod, the one that causes all units to upgrade like crazy for some very interesting games.

I had it today again, but I sadly hit escape before I could copy the log to somewhere save. After that, the game log didn't actually feature the crash info I needed. Was the same 54f though.

Had waves of these errors before, but not sure what triggered them. Longer games and modded games seem more fragile, but nothing really unique to isolate.

Eonfge commented 6 years ago

Here a log of a crash without mods or anything.

Was a 6 vs 6 on Duel Gap, a proper campy nuka-fest.

0x0095854f_log.txt

SpheroidDev commented 6 years ago

Guys, I did some investigation (debug/disasm/re) here. Brief assumption: this issue is about memory pages in some "resource manager" in game engine. Game crash accures when there is no empty "memory page" and there is new resource bunch are loading (e.g. new type unit spawn). Also I figured out a way to reproduce this issue solo (in dirty way, but) in a few minutes. I made special mod for this purpose.

Mod and investigaton details.

Hope it helps to figure out how to fix this issue or how to avoid it. Any feedback are welcome.

SpheroidDev commented 6 years ago

No one crash since patch 3701 (2018-10-29). Looks like problem just disappeared (no HW/SW changes on host machine).

Eonfge commented 5 years ago

Must disappoint you @SpheroidDev:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at address 0x0095854f
    attempted to write memory at 0x01f60000

Program : Z:\home\Eonfge\FAForever\bin\ForgedAlliance.exe
Cmd line arguments : /mean 1085.87 /deviation 103.809 /country /init init_faf.lua /numgames 377 /log /home/Eonfge/FAForever/logs/game.uid.8908710.log /nobugreport /savereplay gpgnet://localhost:32777/8908710/Eonfge.SCFAreplay /gpgnet 127.0.0.1:41859
Eonfge commented 5 years ago

0x0095854f_log.txt

This one has some more interesting stuff in it. Something about a CWldSession::DoBeat() missing an entity

Uveso commented 5 years ago

info: CWldSession::DoBeat() unknown entity id (0x2ff0077a) supplied in a pose update. This only means we have a unit that is destroyed and still present as c-object. Not a crash reason :/

Uveso commented 5 years ago

@SpheroidDev

I tested your mod to get the error, but got no error. How long should i run the mod ? Or how long are you running the mod until it makes errors ?

<0x0095854f> Spawned: 15668 (15668): ![spam](https://user-images.githubusercontent.com/17804547/49930516-0f175580-fec5-11e8-9b8b-0fb0bc1e4134.png) [Edit]: I get always a crash @ 55854f if the ram usage is over 2.4 GB. But this should be ok since 32bit apps can't address more memory then ~2.4 GB.
SpheroidDev commented 5 years ago

@Uveso This dirty brute force method takes (for me) about 3-4 minutes to get crash. There a fresh one: 0x0095854f-mod-crash-screenshot-2018-12-14

Yes, there is a 2GB limit for 32-bit processes and so on. And getting crash in this way it is not the same as crash during correct gameplay. But. But. You may see that crash (for example this fresh one) is about access memory at 0x028f0000 address. That is in "Low 2GB (0x00000000 through 0x7FFFFFFF) - Used by the process" memory range. It looks like there is a bug in some memory allocation/management code of ForgedAlliance.exe. Some "incorrect signed/unsigned integer offset/indexing" kind of bug. And if this bug leads to crash in this synthetic "over 2GB" case, then the same bug may cause crash in more natural execution flow.

This crash is not an issue for me since patch 3701 and I have not found other (than mod) method to reproduce this crash. So, for now, I have stop try to debug out bug more precisely.

Uveso commented 5 years ago

Yeah it's fine. At least we know something more about the bug. Better then guessing; It's maybe a "sound" bug. :)

Eonfge commented 5 years ago

@Uveso This crash is not an issue for me since patch 3701 and I have not found other (than mod) method to reproduce this crash. So, for now, I have stop try to debug out bug more precisely.

Uhm, my reproduction case of two days ago was with 3701, without mods or anything. Was a 6 v 6 Double Gap game, so that might have something to do with it.

Should I try running the mod and look for anomalies?

SpheroidDev commented 5 years ago

@Eonfge Unfortunately, reproducing this crash again and again with mod will not give us more information about this bug. I can't now imagine what anomalies you may look out if you'll try using mod. So, I don't think that you should waste your time for this. But thanks.

Garanas commented 2 years ago

Closing this issue - I haven't seen it and if it pops up again we can use the official debugger available in the client:

image

Besides that, lets use #2045 to track this in the future.