Coder Social home page Coder Social logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 19 Jan 2012 at 11:24

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 20 Jan 2012 at 12:37

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
Still getting the same exact error, those changes did not seem to make a 
difference.

Original comment by [email protected] on 20 Jan 2012 at 3:03

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 20 Jan 2012 at 3:08

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 20 Jan 2012 at 3:44

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 20 Jan 2012 at 4:18

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 20 Jan 2012 at 7:32

Attachments:

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 21 Jan 2012 at 4:45

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 21 Jan 2012 at 4:51

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 21 Jan 2012 at 4:53

from gmodmodules.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 29, 2024
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 [email protected] on 3 Feb 2012 at 12:16

  • Changed state: WontFix

from gmodmodules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.