#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2013-06-21

Timestamps are in GMT/BST.

00:26:17fordcars_night guys, off to bed
00:30:46fordcars_ Quit (Ping timeout: 250 seconds)
01:04:50LordDVG has joined
01:31:24LordDVG Quit (Ping timeout: 246 seconds)
04:36:15Watusimoto_ has joined
05:15:54Watusimoto_ Quit (Ping timeout: 255 seconds)
06:10:46watusimoto Quit (Ping timeout: 252 seconds)
06:25:36watusimoto has joined
06:25:36ChanServ sets mode +o watusimoto
06:35:02raptor has joined
06:35:02ChanServ sets mode +o raptor
06:51:45BFLogBot Commit: 958aa32acd6d | Author: buckyballreaction | Message: Print pointer of unknown Lua objects when dumping the stack
07:16:08raptorman - having the proxy keep track of whether the owning object needs to be deleted gives invalid reads...
07:16:16raptorwell gotta go..
07:16:18raptor Quit ()
08:05:30Watusimoto_ has joined
08:45:55Watusimoto_ Quit (Ping timeout: 264 seconds)
09:05:33bobdaduck has joined
09:16:48watusimoto Quit (Quit: Leaving.)
09:43:41fordcars has joined
10:08:40fordcarswhen I quit the frozen bitfighter 019, I get "The instruction at "0x013a73be" referenced memory at "0x000000004". The memory could not be "written". Click OK to terminate the program"
10:17:21bobdaduckwhen you hit quit?
10:20:04fordcarswell when I closed the Bitfighter command line at startup
10:20:31fordcarsit freezes at startup
10:31:22bobdaduckI dunno what that is
10:31:54bobdaduckSometimes bitfighter will crash when I'm running it in debug mode from a compiler and then I hit the "quit" button on the main menu
10:34:27bobdaduckbut no I dunno what problem you're getting
10:40:09fordcarsweird
10:42:49fordcarsYAY I found something for once!!!!!!!!
10:43:03fordcarsIt's the Window mode that messes everything guys
10:43:14fordcarsif it's in window mode on startup
10:48:19bobdaduckhm
12:15:40bobdaduck Quit (Remote host closed the connection)
12:24:02LordDVG has joined
12:36:31LordDVG Quit (Remote host closed the connection)
12:50:28kaen Quit (Ping timeout: 268 seconds)
13:24:55bobdaduck has joined
13:28:17bobdaduckfordcars
13:28:22bobdaduckyou should name the bot after DnD monsters
13:28:38bobdaduckgoblin kobalds and stuff
13:58:37bobdaduckAnd things that make no sense holding a giant sword or axe or whatever. "bobdaduck was zapped by a giant spider"
14:00:46Nothing_Much Quit (Ping timeout: 268 seconds)
14:07:25Wuzzy has joined
14:24:03Nothing_Much has joined
14:24:44Nothing_Much Quit (Max SendQ exceeded)
14:30:48Nothing_Much has joined
14:31:47Nothing_Much Quit (Changing host)
14:31:47Nothing_Much has joined
14:38:50fordcarsbut bob!
14:39:03fordcarsI CAN'T FINISH THE BOT :(
14:39:11fordcarsI can't change modules in 018
14:39:33ChickenSoup_ has joined
14:41:32LordDVG has joined
14:46:36ChickenSoup_ Quit (Ping timeout: 250 seconds)
14:47:02fordcars Quit (Ping timeout: 250 seconds)
14:52:58Watusimoto has joined
15:00:40LordDVG Quit (Remote host closed the connection)
15:55:58Nothing_Much Quit (Read error: Operation timed out)
16:08:15bobdaduck Quit (Remote host closed the connection)
16:10:11Nothing_Much has joined
16:10:32raptor has joined
16:10:32ChanServ sets mode +o raptor
16:11:31raptorhello
16:14:12raptorWatusimoto: did you see my conversation with kaen about the LuaW memory leak?
16:16:34raptorcalgary has flooded!
16:16:41raptor(alberta)
16:16:43raptorcrazy
16:18:41Nothing_Much Quit (Changing host)
16:18:41Nothing_Much has joined
16:22:55Watusimotono
16:23:00Watusimotohi
16:23:03raptorhi
16:23:37raptorwell... my solution failed, and now I don't know what to do..
16:23:50raptorso if you have a moment (to read), i'd like your input...
16:24:09Watusimotook
16:24:16raptorhttp://bitfighter.org/irclogs/index.php?date=2013-06-20
16:24:19raptorstarting at 21:10:20
16:24:37raptoronly runs about 30 lines
16:27:21Watusimotoso the new is never deleted?
16:27:26raptorcorrect
16:27:38raptorbecause in the luaW_gc method we only delete the proxy
16:27:50Watusimotoso the original object is left hanging
16:27:55raptoryes
16:28:08Watusimotoso... why not add a flag on the proxy about whether to delete the object or not?
16:28:13raptoryes
16:28:33raptorI did that, but now I'm getting invalid reads in valgrind
16:28:39raptorlet me show you my diff...
16:29:15raptorhttp://pastie.org/8067869
16:29:18raptornothing special
16:29:33raptorI had to leave before I could do further memory analysis
16:29:43raptorwhich i'm doing now
16:31:26Watusimotobrb
16:34:36raptoroh man, it's late for you... sorry for throwing a problem at you..
16:35:42raptoroh i'm an idiot
16:35:55raptori'mtrying to read the proxy flag after deleting the proxy
16:36:06raptoridiot idiot idiot
16:45:39Watusimotothat's not good
16:45:42Watusimotobut one question
16:45:51Watusimotowhat type of object are we talking about here?
16:45:56Watusimoto(for example)
16:46:24raptorsay in a Lua script you call: game = GameInfo.new()
16:46:31raptoror Asteroid.new()
16:46:52raptorthat calls luaW_new (which calls c++ new)
16:47:27raptorone invalid read left...
16:47:41Watusimotowhen the asteroid dies, as a matter of course, isn't it deleted by the game anyway?
16:48:19raptoruhh... should it be if we call 'new' in c++ ?
16:48:42WatusimotoI think all new objs are new'ed
16:48:49Watusimotothen deleted
16:49:20raptorhmm... let me see what happens with Asteroid...
16:49:36Watusimotolook at BfObject::deleteObject
16:49:47Watusimoto if(!mGame) // Not in a game
16:49:47Watusimoto delete this;
16:49:47Watusimoto else
16:49:47Watusimoto mGame->addToDeleteList(this, deleteTimeInterval);
16:50:01Watusimotoand the delete list is periodically purged
16:50:10raptoryeah but that is explicitly called
16:50:32Watusimotoin game::processDeleteList
16:50:48Watusimotowhen an asteroid is killed it is added to the delete list
16:50:56Watusimotowhere it is deleted
16:51:04Watusimotovoid Game::processDeleteList(U32 timeDelta)\
16:51:53raptorok you win with ASteroid
16:51:58raptormaybe I chose a bad example..
16:52:14WatusimotoI think I win with any game object
16:52:15raptorit at least leaks with GameInfo.new() and any menuitem created from a Lua script...
16:52:57raptori see explicit calls to deleteObject() in many of the gameObject classes...
16:53:08WatusimotoGameInfo isn't a game object, so taht's different
16:53:27Watusimotowhy does a script want to create one of those? it shoudl come from c++, not the other way around
16:54:19raptorplugins?
16:54:32raptoryou gave plugins direct access to menu creation
16:54:42Watusimotoah, menu items
16:54:55Watusimotosorry, didn't see that
16:55:15Watusimotothose probably need to be handled specially if they are leaking
16:55:46WatusimotoI think that's a special case
16:56:09Watusimotomost other items either come from c++ (playerInfo, for example), or get deleted automatically (testItems)
16:56:37raptorplayerInfo is another leaker i think..
16:58:47Watusimotoyes, but maybe lua shouldn't be creating those
16:59:13raptorit isn't
16:59:18raptorc++ is
16:59:31Watusimotoand c++ will clean it up, no?
16:59:52raptoroh wait, it does... in the CLientInfo destructor..
17:00:03raptorlet me test..
17:00:26Watusimotomenuitems may be a unique case
17:00:36Watusimotowe want lua to create them, but they are not game objects
17:03:45raptorok, playerInfo is not leaking
17:04:01raptorsee, this is good I spoke to you..
17:05:04raptorso that leaves GameInfo and anything menu-y
17:06:04Watusimotowhy are we creating gameInfo?
17:06:22fordcars has joined
17:06:25raptorjust MenuItems actually
17:06:37Watusimotoprogress!
17:06:50raptorGameInfo is a conglomerate object that returns info about the game or gameType
17:06:59raptorit can return the gameType object to Lua, too
17:07:01Watusimotomaybe the menu displayer can just delete the menu items when the menu is closed
17:07:14Watusimotoall that stuff originates in c++ land
17:07:24raptorthese are the methods in GameInfo: http://pastie.org/pastes/8067941/text
17:07:33raptorok
17:08:03raptori'll have to look at the menu displayer... I'm not too familiar with that code
17:08:36Watusimotothe point is that lua isn't creating gameInfos
17:08:51Watusimotoit only requests a copy of what has already been created
17:09:06raptorin Lua, you do GameInfo.new()
17:09:16raptorit calls c++ 'new'
17:09:20raptorthrough LuaW
17:09:46raptorif you want gameInfo in a script you need to do GameInfo.new()
17:11:01Watusimotoright -- but is there any valid reason to do this?
17:11:09Watusimotoif not, maybe we can just block it somehow
17:11:26raptoronly if you want access to those methods
17:11:37raptors_bot uses the gameType heavily
17:11:58raptorunless you're getting at something else
17:12:46Watusimotos_bot uses those mthods, but doesn't create the object -- it only requests a copy from the c++ code, where it already exists
17:12:59Watusimotos_bot never does GameInfo.new()
17:13:00raptorit doesn't exist in c++ already
17:13:03raptoryes it does
17:13:11Watusimotoit does?
17:13:25Watusimotoit should be gameInfo = getGameInfo()
17:13:30raptoryes it does
17:13:34Watusimotowell
17:13:37raptorgame = GameInfo.new()
17:13:58raptorthen it uses game:getGameType()
17:14:16Watusimotowell, maybe it shouldn't!
17:14:23raptorok then
17:14:35Watusimototo me gameInfo should be a repository for info about the current game
17:14:46raptorhow should it work (forgive my stupidness.. )
17:14:48raptoryes
17:14:56Watusimotoit could even be a table that is maintained in a proteced location
17:14:58raptorand we do that by aggregating lots into a single object
17:15:03Watusimotorather than a series of methods
17:15:18Watusimotobut a script should never do GameInfo.new()
17:15:38Watusimotobut rather getGameInfo() to grab the existing copy
17:15:49raptoryou mean levelgen:getGameInfo()
17:15:52raptoror whatever?
17:15:53Watusimotobecause what would a new gameInfo represent?
17:15:54Watusimotoyes
17:15:59Watusimotoor bot:getGameInfo()
17:16:15raptorand we'd store a persistent copy of the GameInfo object somewhere?
17:16:35Watusimoto ?
17:16:37Watusimotoyes
17:16:39Watusimoto?
17:16:51raptorthe GameInfo object is a conglomerate object
17:16:51Watusimotoor it might be the Game object itself
17:16:57Watusimotowith some methods on it
17:16:57raptorit's not used anywhere but for Lua
17:17:08raptorcalled 'LuaGameInfo' in c++
17:17:35raptorit basically just calls gServerGame for all of its methods
17:17:37Watusimotoall those methdos you listed get info about the game, right/
17:17:43raptorright
17:17:45Watusimotoso we could do two things
17:18:07Watusimoto1) put those methods on gServerGame, and return that
17:18:14raptorok
17:18:17raptormake sense
17:18:20raptor*makes
17:18:27Watusimotoor 2) create a read-only table in the registry and just keep it updated
17:18:40Watusimotoso when the script wanted some game-related info, it would look in the table
17:18:52Watusimotoand table would be collected by lua
17:19:05raptorI think... #2 would be less work
17:19:21WatusimotoI'm not sure, but it's not a bad solution
17:19:36raptorit doesn't have the 'keep updated' part
17:19:58Watusimoto1 doesn;t have the keep updaetd part
17:20:04Watusimoto2 does
17:20:31raptoroh duh
17:20:35raptori meant #1 all along...
17:20:39Watusimoto:-)
17:20:47raptorman... forgive me... not enough sleep
17:20:53WatusimotoI understand
17:21:12WatusimotoI like 2 a tiny bit better, but 1 is more like everything else we do
17:21:38WatusimotoI just don;t like the idea of the (admittedly tiny) overhead of calling a function to get the game title
17:21:51Watusimotobut that's silly when I think about it rationally
17:22:03Watusimotoso 1 would be good
17:22:10raptorheh
17:22:23raptorok, so if i do that, then we nuke the GameInfo problem...
17:22:30raptornow for the menuItems?
17:23:21Watusimotothose are more complex
17:23:24Watusimotooptions:
17:23:40Watusimoto1) create them as shared_ptrs and let boost deal with it
17:23:50Watusimoto2) delete them in c++ after the menu is closed
17:24:08Watusimoto(which would create problems if lua wanted to reuse them somehow)
17:24:10raptorhow would we make them shared pointers if .new() is being managed by LuaW?
17:24:26Watusimoto3) register them somewhere for later deletion on the c++ side
17:24:34raptoryuk yuk yuk
17:24:42Watusimoto(i.e. in the object's constructor or something)
17:25:12Watusimotothough I am not sure if we really have the option to reuse menu items
17:25:25Watusimotowe can't store them between script runs, and we only ask for them once
17:25:34Watusimotoso 2 should work pretty well
17:25:49raptorhow would that affect the main menu and other static menus?
17:26:16WatusimotoI'd think we'd only do it for the menu created for the plugin
17:26:31Watusimotomaybe not even in the menu code, but in the plugin running code
17:26:40raptorso detect it in the constructor that uses the (L)
17:26:43raptorset a flag
17:26:43Watusimotoa) request menu items from script
17:26:46raptorand delete on close..
17:26:47Watusimotob) display menu
17:26:57Watusimotoc) return menu selections to script
17:27:05Watusimotod) delete menu items we got in a
17:27:31Watusimotowe already do a-c
17:28:36raptorwould be solution by tracking it in the (L) constructor work?
17:28:40raptor*would my
17:29:54Watusimotoit might
17:30:06WatusimotoI'm not sure
17:30:22Watusimotomy head is not at its clearest at the moment
17:30:32raptorwelcome to my world 24/7!
17:30:43raptoroh man, it's *really* late there
17:30:47raptorforgive me..
17:30:55raptori'll migrate GameInfo, at least...
17:31:02raptorwe can talk about menu items later
17:31:26Watusimotono worries
17:31:39WatusimotoI think the menu items will be easy to resolve
17:31:41raptoralthough I still feel our hijacking of LuaW_gc to be proxy-only may bite us again...
17:32:23raptori also forgot why we need the proxies again...
17:32:25kaen has joined
17:32:44Watusimotothe proxies solve this situation
17:32:58Watusimotoscript has a handle on an asteroid
17:33:11Watusimotoasteroid dies and is deleted by c++
17:33:19Watusimotoscript tries to get info on asteroid
17:33:20Watusimotocrash
17:33:48Watusimotothe proxy will linger after the astroid is gone and at least return nils rather than crashes
17:34:06Watusimotoit ony really matters if a script holds onto an object for more than one tick
17:34:22Watusimotolike if you are following an asteroid, for example
17:35:50raptorah ok
17:35:53raptorthanks
17:39:25Watusimotoit drove me crazy because there is no way of knowing if your c++ object is suddenly gone
17:39:42raptorodd
17:39:43Watusimotoaside from the crashes, of course
17:39:54raptorand the upstream maintainer doesn't agree, is that what you said?
17:40:05raptori thought you suggested proxies to him in an e-mail once..
17:40:12Watusimotohe claims it's possible to use boost to manage c++ object deletion
17:40:25Watusimotoand it may be, but it won't work for us without rewriting tnl
17:40:32raptori don't like touching boost..
17:40:42raptorexcept shared_ptr is nice..
17:41:08Watusimotoboost is generally nice, but I too avoid it
17:41:18Watusimotolots of very high quality code
17:41:26raptoryes
17:41:39Watusimotoand well understood and widely used
17:41:53raptorincreases compile time 10 fold for everyone!
17:51:37Watusimotoalright... must sleep
17:51:40Watusimotogood night!
17:51:41raptornight
17:51:52Watusimoto(almost have clientgame working in tests)
17:51:57Watusimoto(but not quite)
17:51:58raptorOOooo
17:57:45Watusimoto Quit (Ping timeout: 255 seconds)
18:15:50BFLogBot Commit: b7b076f50295 | Author: buckyballreaction | Message: Add note to our LuaW_gc method to remind us that any object called with luaW_new must be deleted in c++ and not with LuaW
18:16:19BFLogBot Commit: 059ad86b139a | Author: buckyballreaction | Message: Remove LuaWrapperUtils.h. It's not being used and far behind upstream
18:58:03Wuzzy Quit (Quit: Wuzzy)
20:17:20Nothing_Much Quit (Quit: l8r)
20:38:31raptor Quit (Ping timeout: 264 seconds)
21:08:52raptor has joined
21:08:53ChanServ sets mode +o raptor
21:25:39bobdaduck has joined
21:26:17bobdaduckbad server up
21:26:25raptorDONT TEMPT ME
21:27:01bobdaduckrofl
21:32:12kaen Quit (Ping timeout: 246 seconds)
21:44:53bobdaduckwow
21:45:00bobdaduckgoing over bombs while cloaked crashes it what the heck
21:45:01bobdaduckxD
21:45:15bobdaduckohh
21:45:21bobdaduckmust be missing a removefromGamewithdelay
21:47:12raptorglad I could help...
21:47:34bobdaduckthanks!
21:57:25fordcarsheh
22:02:04ozbitfighter has joined
22:03:16bobdaduckHi
22:03:29ozbitfighterhi
22:07:17kaen has joined
22:27:08Nothing_Much has joined
22:27:19Nothing_Much Quit (Changing host)
22:27:19Nothing_Much has joined
22:53:22bobdaduckFordcars...
22:58:09raptorok.. i gotta stop crashing the game..
22:58:20bobdaduckwhy doesn't anybody tell me that?
22:58:45raptorbecause we secretly use you as Quality Assurance
22:59:17bobdaduckrofl
23:00:11fordcarswassup!
23:00:40bobdaduckfordcars I have a new bot request for you
23:00:48fordcarsok
23:00:57fordcarslets hope it doens't change modules
23:01:02bobdaducklol
23:01:03bobdaduckNope
23:01:10fordcarsyay its doable!
23:01:16bobdaduckTell me, have you ever played zombie feudalism?
23:01:20fordcarsNOPE
23:01:23fordcarsnope
23:01:30bobdaduckjoin my server then
23:11:15raptornight!
23:11:22raptor Quit ()
23:25:22Nothing_Much Quit (Quit: l8r)
23:51:43ozbitfighter Quit (Ping timeout: 250 seconds)

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.