Timestamps are in GMT/BST.
| 00:26:17 | fordcars_ | night guys, off to bed |
| 00:30:46 | | fordcars_ Quit (Ping timeout: 250 seconds) |
| 01:04:50 | | LordDVG has joined |
| 01:31:24 | | LordDVG Quit (Ping timeout: 246 seconds) |
| 04:36:15 | | Watusimoto_ has joined |
| 05:15:54 | | Watusimoto_ Quit (Ping timeout: 255 seconds) |
| 06:10:46 | | watusimoto Quit (Ping timeout: 252 seconds) |
| 06:25:36 | | watusimoto has joined |
| 06:25:36 | | ChanServ sets mode +o watusimoto |
| 06:35:02 | | raptor has joined |
| 06:35:02 | | ChanServ sets mode +o raptor |
| 06:51:45 | | BFLogBot Commit: 958aa32acd6d | Author: buckyballreaction | Message: Print pointer of unknown Lua objects when dumping the stack |
| 07:16:08 | raptor | man - having the proxy keep track of whether the owning object needs to be deleted gives invalid reads... |
| 07:16:16 | raptor | well gotta go.. |
| 07:16:18 | | raptor Quit () |
| 08:05:30 | | Watusimoto_ has joined |
| 08:45:55 | | Watusimoto_ Quit (Ping timeout: 264 seconds) |
| 09:05:33 | | bobdaduck has joined |
| 09:16:48 | | watusimoto Quit (Quit: Leaving.) |
| 09:43:41 | | fordcars has joined |
| 10:08:40 | fordcars | when 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:21 | bobdaduck | when you hit quit? |
| 10:20:04 | fordcars | well when I closed the Bitfighter command line at startup |
| 10:20:31 | fordcars | it freezes at startup |
| 10:31:22 | bobdaduck | I dunno what that is |
| 10:31:54 | bobdaduck | Sometimes 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:27 | bobdaduck | but no I dunno what problem you're getting |
| 10:40:09 | fordcars | weird |
| 10:42:49 | fordcars | YAY I found something for once!!!!!!!! |
| 10:43:03 | fordcars | It's the Window mode that messes everything guys |
| 10:43:14 | fordcars | if it's in window mode on startup |
| 10:48:19 | bobdaduck | hm |
| 12:15:40 | | bobdaduck Quit (Remote host closed the connection) |
| 12:24:02 | | LordDVG has joined |
| 12:36:31 | | LordDVG Quit (Remote host closed the connection) |
| 12:50:28 | | kaen Quit (Ping timeout: 268 seconds) |
| 13:24:55 | | bobdaduck has joined |
| 13:28:17 | bobdaduck | fordcars |
| 13:28:22 | bobdaduck | you should name the bot after DnD monsters |
| 13:28:38 | bobdaduck | goblin kobalds and stuff |
| 13:58:37 | bobdaduck | And things that make no sense holding a giant sword or axe or whatever. "bobdaduck was zapped by a giant spider" |
| 14:00:46 | | Nothing_Much Quit (Ping timeout: 268 seconds) |
| 14:07:25 | | Wuzzy has joined |
| 14:24:03 | | Nothing_Much has joined |
| 14:24:44 | | Nothing_Much Quit (Max SendQ exceeded) |
| 14:30:48 | | Nothing_Much has joined |
| 14:31:47 | | Nothing_Much Quit (Changing host) |
| 14:31:47 | | Nothing_Much has joined |
| 14:38:50 | fordcars | but bob! |
| 14:39:03 | fordcars | I CAN'T FINISH THE BOT :( |
| 14:39:11 | fordcars | I can't change modules in 018 |
| 14:39:33 | | ChickenSoup_ has joined |
| 14:41:32 | | LordDVG has joined |
| 14:46:36 | | ChickenSoup_ Quit (Ping timeout: 250 seconds) |
| 14:47:02 | | fordcars Quit (Ping timeout: 250 seconds) |
| 14:52:58 | | Watusimoto has joined |
| 15:00:40 | | LordDVG Quit (Remote host closed the connection) |
| 15:55:58 | | Nothing_Much Quit (Read error: Operation timed out) |
| 16:08:15 | | bobdaduck Quit (Remote host closed the connection) |
| 16:10:11 | | Nothing_Much has joined |
| 16:10:32 | | raptor has joined |
| 16:10:32 | | ChanServ sets mode +o raptor |
| 16:11:31 | raptor | hello |
| 16:14:12 | raptor | Watusimoto: did you see my conversation with kaen about the LuaW memory leak? |
| 16:16:34 | raptor | calgary has flooded! |
| 16:16:41 | raptor | (alberta) |
| 16:16:43 | raptor | crazy |
| 16:18:41 | | Nothing_Much Quit (Changing host) |
| 16:18:41 | | Nothing_Much has joined |
| 16:22:55 | Watusimoto | no |
| 16:23:00 | Watusimoto | hi |
| 16:23:03 | raptor | hi |
| 16:23:37 | raptor | well... my solution failed, and now I don't know what to do.. |
| 16:23:50 | raptor | so if you have a moment (to read), i'd like your input... |
| 16:24:09 | Watusimoto | ok |
| 16:24:16 | raptor | http://bitfighter.org/irclogs/index.php?date=2013-06-20 |
| 16:24:19 | raptor | starting at 21:10:20 |
| 16:24:37 | raptor | only runs about 30 lines |
| 16:27:21 | Watusimoto | so the new is never deleted? |
| 16:27:26 | raptor | correct |
| 16:27:38 | raptor | because in the luaW_gc method we only delete the proxy |
| 16:27:50 | Watusimoto | so the original object is left hanging |
| 16:27:55 | raptor | yes |
| 16:28:08 | Watusimoto | so... why not add a flag on the proxy about whether to delete the object or not? |
| 16:28:13 | raptor | yes |
| 16:28:33 | raptor | I did that, but now I'm getting invalid reads in valgrind |
| 16:28:39 | raptor | let me show you my diff... |
| 16:29:15 | raptor | http://pastie.org/8067869 |
| 16:29:18 | raptor | nothing special |
| 16:29:33 | raptor | I had to leave before I could do further memory analysis |
| 16:29:43 | raptor | which i'm doing now |
| 16:31:26 | Watusimoto | brb |
| 16:34:36 | raptor | oh man, it's late for you... sorry for throwing a problem at you.. |
| 16:35:42 | raptor | oh i'm an idiot |
| 16:35:55 | raptor | i'mtrying to read the proxy flag after deleting the proxy |
| 16:36:06 | raptor | idiot idiot idiot |
| 16:45:39 | Watusimoto | that's not good |
| 16:45:42 | Watusimoto | but one question |
| 16:45:51 | Watusimoto | what type of object are we talking about here? |
| 16:45:56 | Watusimoto | (for example) |
| 16:46:24 | raptor | say in a Lua script you call: game = GameInfo.new() |
| 16:46:31 | raptor | or Asteroid.new() |
| 16:46:52 | raptor | that calls luaW_new (which calls c++ new) |
| 16:47:27 | raptor | one invalid read left... |
| 16:47:41 | Watusimoto | when the asteroid dies, as a matter of course, isn't it deleted by the game anyway? |
| 16:48:19 | raptor | uhh... should it be if we call 'new' in c++ ? |
| 16:48:42 | Watusimoto | I think all new objs are new'ed |
| 16:48:49 | Watusimoto | then deleted |
| 16:49:20 | raptor | hmm... let me see what happens with Asteroid... |
| 16:49:36 | Watusimoto | look at BfObject::deleteObject |
| 16:49:47 | Watusimoto | if(!mGame) // Not in a game |
| 16:49:47 | Watusimoto | delete this; |
| 16:49:47 | Watusimoto | else |
| 16:49:47 | Watusimoto | mGame->addToDeleteList(this, deleteTimeInterval); |
| 16:50:01 | Watusimoto | and the delete list is periodically purged |
| 16:50:10 | raptor | yeah but that is explicitly called |
| 16:50:32 | Watusimoto | in game::processDeleteList |
| 16:50:48 | Watusimoto | when an asteroid is killed it is added to the delete list |
| 16:50:56 | Watusimoto | where it is deleted |
| 16:51:04 | Watusimoto | void Game::processDeleteList(U32 timeDelta)\ |
| 16:51:53 | raptor | ok you win with ASteroid |
| 16:51:58 | raptor | maybe I chose a bad example.. |
| 16:52:14 | Watusimoto | I think I win with any game object |
| 16:52:15 | raptor | it at least leaks with GameInfo.new() and any menuitem created from a Lua script... |
| 16:52:57 | raptor | i see explicit calls to deleteObject() in many of the gameObject classes... |
| 16:53:08 | Watusimoto | GameInfo isn't a game object, so taht's different |
| 16:53:27 | Watusimoto | why does a script want to create one of those? it shoudl come from c++, not the other way around |
| 16:54:19 | raptor | plugins? |
| 16:54:32 | raptor | you gave plugins direct access to menu creation |
| 16:54:42 | Watusimoto | ah, menu items |
| 16:54:55 | Watusimoto | sorry, didn't see that |
| 16:55:15 | Watusimoto | those probably need to be handled specially if they are leaking |
| 16:55:46 | Watusimoto | I think that's a special case |
| 16:56:09 | Watusimoto | most other items either come from c++ (playerInfo, for example), or get deleted automatically (testItems) |
| 16:56:37 | raptor | playerInfo is another leaker i think.. |
| 16:58:47 | Watusimoto | yes, but maybe lua shouldn't be creating those |
| 16:59:13 | raptor | it isn't |
| 16:59:18 | raptor | c++ is |
| 16:59:31 | Watusimoto | and c++ will clean it up, no? |
| 16:59:52 | raptor | oh wait, it does... in the CLientInfo destructor.. |
| 17:00:03 | raptor | let me test.. |
| 17:00:26 | Watusimoto | menuitems may be a unique case |
| 17:00:36 | Watusimoto | we want lua to create them, but they are not game objects |
| 17:03:45 | raptor | ok, playerInfo is not leaking |
| 17:04:01 | raptor | see, this is good I spoke to you.. |
| 17:05:04 | raptor | so that leaves GameInfo and anything menu-y |
| 17:06:04 | Watusimoto | why are we creating gameInfo? |
| 17:06:22 | | fordcars has joined |
| 17:06:25 | raptor | just MenuItems actually |
| 17:06:37 | Watusimoto | progress! |
| 17:06:50 | raptor | GameInfo is a conglomerate object that returns info about the game or gameType |
| 17:06:59 | raptor | it can return the gameType object to Lua, too |
| 17:07:01 | Watusimoto | maybe the menu displayer can just delete the menu items when the menu is closed |
| 17:07:14 | Watusimoto | all that stuff originates in c++ land |
| 17:07:24 | raptor | these are the methods in GameInfo: http://pastie.org/pastes/8067941/text |
| 17:07:33 | raptor | ok |
| 17:08:03 | raptor | i'll have to look at the menu displayer... I'm not too familiar with that code |
| 17:08:36 | Watusimoto | the point is that lua isn't creating gameInfos |
| 17:08:51 | Watusimoto | it only requests a copy of what has already been created |
| 17:09:06 | raptor | in Lua, you do GameInfo.new() |
| 17:09:16 | raptor | it calls c++ 'new' |
| 17:09:20 | raptor | through LuaW |
| 17:09:46 | raptor | if you want gameInfo in a script you need to do GameInfo.new() |
| 17:11:01 | Watusimoto | right -- but is there any valid reason to do this? |
| 17:11:09 | Watusimoto | if not, maybe we can just block it somehow |
| 17:11:26 | raptor | only if you want access to those methods |
| 17:11:37 | raptor | s_bot uses the gameType heavily |
| 17:11:58 | raptor | unless you're getting at something else |
| 17:12:46 | Watusimoto | s_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:59 | Watusimoto | s_bot never does GameInfo.new() |
| 17:13:00 | raptor | it doesn't exist in c++ already |
| 17:13:03 | raptor | yes it does |
| 17:13:11 | Watusimoto | it does? |
| 17:13:25 | Watusimoto | it should be gameInfo = getGameInfo() |
| 17:13:30 | raptor | yes it does |
| 17:13:34 | Watusimoto | well |
| 17:13:37 | raptor | game = GameInfo.new() |
| 17:13:58 | raptor | then it uses game:getGameType() |
| 17:14:16 | Watusimoto | well, maybe it shouldn't! |
| 17:14:23 | raptor | ok then |
| 17:14:35 | Watusimoto | to me gameInfo should be a repository for info about the current game |
| 17:14:46 | raptor | how should it work (forgive my stupidness.. ) |
| 17:14:48 | raptor | yes |
| 17:14:56 | Watusimoto | it could even be a table that is maintained in a proteced location |
| 17:14:58 | raptor | and we do that by aggregating lots into a single object |
| 17:15:03 | Watusimoto | rather than a series of methods |
| 17:15:18 | Watusimoto | but a script should never do GameInfo.new() |
| 17:15:38 | Watusimoto | but rather getGameInfo() to grab the existing copy |
| 17:15:49 | raptor | you mean levelgen:getGameInfo() |
| 17:15:52 | raptor | or whatever? |
| 17:15:53 | Watusimoto | because what would a new gameInfo represent? |
| 17:15:54 | Watusimoto | yes |
| 17:15:59 | Watusimoto | or bot:getGameInfo() |
| 17:16:15 | raptor | and we'd store a persistent copy of the GameInfo object somewhere? |
| 17:16:35 | Watusimoto | ? |
| 17:16:37 | Watusimoto | yes |
| 17:16:39 | Watusimoto | ? |
| 17:16:51 | raptor | the GameInfo object is a conglomerate object |
| 17:16:51 | Watusimoto | or it might be the Game object itself |
| 17:16:57 | Watusimoto | with some methods on it |
| 17:16:57 | raptor | it's not used anywhere but for Lua |
| 17:17:08 | raptor | called 'LuaGameInfo' in c++ |
| 17:17:35 | raptor | it basically just calls gServerGame for all of its methods |
| 17:17:37 | Watusimoto | all those methdos you listed get info about the game, right/ |
| 17:17:43 | raptor | right |
| 17:17:45 | Watusimoto | so we could do two things |
| 17:18:07 | Watusimoto | 1) put those methods on gServerGame, and return that |
| 17:18:14 | raptor | ok |
| 17:18:17 | raptor | make sense |
| 17:18:20 | raptor | *makes |
| 17:18:27 | Watusimoto | or 2) create a read-only table in the registry and just keep it updated |
| 17:18:40 | Watusimoto | so when the script wanted some game-related info, it would look in the table |
| 17:18:52 | Watusimoto | and table would be collected by lua |
| 17:19:05 | raptor | I think... #2 would be less work |
| 17:19:21 | Watusimoto | I'm not sure, but it's not a bad solution |
| 17:19:36 | raptor | it doesn't have the 'keep updated' part |
| 17:19:58 | Watusimoto | 1 doesn;t have the keep updaetd part |
| 17:20:04 | Watusimoto | 2 does |
| 17:20:31 | raptor | oh duh |
| 17:20:35 | raptor | i meant #1 all along... |
| 17:20:39 | Watusimoto | :-) |
| 17:20:47 | raptor | man... forgive me... not enough sleep |
| 17:20:53 | Watusimoto | I understand |
| 17:21:12 | Watusimoto | I like 2 a tiny bit better, but 1 is more like everything else we do |
| 17:21:38 | Watusimoto | I just don;t like the idea of the (admittedly tiny) overhead of calling a function to get the game title |
| 17:21:51 | Watusimoto | but that's silly when I think about it rationally |
| 17:22:03 | Watusimoto | so 1 would be good |
| 17:22:10 | raptor | heh |
| 17:22:23 | raptor | ok, so if i do that, then we nuke the GameInfo problem... |
| 17:22:30 | raptor | now for the menuItems? |
| 17:23:21 | Watusimoto | those are more complex |
| 17:23:24 | Watusimoto | options: |
| 17:23:40 | Watusimoto | 1) create them as shared_ptrs and let boost deal with it |
| 17:23:50 | Watusimoto | 2) delete them in c++ after the menu is closed |
| 17:24:08 | Watusimoto | (which would create problems if lua wanted to reuse them somehow) |
| 17:24:10 | raptor | how would we make them shared pointers if .new() is being managed by LuaW? |
| 17:24:26 | Watusimoto | 3) register them somewhere for later deletion on the c++ side |
| 17:24:34 | raptor | yuk yuk yuk |
| 17:24:42 | Watusimoto | (i.e. in the object's constructor or something) |
| 17:25:12 | Watusimoto | though I am not sure if we really have the option to reuse menu items |
| 17:25:25 | Watusimoto | we can't store them between script runs, and we only ask for them once |
| 17:25:34 | Watusimoto | so 2 should work pretty well |
| 17:25:49 | raptor | how would that affect the main menu and other static menus? |
| 17:26:16 | Watusimoto | I'd think we'd only do it for the menu created for the plugin |
| 17:26:31 | Watusimoto | maybe not even in the menu code, but in the plugin running code |
| 17:26:40 | raptor | so detect it in the constructor that uses the (L) |
| 17:26:43 | raptor | set a flag |
| 17:26:43 | Watusimoto | a) request menu items from script |
| 17:26:46 | raptor | and delete on close.. |
| 17:26:47 | Watusimoto | b) display menu |
| 17:26:57 | Watusimoto | c) return menu selections to script |
| 17:27:05 | Watusimoto | d) delete menu items we got in a |
| 17:27:31 | Watusimoto | we already do a-c |
| 17:28:36 | raptor | would be solution by tracking it in the (L) constructor work? |
| 17:28:40 | raptor | *would my |
| 17:29:54 | Watusimoto | it might |
| 17:30:06 | Watusimoto | I'm not sure |
| 17:30:22 | Watusimoto | my head is not at its clearest at the moment |
| 17:30:32 | raptor | welcome to my world 24/7! |
| 17:30:43 | raptor | oh man, it's *really* late there |
| 17:30:47 | raptor | forgive me.. |
| 17:30:55 | raptor | i'll migrate GameInfo, at least... |
| 17:31:02 | raptor | we can talk about menu items later |
| 17:31:26 | Watusimoto | no worries |
| 17:31:39 | Watusimoto | I think the menu items will be easy to resolve |
| 17:31:41 | raptor | although I still feel our hijacking of LuaW_gc to be proxy-only may bite us again... |
| 17:32:23 | raptor | i also forgot why we need the proxies again... |
| 17:32:25 | | kaen has joined |
| 17:32:44 | Watusimoto | the proxies solve this situation |
| 17:32:58 | Watusimoto | script has a handle on an asteroid |
| 17:33:11 | Watusimoto | asteroid dies and is deleted by c++ |
| 17:33:19 | Watusimoto | script tries to get info on asteroid |
| 17:33:20 | Watusimoto | crash |
| 17:33:48 | Watusimoto | the proxy will linger after the astroid is gone and at least return nils rather than crashes |
| 17:34:06 | Watusimoto | it ony really matters if a script holds onto an object for more than one tick |
| 17:34:22 | Watusimoto | like if you are following an asteroid, for example |
| 17:35:50 | raptor | ah ok |
| 17:35:53 | raptor | thanks |
| 17:39:25 | Watusimoto | it drove me crazy because there is no way of knowing if your c++ object is suddenly gone |
| 17:39:42 | raptor | odd |
| 17:39:43 | Watusimoto | aside from the crashes, of course |
| 17:39:54 | raptor | and the upstream maintainer doesn't agree, is that what you said? |
| 17:40:05 | raptor | i thought you suggested proxies to him in an e-mail once.. |
| 17:40:12 | Watusimoto | he claims it's possible to use boost to manage c++ object deletion |
| 17:40:25 | Watusimoto | and it may be, but it won't work for us without rewriting tnl |
| 17:40:32 | raptor | i don't like touching boost.. |
| 17:40:42 | raptor | except shared_ptr is nice.. |
| 17:41:08 | Watusimoto | boost is generally nice, but I too avoid it |
| 17:41:18 | Watusimoto | lots of very high quality code |
| 17:41:26 | raptor | yes |
| 17:41:39 | Watusimoto | and well understood and widely used |
| 17:41:53 | raptor | increases compile time 10 fold for everyone! |
| 17:51:37 | Watusimoto | alright... must sleep |
| 17:51:40 | Watusimoto | good night! |
| 17:51:41 | raptor | night |
| 17:51:52 | Watusimoto | (almost have clientgame working in tests) |
| 17:51:57 | Watusimoto | (but not quite) |
| 17:51:58 | raptor | OOooo |
| 17:57:45 | | Watusimoto Quit (Ping timeout: 255 seconds) |
| 18:15:50 | | BFLogBot 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:19 | | BFLogBot Commit: 059ad86b139a | Author: buckyballreaction | Message: Remove LuaWrapperUtils.h. It's not being used and far behind upstream |
| 18:58:03 | | Wuzzy Quit (Quit: Wuzzy) |
| 20:17:20 | | Nothing_Much Quit (Quit: l8r) |
| 20:38:31 | | raptor Quit (Ping timeout: 264 seconds) |
| 21:08:52 | | raptor has joined |
| 21:08:53 | | ChanServ sets mode +o raptor |
| 21:25:39 | | bobdaduck has joined |
| 21:26:17 | bobdaduck | bad server up |
| 21:26:25 | raptor | DONT TEMPT ME |
| 21:27:01 | bobdaduck | rofl |
| 21:32:12 | | kaen Quit (Ping timeout: 246 seconds) |
| 21:44:53 | bobdaduck | wow |
| 21:45:00 | bobdaduck | going over bombs while cloaked crashes it what the heck |
| 21:45:01 | bobdaduck | xD |
| 21:45:15 | bobdaduck | ohh |
| 21:45:21 | bobdaduck | must be missing a removefromGamewithdelay |
| 21:47:12 | raptor | glad I could help... |
| 21:47:34 | bobdaduck | thanks! |
| 21:57:25 | fordcars | heh |
| 22:02:04 | | ozbitfighter has joined |
| 22:03:16 | bobdaduck | Hi |
| 22:03:29 | ozbitfighter | hi |
| 22:07:17 | | kaen has joined |
| 22:27:08 | | Nothing_Much has joined |
| 22:27:19 | | Nothing_Much Quit (Changing host) |
| 22:27:19 | | Nothing_Much has joined |
| 22:53:22 | bobdaduck | Fordcars... |
| 22:58:09 | raptor | ok.. i gotta stop crashing the game.. |
| 22:58:20 | bobdaduck | why doesn't anybody tell me that? |
| 22:58:45 | raptor | because we secretly use you as Quality Assurance |
| 22:59:17 | bobdaduck | rofl |
| 23:00:11 | fordcars | wassup! |
| 23:00:40 | bobdaduck | fordcars I have a new bot request for you |
| 23:00:48 | fordcars | ok |
| 23:00:57 | fordcars | lets hope it doens't change modules |
| 23:01:02 | bobdaduck | lol |
| 23:01:03 | bobdaduck | Nope |
| 23:01:10 | fordcars | yay its doable! |
| 23:01:16 | bobdaduck | Tell me, have you ever played zombie feudalism? |
| 23:01:20 | fordcars | NOPE |
| 23:01:23 | fordcars | nope |
| 23:01:30 | bobdaduck | join my server then |
| 23:11:15 | raptor | night! |
| 23:11:22 | | raptor Quit () |
| 23:25:22 | | Nothing_Much Quit (Quit: l8r) |
| 23:51:43 | | ozbitfighter Quit (Ping timeout: 250 seconds) |