Closed GoogleCodeExporter closed 9 years ago
I've refactored the result table code in r177. Try the new bins and out let me
know if it helps:
http://code.google.com/p/gmodmodules/source/detail?r=177
http://gmodmodules.googlecode.com/svn-history/r177/trunk/gm_tmysql3_boost/Releas
e/gm_tmysql.dll
Original comment by AzuiSl...@gmail.com
on 19 Jan 2012 at 11:24
Made another small change. Try r178
http://code.google.com/p/gmodmodules/source/detail?r=178
http://gmodmodules.googlecode.com/svn-history/r178/trunk/gm_tmysql3_boost/Releas
e/gm_tmysql.dll
Original comment by AzuiSl...@gmail.com
on 20 Jan 2012 at 12:37
Still getting the same exact error, those changes did not seem to make a
difference.
Original comment by luminous...@gmail.com
on 20 Jan 2012 at 3:03
I wasn't able to reproduce the crash with the code you gave me. You should
check to make sure there aren't any conflicting modules or addons.
If it won't write a crash dump you should create a memory dump with the 32-bit
taskmgr (Windows/syswow64/taskmgr) and email it to me.
Original comment by AzuiSl...@gmail.com
on 20 Jan 2012 at 3:08
Email should be on its way now. I've been trying to find a simple way to
reproduce the problem and haven't had any luck yet. I was thinking maybe it had
to do with the fact I was running new queries in the callback functions but I
don't think thats it. Could running queries on GM:Initialize cause this? I load
a lot of data from the database then but the callbacks don't run until a player
joins the server.
Original comment by luminous...@gmail.com
on 20 Jan 2012 at 3:44
It looks like you sent me a 64-bit dump. Make sure you do the dump from the
32-bit taskmgr in syswow64.
Neither of those cases should result in a crash. Here is a debug build with
some console messages to see if it's a crash on free:
http://dl.dropbox.com/u/759758/gm_tmysql_freedebug.zip
Original comment by AzuiSl...@gmail.com
on 20 Jan 2012 at 4:18
I found out my server was outdated today, I couldn't check yesterday because
the content servers were not available. The only other module on the server is
tmysl. I also emailed you a proper dump. I attached a screenshot of the results
of the debug bin for you too.
Original comment by luminous...@gmail.com
on 20 Jan 2012 at 7:32
Attachments:
I found what is causing my server to crash. When I switched to TMySQL I decided
to have my NPC's spawn when the callback function is triggered that loads the
NPC's from the database. I figured since the callback wont trigger until
someone joins the server that I could do it this way since the InitPostEntity
would have already happened. Not sure if that makes sense to you, but it causes
the server to crash when I spawn them. Whats your take on it lol?
<----CODE---->
function GM.CreateNPC(model,name,pos,angles,storeid)
local npc = ents.Create("lprp_npc");
npc:SetPos(pos);
npc:SetAngles(angles);
npc.Name = name;
npc.StoreID = storeid;
npc:Spawn();
npc:SetModel(model);
npc:Activate();
end
function GM.LoadNPCs()
local GAMEMODE = GAMEMODE;
print("Loading NPC's...");
tmysql.query(Format("SELECT * FROM npcs WHERE Map=%q",game.GetMap()),function(res,status,error)
if(status) then
print(#res.." NPC's Loaded.");
else
GAMEMODE.MySQLLog(error);
timer.Simple(0.1,GAMEMODE.LoadItems);
return;
end
GAMEMODE.NPCData = res;
for k,v in pairs(ents.FindByClass("lprp_npc")) do
v:Remove();
end
GAMEMODE.SpawnNPCs();
end,1);
end
function GM.SpawnNPCs()
local GAMEMODE = GAMEMODE;
for k,v in pairs(GAMEMODE.NPCData) do
print("Created NPC "..v.Name);
GAMEMODE.CreateNPC(v.Model,v.Name,Vector(v.X,v.Y,v.Z),Angle(0,v.Yaw,v.Roll),v.StoreID);
end
end
Original comment by luminous...@gmail.com
on 21 Jan 2012 at 4:45
Also, if I lua_run the function after I join they spawn fine. Only happens when
I run it through the callback.
Original comment by luminous...@gmail.com
on 21 Jan 2012 at 4:51
I'll take a look at this when I get a chance. It might be related to the other
crashes people are having. Thanks for this test case.
Original comment by AzuiSl...@gmail.com
on 21 Jan 2012 at 4:53
Alright well I tried to reproduce with a test case similar to what you posted,
but it didn't result in a crash. I'm going to mark this as resolved since you
fixed it on your end, but if you can reduce it to a simple test case I could
investigate further.
Original comment by AzuiSl...@gmail.com
on 3 Feb 2012 at 12:16
Original issue reported on code.google.com by
luminous...@gmail.com
on 19 Jan 2012 at 2:48Attachments: