Facepunch / garrysmod-issues

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

Access violation due to include loop? #2644

Open ghost opened 8 years ago

ghost commented 8 years ago

For example:

if SERVER then
    resource.AddSingleFile( "data/addon/test.dat" )
end

Results in hl2.exe crashing without an error message. After hooking up the VS2013 debugger this error was thrown:

Unhandled exception at 0x754C6FFE (kernel32.dll) in hl2.exe: 0xC0000005: Access violation writing location 0x00770FFC.

Additional information:

Operating system: Windows 10 Home N
CPU: i5-2500k (stock clock)
HDD: Seagate Barracuda Green
Bo98 commented 8 years ago

Does the same happen with the file.* functions?

ghost commented 8 years ago

Seems to be happening yes, I'm currently investigating this.

ghost commented 8 years ago

Title changed Excuse my incapability to write proper code.

This seems to have been the issue:

_in rocketeditor/load.lua

if SERVER then
    AddCSLuaFile()
    ...
end

include "rocket_editor/load.lua"

or

_in autorun/rocket_editorautorun.lua

if SERVER then AddCSLuaFile() AddCSLuaFile( "rocket_editor/load.lua" ) end
include( "rocket_editor/load.lua" )

or a combination of those.

This must have caused an infinite-loop or multiple processes/threads trying to read/write to the file causing Garry's Mod to crash.

Nonetheless this should be caught.

meepen commented 8 years ago

Sounds like it's overflowing the stringtable.