Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXCEPTION_ACCESS_VIOLATION #3235

Closed
marvin4ward opened this issue Dec 10, 2020 · 19 comments
Closed

EXCEPTION_ACCESS_VIOLATION #3235

marvin4ward opened this issue Dec 10, 2020 · 19 comments
Labels
area: sim Area that is affected by the Simulation of the Game type: bug type: core dump

Comments

@marvin4ward
Copy link

If this make sense to develop, please LMK, I will improve issue according to rules.

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at address 0x0067aa5f
attempted to read memory at 0x00000000

Program : C:\ProgramData\FAForever\bin\ForgedAlliance.exe
Cmd line arguments : /init init.lua /nobugreport /log C:\ProgramData\FAForever\logs\game_13337211.log /replay C:\ProgramData\FAForever\cache\temp.scfareplay /replayid 13337211

Callstack:
Unknown symbol (address 0x0067aa5f)

Last 100 lines of log...

info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: SSB >>> TRACE Sync.FocusArmyChanged -1
debug: Loading module '\000/projectiles/saaolarisaaartillery03/saaolarisaaartillery03_script.lua\000'
info: CWldSession::DoBeat() unknown entity id (0x2ff0060c) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff0060d) supplied in a pose update.
debug: Loading module '\000/projectiles/sifhuantinuke01/sifhuantinuke01_script.lua\000'
debug: Loading module '\000/effects/entities/sifhuantinuke02/sifhuantinuke02_script.lua\000'
debug: Loading module '\000/effects/entities/sifhuantinuke03/sifhuantinuke03_script.lua\000'
debug: Current gametime: 00:58:30
info: CWldSession::DoBeat() unknown entity id (0x2ff0033c) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00372) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00586) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00044) supplied in a pose update.
debug: Loading module '\000/projectiles/aifquantumwarhead02/aifquantumwarhead02_script.lua\000'
debug: Loading module '\000/effects/quantumwarhead/quantumwarheadeffect01_script.lua\000'
info: CWldSession::DoBeat() unknown entity id (0x2ff003bc) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00410) supplied in a pose update.
debug: Current gametime: 00:59:00
info: CWldSession::DoBeat() unknown entity id (0x2ff00269) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff0019c) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff001cc) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff001e2) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00206) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff0042c) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00455) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00269) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff0049d) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00508) supplied in a pose update.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
debug: Loading module '\000/units/zsb9601/zsb9601_script.lua\000'
info: CWldSession::DoBeat() unknown entity id (0x2ff00182) supplied in a pose update.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
debug: Current gametime: 00:59:30
info: CWldSession::DoBeat() unknown entity id (0x2ff002d6) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff004c1) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00625) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff0063c) supplied in a pose update.
debug: Loading module '\000/units/xab1401/xab1401_script.lua\000'
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
debug: Current gametime: 01:00:00
debug: Loading module '\000/units/xsl0402/xsl0402_script.lua\000'
debug: Loading module '\000/units/xsb2302/xsb2302_script.lua\000'
info: CWldSession::DoBeat() unknown entity id (0x2ff004fd) supplied in a pose update.
debug: Current gametime: 01:00:30
info: SetFocusArmy 0
info: syncing max ping markers: \00015
info: SSB >>> TRACE Sync.FocusArmyChanged 1
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
info: *FORMATION DEBUG: Unit "urs0304" does not match any Naval categories.
debug: Current gametime: 01:01:00
debug: Current gametime: 01:01:30
info: CWldSession::DoBeat() unknown entity id (0x2ff00235) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff0046b) supplied in a pose update.
info: SetFocusArmy -1
info: syncing max ping markers: \00015
info: Sending game result: 5 defeat -10
info: SSB >>> TRACE GameResults: result = defeat -10, armyID = 5, name = Dobrii-Korjik
info: SSB >>> TRACE GameResults: Dobrii-Korjik has been defeated by Dobrii-Korjik
info: SSB >>> TRACE AnnounceDeath Dobrii-Korjik has been defeated by Dobrii-Korjik
info: SSB >>> TRACE OnBeat() player has died: Dobrii-Korjik
info: SSB >>> TRACE Sync.FocusArmyChanged -1
debug: Current gametime: 01:02:00
info: Sending game result: 1 defeat -10
info: SSB >>> TRACE GameResults: result = defeat -10, armyID = 1, name = Firv
info: SSB >>> TRACE GameResults: Firv has been defeated by Firv
info: SSB >>> TRACE AnnounceDeath Firv has been defeated by Firv
info: SSB >>> TRACE OnBeat() player has died: Firv
info: CWldSession::DoBeat() unknown entity id (0x2ff0041c) supplied in a pose update.
info: CWldSession::DoBeat() unknown entity id (0x2ff00451) supplied in a pose update.
info: SSB >>> TRACE AnnounceUnit captn_JL HAS BUILT AN EXPERIMENTAL UNIT!
info: CWldSession::DoBeat() unknown entity id (0x2ff00504) supplied in a pose update.
info: Block is too late !
info: terminated
info: SSB >>> TRACE AnnounceUnit TwentyEight HAS BUILT AN EXPERIMENTAL UNIT!
debug: Current gametime: 01:02:30
debug: Loading module '\000/projectiles/sifsuthanusartilleryshell02/sifsuthanusartilleryshell02_script.lua\000'
info: Sending game result: 7 defeat -10
info: SSB >>> TRACE GameResults: result = defeat -10, armyID = 7, name = trigered_g1pos
info: SSB >>> TRACE GameResults: trigered_g1pos has been defeated by trigered_g1pos
info: SSB >>> TRACE AnnounceDeath trigered_g1pos has been defeated by trigered_g1pos
info: SSB >>> TRACE OnBeat() player has died: trigered_g1pos

