HELP: EXCEPTION_ACCESS_VIOLATION

A forum for solving problems that might be encountered during installation, updating, or in game.
Post Reply
User avatar
Morgoth
Posts: 11
Joined: Sat Jul 27, 2013 6:01 pm

HELP: EXCEPTION_ACCESS_VIOLATION

Post by Morgoth »

Hey all. I get this crash report

Starting mesh "Alric Returns II" with 1 plugin...
Alric Returns II b04
Using 1.8.0 gameplay...
OpenGL: Initialized with ErasePreviousFrame=1, MaxAnisotropy=8, MSAASamples=1, UseDepthTest=1, UseMipMaps=1, UseNPO2Textures=1, UseShaders=1, UpdateCMapChunked=1, UseCMapTiles=1, UseAppleClientStorage=0
Myth Crashed: EXCEPTION_ACCESS_VIOLATION
Attempting Stack Trace...
0 0x00421434 _cause_damage + 0x0199 (myth2code\damage.c:235)
1 0x00427f3f _scar_between_two_points + 0x0047 (myth2code\lightning.c:618)
2 0x004278b3 _update_lightning + 0x0026 (myth2code\lightning.c:317)
3 0x004450bd _game_tick + 0x0191 (myth2code\myth.c:835)
4 0x004454a3 _update_myth + 0x00a8 (myth2code\myth.c:1097)
5 0x0042bcff _idle_myth + 0x0156 (myth2code\main.c:1243)
6 0x0042bca1 _idle_game_state + 0x0010 (myth2code\main.c:1211)
7 0x0042b59a _update_everything + 0x001c (myth2code\main.c:583)
8 0x0042b3c7 _main + 0x0020 (myth2code\main.c:440)
9 0x00466d2f _WinMain@16 + 0x0002 (myth2code\shell_windows.c:274)
10 0x004f70a2 _WinMainCRTStartup + 0x0051 (crt0.c:251)
11 0x752186e3 ? + 0x0000 (?:0)
12 0x7798bf39 ? + 0x0000 (?:0)
13 0x7798bf0c ? + 0x0000 (?:0)
Stack Trace Complete

The problem was on windows 8.1.

The film file is attached. Also you can find the plugin we were using at http://www.tinyurl.com/Mrgth

Greetings
Attachments
Crash- 2014-06-09 14.33.19.zip
(47.95 KiB) Downloaded 126 times
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: HELP: EXCEPTION_ACCESS_VIOLATION

Post by Pyro »

The film claims I have the plugin missing and yet I already have it. Whoever made this film must have a corrupt "Alric Returns II b04" file or remade the plugin using the same name.

Go to this thread. Instead of checking your foundation files, do a check on that plugin. What is the checksum of your copy of "Alric Returns II b04"?

EDIT: Nevermind. I checked your link. You made a newer version of the plugin with the same name. This is normally a bad idea but it is not the reason for the crash.
User avatar
Melekor
Site Admin
Posts: 2449
Joined: Sat May 01, 2004 12:10 am
Contact:

Re: HELP: EXCEPTION_ACCESS_VIOLATION

Post by Melekor »

The film works with the plugin he linked though. I guess this is actually b05 and they just didn't change the name.

I ran the film under the debugger and I see it crashes when a lightning explosion somehow happens outside the mesh boundaries. The explosion epicenter has a negative x coordinate which causes a crash when myth tries to read a mesh cell that doesn't exist.

It will take a bit more work to determine how the negative coordinate arose in the fist place.
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: HELP: EXCEPTION_ACCESS_VIOLATION

Post by Pyro »

Yeah I know. I edited my reply after noticing the date on his upload was different from the one before. Anyways Melekor, I looked into the issue and was able to make you a test plugin to help diagnose this issue.

As you know when a unit flinches, the projectile being created by the attack of the flinching unit takes a different path. On the test map I placed Balor units on each side of the map. Use the bowmen to make him flinch as he attacks the ground near the edge of the map.

I suggest decreasing the game speed and have the bowmen attack the ground in front of Balor. Then select him and once the arrows are created, attack the ground near the map edge.

Doing this on the North and South edges did not cause crashes in my tests, but they always caused a crash when doing it to the West and East edges of the map. I tried this same test with Fetch instead of Balor but was unable to make it crash.

Balor's "magic attack" sequence has the key point way above the bitmap unlike most cases. This causes the lightning to get created at a higher height. Perhaps the misfired lightning is being directed outside of the mesh's invisible boundaries which is harder to do with lightning attacks created near the ground.
User avatar
Melekor
Site Admin
Posts: 2449
Joined: Sat May 01, 2004 12:10 am
Contact:

Re: HELP: EXCEPTION_ACCESS_VIOLATION

Post by Melekor »

I'm amazed that you were able to figure that out without using a debugger!
Do you have any idea why this bug hasn't been seen or reported before? Is this a modified version of balor that isn't used on other well played maps?
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: HELP: EXCEPTION_ACCESS_VIOLATION

Post by Pyro »

Using the film to see what was happening right before it crashed showed a lightning bolt from Balor heading to the edge of the map. Given the log mentions lightning and you stating the lightning explosion was taking place outside of the map led me to think lightning that had missed its mark was the cause. Lightning attacks always hit their marks unless the attacker flinched. So I placed a modified Balor on another map and ran tests.

This Balor is modified and does not appear on other maps, but the Balor collection has always had that "magic attack" sequence with the high key point. The reason I think this has never been reported before is due to how rare this combination of settings for a lightning attack unit is used. Fetch and most other units create lightning where the bitmap is located near the ground. In the several times I attempted to flinch the Fetch, the lightning would not cause the crash. Balor is rarely ever used on maps. When he is used, you probably aren't at the edge of the map or the mapmaker has him less able to flinch.

From what I have seen of projectiles bouncing off the edges of the map in some games, it appears as if the roof of a map is like a dome instead of cube-like. Lightning is different from other moving projectiles as they travel faster than any other projectile and have unique behavior. Maybe the misfired lightning projectile is intersecting the roof of the map faster than the game can detect its collision and prevent it from crossing it.
User avatar
Melekor
Site Admin
Posts: 2449
Joined: Sat May 01, 2004 12:10 am
Contact:

Re: HELP: EXCEPTION_ACCESS_VIOLATION

Post by Melekor »

Great, that plug was very helpful. I've committed a fix.
Post Reply