@KionX
Copy link
Contributor

KionX commented Dec 10, 2020

Game crashes may occur due to out of memory, hardware problems, or problems with third-party software.
If the game crashes, replays are useless. They do not save events that lead to a crash.
In my experience, the game is stable. And such messages are useless to consider in 99% of cases.
Also, there is usually no one to fix such problems.

@KionX
Copy link
Contributor

KionX commented Dec 10, 2020

As far as I understand, the crash occurred when trying to read the type of collision of the unit. I have no idea what this is about.
I vote to close this issue.

@marvin4ward
Copy link
Author

If the game crashes, replays are useless. They do not save events that lead to a crash.
So if the game crashes on replay it does not help anyhow? I tried on replay downloaded from the server, and got same result on two PCs. So seems it reproducable. I will try find other players to clarify their experience. If they had no issues, I will close this issue.

PS Thank you for prompt answer.

@KionX
Copy link
Contributor

KionX commented Dec 11, 2020

In this replay, the crash is reproduced.

@KionX
Copy link
Contributor

KionX commented Dec 11, 2020

Similar issue #318
This seems to be the problem: SetCollisionShape('None')

@marvin4ward
Copy link
Author

That weird, the issue from 2015

@KionX
Copy link
Contributor

KionX commented Dec 14, 2020

I've completed crash research. Similar issue #318
Crash occurred when trying to read the type of collision of the unit.
When trigger_g1pos is defeated, the ura0001 collision set to "None".
RevertCollisionShape has not been called.
Similar problems occur with other air units.
The collision was removed in this line:

u:SetCollisionShape('None')

This is probably because KillArmy was called asynchronously:
WaitTicks(3) --Wait some ticks (3 is minimum), IssueBuildMobile() is not instant

WaitTicks(1)

ForkThread(KillArmy)

@KionX KionX added area: sim Area that is affected by the Simulation of the Game type: bug type: core dump labels Dec 14, 2020
@KionX
Copy link
Contributor

KionX commented Aug 27, 2021

Updated the links.

@Garanas
Copy link
Member

Garanas commented Aug 27, 2021

Well found. I'm not sure why that collision shape is reduced to none - when toying with the drones I also tried that and it causes the game to crash quite often. I'll look into it later today!

@Garanas
Copy link
Member

Garanas commented Sep 1, 2021

We'll need to make a call here @Tagada14 as to what the best approach is.

The issue is that setting the collision box to 'None' for units makes the game unstable and allows it to hard-crash. When I was experimenting with the Cybran drones I tried to do the same thing: game hard-crashed after ~ 5 - 10 seconds with a null reference exception (that is what is happening here too).

The issue it is trying to solve is preventing wrecks and / or units from interfering with rebuilding an unfinished unit that we're trying to automatically gift after we've died. This means that the code is critical for the current balance. As far as I can think of it, there's four things we can do:

  • (1) We do not allow unfinished buildings to be gifted and create a typical wreck.
  • (2) We do not allow unfinished buildings to be gifted and create a wreck that allows you to start where it was previously.
  • (3) We allow unfinished buildings to be gifted at the cost of temporarily warping all units / wreckages in the building skirt to another location. It requires a few ticks for the dummy builder to start rebuilding the structure - this means the units / wrecks will be warped off temporarily.
  • (4) We allow unfinished buildings to be gifted at the cost of spawning in the wreck / units that block such a building a few ticks after all the other units have been gifted. This allows the dummy builder to initiate the constructing.

From a development perspective my preference is (1), but I understand that may not be desirable. I'll leave the call to you and the balance team.

@KionX
Copy link
Contributor

KionX commented Sep 1, 2021

In my experiments, I was able to change the owner of a unit without re-creating it. But I haven't studied the long-term effects.
As I understood in FAF, it is impossible to complete the construction of a unit immediately.
As far as I remember, null collisions are allowed for ground units.
Perhaps some engine improvements can help.

@Garanas
Copy link
Member

Garanas commented Sep 1, 2021

If you can make it stable then cybran build drones become essentially free of charge 😄

@KionX
Copy link
Contributor

KionX commented Sep 2, 2021

I managed to disable a large piece of code that doesn't seem to do anything useful.
(It seems that the behavior of the units does not change.)
This solves the problem with 'None' collisions.
However, it affects the sim.
This code works while the unit is in the air.
I checked the UEF air units and the Cybran engineer.

Disabling the code affects the units on the right. This calls OnLayerChange a differently on landing. Why?
ForgedAlliance_3235.zip

@marvin4ward
Copy link
Author

Thank you for looking into.

@Crotalus
Copy link
Member

All units to the right have transport ability so I guess they use an OnLayerChange event to trigger something.

Could the crash have something to do with setting collision shape on dead / destroyed wrecks? After a WaitTicks() wrecks could have been destroyed / recycled by the game.

@KionX
Copy link
Contributor

KionX commented Sep 17, 2021

All units to the right have transport ability
There is also a scout.
I checked the behavior of the transport. I didn't notice any changes.

Could the crash have something to do with setting collision shape on dead / destroyed wrecks?
The problematic code only works when air are landing.

@KionX
Copy link
Contributor

KionX commented Sep 17, 2021

An interesting feature is that units do not collide with units without a collision.
But units without a collision collide with units with a collision.

@Garanas
Copy link
Member

Garanas commented Sep 17, 2021

That is similar behavior to a projectile.

@Garanas
Copy link
Member

Garanas commented May 7, 2022

Closing this issue as it has dated and it is fixed in game version 3737.

@Garanas Garanas closed this as completed May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: sim Area that is affected by the Simulation of the Game type: bug type: core dump
Projects
None yet
Development

No branches or pull requests

4 participants