#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2013-06-19

Timestamps are in GMT/BST.

01:43:13koda has joined
04:17:45Nothing_Much Quit (Ping timeout: 264 seconds)
04:21:42Watusimoto_ has joined
04:31:02Nothing_Much has joined
04:36:34Watusimoto_ Quit (Ping timeout: 276 seconds)
04:50:36ozbitfighter has joined
04:51:29Watusimoto_ has joined
04:54:07BFLogBot Commit: d41176b70eaf | Author: kaen | Message: Add Socket::isWritable() and wait for a writable socket in HTTPRequest
04:54:12kaenhopefully the levelDB stuff works in windows now
04:55:54kaenwhat a horrifying incursion into WSA
04:56:11kaenright where its slimy tendrils intertwine with BSD sockets
05:00:39kaenoh boy!
05:01:17kaenI've broken the linux build with a windows fix...
05:01:26kaenhow the tables have turned...
05:17:40LordDVG has joined
05:25:19ozbitfighterwb LordDVG
05:25:32LordDVGhello ozbitfighter
05:25:38LordDVGwhat are you doing?
05:25:53ozbitfightertrying to play teeworlds.
05:26:35LordDVGthis is a nice game
05:26:50LordDVGfor LAN party
05:27:04ozbitfighterbitfighter or teeworlds
05:27:05ozbitfighteror both?
05:29:48ozbitfighter.
05:30:10LordDVGboth
05:47:53Watusimoto_ Quit (Ping timeout: 252 seconds)
05:56:58BFLogBot Commit: 768e7f668691 | Author: kaen | Message: fix compiling on linux
05:56:59BFLogBot Commit: d6b62f750e1d | Author: kaen | Message: understand EINPROGRESS as a WouldBlock error on linux
05:57:01BFLogBot Commit: 7c925d47d875 | Author: kaen | Message: fix warning in udp.cpp
05:57:02BFLogBot Commit: d711d36d12ec | Author: kaen | Message: use fixed connection timeout in HttpRequest
05:58:55kaenI fixed the UnknownError on successfully connect call in linux!
06:09:19kaensometimes my grammarator goes all wonky...
06:11:43ozbitfightereh?
06:11:51ozbitfighterspeak engliosh!
06:12:00ozbitfighterah umj Enghrish
06:12:02ozbitfighterEnglish
06:13:44kaenI can Inglush pretty good sometimes
06:14:02kaenbut not immediately after waking up :)
06:36:59ozbitfighterThis ubuntu font is cool.
06:37:14ozbitfighterBut then I thought that about Comic sans when it first came out.
06:38:08ozbitfighterNo trebuchet font i mean.
06:48:11kaenwatusimoto, does taking a screenshot on windows work for you?
06:48:27kaenand could you try uploading something to the level DB to see if it uploads a screenshot?
07:24:18kaennevermind, I fixed it
07:25:27BFLogBot Commit: 463b68e875ba | Author: kaen | Message: explicitly use binary mode in readFile
07:42:10raptor has joined
07:42:10ChanServ sets mode +o raptor
07:43:10kaenmorning
07:43:18raptormornig!
07:43:58raptorkaen: you've been busy over the night!
07:44:03raptorand it looks like ugly stuff..
07:44:09kaenindeed.
07:44:10kaenon both counts.
07:45:32raptori've always thought that the TNL socket stuff was a little wonky
07:45:45kaenoh how it is
07:45:57raptorbut i never had the courage to go tinkering..
07:46:32raptoris this opposite logic than you intended?: https://code.google.com/p/bitfighter/source/detail?r=7c925d47d8757d1ff1fd51db53e73ff1609726aa
07:47:08kaenoh nope :x
07:47:14kaennice catch
07:48:19kaener, I meant "yes". it's wrong as committed.
07:51:23BFLogBot Commit: 86b92fa37c0f | Author: kaen | Message: fix inverted logic in Socket::isWritable()
07:54:39kaenmy host still hasn't recovered my node yet...
07:55:56raptor:(
07:59:08kaenalso, there is this crazy bug with pleiades regarding authorship and ownership...
07:59:10kaene.g. http://bitfighter.org/pleiades/levels/view/33
07:59:18kaenand I can't figure it out for the life of me...
08:09:26watusimotohi kaen
08:09:31kaenhello
08:09:41watusimotoyes, screenshot works
08:09:45watusimotoat least it did last night!
08:10:08watusimotoand hi raptor
08:11:05raptorhi watusimoto
08:11:19kaenit works/has worked
08:11:44kaenit wasn't opening the temporary screenshot file in binary mode, so the pngs were empty
08:11:59kaenanyway it works now
08:12:27kaen(as far as I know)
08:12:33kaenI'll be back in like an hour
08:17:33watusimotook, great
08:17:38watusimotoglad I could help!
08:19:28raptorwatusimoto: that variable and respective comment (from the editor) could breed insanity
08:19:41raptorthat undoundolevellevl
08:22:31watusimotoallUndoneUndoLevel?
08:22:39raptoryeah, that thingy
08:22:46watusimotoyou saw my mail, no?
08:22:54raptori thought the variable was bad enough, then I say the associated comment
08:22:56raptoryes
08:23:02raptor*saw
08:23:19watusimotoseems clear enough to me :-)
08:23:31watusimotowhat would you name it?
08:23:51raptori'm still not sure I know what it means!
08:24:35watusimotoso if I do an action
08:24:41watusimotoI can then undo it and be back where I started
08:24:58watusimotoif I do two actions, and undo one, I am not back where I started
08:25:05watusimotobut if I undo the second, I am
08:25:08watusimotoclear so far?
08:25:28raptory
08:25:51watusimotoso that variable points to the undo level at which I have undone all the edits I have made. In the examples I game, it would point to level 0
08:26:06watusimotobut if I made two changes, then saved, it would point to the 2nd state
08:26:41watusimotoI could undo past that, back to a version before I saved, then redo back to my 2nd state, and I would be back to having made no changes in the level (since my save)
08:26:48raptorok
08:26:54watusimotodoes that make more sense?
08:26:57raptoryes
08:27:05watusimotoso that's what it is!
08:27:19watusimotothe level at which all undos have been undone
08:27:24raptoryes ok
08:27:37watusimotoso... what would you call that?
08:28:20raptornow look at it from my perspective - an unsuspecting, naive coder looks at a variable becaue it showed up in a method he was refactoring
08:28:30raptorhe see that variable and comment..
08:28:41raptorhis brain breaks
08:28:58watusimotoI created that var and comment before there were any unsuspecting naieve coders poking around :-)
08:29:24watusimotobut I see you still haven't proposed a more intuitive name
08:29:47raptor:)
08:29:49watusimotoI can only conclude that you agree the name I chose is the best there could be!
08:29:54raptorit's because i'm in the middle of a refactor!
08:29:54watusimotoso thank you!
08:30:14raptorhaha
08:55:28ozbitfighter.
09:38:59bobdaduck has joined
09:44:51Nothing_Much Quit (Quit: l8r)
09:45:13Nothing_Much has joined
09:45:17Nothing_Much Quit (Changing host)
09:45:17Nothing_Much has joined
09:59:59raptorok
10:00:01raptorwell
10:00:21raptori'm done with converting the editor ID dialogs into real UI menus
10:00:36raptorexcept for one part
10:01:01raptorright now if you try to enter a duplicate ID, it renders red
10:01:11raptornot sure how to do that..
10:01:18raptorwith the current flow of things
10:06:07watusimotoI'm not sure either, off the top of my head, but there is probably a way. I assume you have creaeted a more normal menu structure than the hack that was in place. In this case, I think there are two strategies available -- either create a new menu item after the id has been changed (setting its color appropriately using a possibly yet-to-be-coded design), or maybe adding a callback mechanism that can set the color after the item has been cha
10:06:07watusimotoalready have such a callback, not sure)
10:06:30raptoryeah, i just found the callback with the TextEntryMenuItem
10:06:35raptorlooks promising..
10:06:43raptornow to try and hook it up to the rendering method..
10:12:53watusimotoI suspect we do not have a way to change an entry's color... though we might. If not, it would be easy enough to add, and the callback could just check for dupes and call it
10:17:19raptor99999 IDs should be enough for anyone, right?
10:17:37koda Quit (Ping timeout: 240 seconds)
10:17:38raptorRIGHT BOBDADUCK?
10:18:03bobdaduckrofl
10:18:17bobdaduckLevelgen carnival is my highest, it has 60 ID'd objects.
10:18:23bobdaduck....9999 sounds just about right.
10:37:50watusimotoraptor: why the limit to 99999? is that what we had before?
10:38:21raptorwe had a limit of 10 digits, which I just kept... so we can go to 9999999999!
10:39:02watusimotois that under S32max?
10:39:07raptoryes
10:39:09watusimotoI'm too bleary eyed to count the 9s
10:39:18kaen/////////////////////////////////////// __ ___
10:39:18kaen/////////////////////////////////////// /__ _. ._ _ _ | ._ _
10:39:18kaen/////////////////////////////////////// \_| (_| | | | (/_ | \/ |_) (/_
10:39:18kaen/////////////////////////////////////// / |
10:39:20raptorwait actually no...
10:39:21raptorhaha
10:39:23kaengets me every time.
10:39:28raptori'll reduce it..
10:39:28watusimotoyay!!
10:39:52watusimotobecause we have S32 ids (I think), with positive (user assigned) and negative ones (system assigned)
10:40:03watusimotoof course, U32 has no more digits than S32
10:40:14kaensurely there's a map of long gametype names to abbreviations somewhere... right?
10:40:24watusimotoprobably, yes
10:40:54kaengametypesenum
10:40:59kaenlooks promising
10:41:09watusimotoor ... maybe not -- you may theorteically need to instantiate the gametype to get the short game string
10:41:16watusimotoI'm just not sure
10:41:42kaenwell
10:41:46kaenthat makes sense actually...
10:42:15watusimotothere is no mapping
10:42:17watusimotoconst char *HTFGameType::getShortName() const { return "HTF"; }
10:42:45watusimotothough you could create one by adding to xmacro GAME_TYPE_TABLE
10:43:07kaengrep '::getShortName()' -r .
10:44:08kaenhmm
10:44:18watusimotook, I need to head out... I'm staying logged in here, so don't be fooled. I'll be on later.
10:45:55raptorso you can read my variable name complaints in the morning!
10:46:33kaenumm, can we normalize these abbreviations a bit?
10:46:46kaenhttp://pastie.org/8059988
10:46:59raptorhaha
10:47:09raptoractually
10:47:23raptormaybe there should be another method getAbbrev()
10:47:35raptorand it corresponds to 'SOC' instead of 'S'
10:47:54raptorthat method might just be used for in-game display in the game clock
10:48:05kaenI think you're right
10:48:21kaenexcept that I still think we should just change these methods :)
10:48:33kaenor decide to always use these names
10:48:52kaenbecause I'm actually just working on pleiades, and I'd like to use the same "short" names
10:49:12kaenand if we added abbreviation methods they'd be unused (as yet)
10:50:04raptorso you think the game timer should also show the same as the levels in the database?
10:50:15kaenyes, whichever that ends up being
10:50:17raptorI'm thinking they should be consistent...
10:50:30kaenI think we should specifically *not* have two ways to abbreviate things.
10:50:33raptori don't know why watusimoto changed them when redoing the game timer
10:50:41raptorheh, i agree
10:50:57kaenokay
10:51:12kaenI'll just use these for now until we make a decision
10:51:18kaensince it's not in c++ land anyway
10:51:26raptorI think I take issue with 'S' for Soccer
10:51:32kaenditto
10:51:34raptorS can be anything!
10:51:57kaenI'm thinking use true abbreviations, or first three letters for single word gametypes
10:52:14kaenHTF/CTF/COR/NEX
10:52:25raptori think bobdaduck had some input once about what they should be..
10:52:35kaenthat's a pretty simple algorithm
10:52:40bobdaduckWe should just use the first letters
10:52:42kaenyou could guess them without knowing them.
10:52:43raptorhe was reorganizing the forums
10:52:45kaenZON?
10:52:47raptorBIT
10:52:59raptori think BM is better
10:53:03kaensee, for those ZC and BM make more sense to me and sound better
10:53:08raptoryes, me too
10:53:09kaenand fall into my simple rule :)
10:53:09bobdaduckyeah
10:53:31raptorso they do!
10:57:47LordDVG Quit (Remote host closed the connection)
10:59:21ozbitfighteri should sleep.
10:59:42ozbitfighterwhere is everyone?
11:01:00raptorUtah, USA
11:06:30raptori'm using void pointers in callbacks!
11:06:36raptorremember to dynamic cast!
11:11:38bobdaduckI'm trying to make all the points of a nexus' geom move around randomly in levelgen carnival
11:11:42bobdaduckSup?
11:13:07bobdaduckrofl
11:13:08bobdaduckgot it
11:13:30ozbitfighter Quit (Quit: Page closed)
11:13:44kaenuh
11:13:45kaenGAME_TYPE_ITEM( HTFGame, "CoreGameType", "HTF", "Hold the Flag" ) \
11:14:06bobdaduckmath.random(10) - 6
11:14:07bobdaduckright?
11:14:10kaenhow has that not broken anything yet?
11:14:29bobdaduckrofl
11:14:30raptorthat looks beautiful!
11:15:24bobdaduckif I'm trying to get an x coord between -5 and 5
11:15:34raptormaybe it wasn't used properly?
11:16:01kaenin fact bitmatch and ctf are the only two that are correct
11:17:05bobdaduckor will math.random(10) - 6 lead to a higher negative number roll?
11:18:32raptorso that's 1 to 10 minus 6 ...
11:18:39raptorso -5 to 4 ?
11:18:53bobdaduckI'm trying to get -5 to 5
11:18:57bobdaduckmath.random 11?
11:19:02kaencorrect
11:19:59raptori thin it starts at 1
11:20:01bobdaduckoh marvelous
11:20:02raptor*think
11:20:03raptorbut
11:20:09raptorwe actually override math.random
11:20:27raptorso it's actually random
11:20:32raptorish
11:21:24bobdaduckI feel like levelgen carnival should start slowing down sometime soon.
11:21:46bobdaduckbut it hasn't yet
11:21:58bobdaduck16 ontick functions
11:22:37bobdaduckAnd in DnD its like 5 ontick functions per player
11:22:52bobdaduckSo the threshold of "you're doing too many things each tick" is about... 25.
11:23:50raptorok dynamic_cast of void* is not allowed
11:23:51raptorstink
11:32:02raptormake sense though..
12:20:43bobdaduck Quit (Remote host closed the connection)
13:28:44bobdaduck has joined
13:47:20LordDVG has joined
13:54:56kaenwow. this is the latest announcement from my vps host: http://pastie.org/8060604
13:55:47bobdaduckokay?
13:56:08raptoroh lovely
13:56:34kaenso they got hacked, lost all of our data, had a bad backup/restore system, were unable to perform restores for everbody, and said "screw it, you get a 'fresh' VPS"
13:56:35raptoris it back that when I saw the word 'Chicago', I thought "that figures.."
13:56:44raptor*bad
13:56:52bobdaducklol
13:56:55kaeni.e. with none of my data (and work building the cross compiler toolchains)
13:57:02raptorNOOOooooo
13:57:06kaenyeah.
13:57:21bobdaduckIt says you can open a ticket and they can restore?
13:57:42raptoryeah, open a ticket and slip a little under the table *wink*wink*
13:58:00kaenit's worth a shot
13:58:18raptorwell with 'Chicago' in the name, I think that's what they're expecting...
13:58:27kaenlol :)
13:58:29raptorI'm not prejudiced or anything..
13:58:40raptorok, I am, and should shut up..
13:58:51bobdaducklol
13:58:59kaenyep
13:59:03kaenstill can't access the control panel
13:59:21kaentop comment on the blog post I pastied:
13:59:26kaen"You get what you pay for"
13:59:36bobdaduckrofl
13:59:57kaenyeah... so I don't even have a "fresh" vps available yet
14:00:12kaenI have a large greyed-out control panel button
14:00:37kaenand I'm missing a static IP address...
14:00:40kaenI used to have two
14:01:48LordDVG Quit (Remote host closed the connection)
14:08:57bobdaduckAre dungeons still a thing?
14:09:01bobdaduckI'm making another dungeon
14:15:37kaenI fixed gametype display on pleiades
14:15:46kaenand added a drop-down for the search page
14:16:05raptorOK I need to display an error message in the editor...
14:16:07kaenbut you have to edit/update your levels for the gametype to change
14:16:08raptorsomehow
14:16:20raptoroooo drop-down
14:16:27kaenI used displaySaveMessage("...", false)
14:16:36raptorthanks!
14:16:36kaenfor level uploading errors
14:19:48raptorWe don't have a framework for really preventing duplicate IDs
14:20:42raptorand I don't feel like writing one...
14:20:49kaenhow about just preventing inputting a duplicate ID into the editor menu?
14:21:01raptor!
14:21:04Watusimoto_ has joined
14:21:07raptorthat's such a simple and great idea
14:27:28raptorthank you for saving my sanity
14:28:41kaenjust returning the favor :)
14:35:56Watusimoto_hi
14:36:05raptorhello
14:36:28raptorI've only spend the better part of two days on this... I hope to get it done soon..
14:41:20Watusimoto_raptor: do you want/need my help on anything at the moment?
14:42:12BFLogBot Commit: b7ffa7467ea7 | Author: watusimoto | Message: Try a star goal zone icon
14:42:13BFLogBot Commit: c83ac67ce02d | Author: watusimoto | Message: Bursts explode on contact with turrets, ffps, and all ships except that of the shooter
14:42:15BFLogBot Commit: 7ad829748a00 | Author: watusimoto | Message: Merge
14:43:04raptorI think I'm OK now... with enough casting and callbacks, I've finally gotten to the point that we have similar functionality as before
14:46:00raptorshould a private member be: mHasError OR mError ?
14:51:40Watusimoto_I like mHasError
14:52:09raptoroh my goodness it works!
14:52:13raptorI think I can even check-in!
15:04:31raptorhere she comes!
15:05:37BFLogBot Commit: fe16291762dd | Author: buckyballreaction | Message: Convert our old Editor 'EntryMode' to use a real UI. Also, for ID input, prevent saving a duplicate ID. What do you think of my implementation?
15:07:13bobdaduckoh man
15:07:15bobdaduckthere she is
15:07:50raptorI'm closing down UIEditor.cpp! may I never see you again for at least a week!
15:08:05bobdaducklol
15:08:52raptorlet's test this burst-on-impact stuff...
15:11:10raptorworks well!
15:11:56bobdaduckhuh?
15:11:58raptorWatusimoto_: is burst-on-impact stuff client-side predicted? (and if not, can it be?)
15:12:09raptorbursts explode on direct impact with a ship now
15:12:15raptorand turreds/ffps
15:12:23raptor*turrets
15:13:05bobdaduck...huh.
15:13:12Watusimoto_no and maybe
15:13:36Watusimoto_but usually we only client-side predict stuff that is reversible... unlike a burst explosion
15:13:43raptori seem to remember that bursts/mines/seekers were a little weird client-side..
15:13:49raptoryes that..
15:13:51raptorok
15:33:47Watusimoto_ok, so I implemented the bursts because kaen suggested it in a forum thread, and people seemed to agree
15:33:54Watusimoto_if it doesn't work, it's trivial to remove
15:35:55kaenyou still on raptor? I'm building right now to test
15:36:28raptorhi
15:36:43raptorWatusimoto_: i like the burst thingy
15:36:51Watusimoto_good
15:37:02Watusimoto_we can see how it works with a little lag
15:37:05Watusimoto_it should be ok
15:37:40Watusimoto_one thing we might be able to do is make it not bounce when it hits a target client-side (but not explode either) that might address some (supposed, not demonstrated) wonkiness
15:37:52kaenAssert: Expected userdata! in /home/charon/code/bitfighter/zap/LuaWrapper.h line 324
15:38:07raptoroh... yeah.. umm... LuaW...
15:38:22raptorso bots are sort of broken unless it's just you and a bot
15:38:44kaenkicked the bots
15:39:52bobdaduckA lot of things are sort of broken...
15:45:13Watusimoto_want to work on luaw?
15:45:21raptorsure!
15:46:03raptorok, results of playtesting with kaen
15:46:15Watusimoto_alright, what do I need to do to get to a good starting point? No hurry, take your time
15:46:16raptorthe burst needs some client-side prediction somehow..
15:46:29raptorWatusimoto_: looking..
15:46:43Watusimoto_I was afraid of that
15:47:14kaenare other bullet collisions CSP'd?
15:47:38raptori could actually never tell with bullets...
15:47:45kaenI think the "reversible" criteria is a pretty good one
15:47:50raptori think so, but since the explosion isn't so large..
15:49:10raptorWatusimoto_: let's start in LuaW_push
15:49:43Watusimoto_I think bullets are not csp'ed
15:50:03Watusimoto_ok, what version should I use? the latest, or some forlk?
15:50:19raptorlatest please
15:50:45Watusimoto_ok
15:51:11raptorfirst, let me get you a diff between us and upstream
15:52:29raptorWatusimoto_: http://sam6.25u.com/upload/luaW_zap-upstream_difference.diff
15:52:40raptorok so
15:52:44raptorbasically what happens is
15:53:00Watusimoto_ok, so the version we are looking at is the old working, leaky version
15:53:06raptorno
15:53:26raptorI updated our LuaW to have everything in upstream plus our proxies
15:53:37raptorthat is what is in the repo now
15:53:55raptorso in _push, if it finds that the BfObject has a proxy, it looks for it in the LuaW cache
15:54:01raptorif it finds it in the cache, it uses it
15:54:30Watusimoto_ok... does our current work or crash?
15:54:35raptorthat works... but only if there is one script running (one of either a robot or levelgen). I did almost all of my testing with robots
15:54:37Watusimoto_just so I'm oriented
15:54:45Watusimoto_two scripts crash
15:54:49raptorit 'works' and throws an assert
15:54:55raptorno, they don't crash
15:55:02Watusimoto_ok, and this problem is because of the changes you made
15:55:03raptorunless you consider the assert the crash
15:55:28raptoryes - so consider this problem completely new, like we're starting from a clean slate
15:55:30Watusimoto_and the changes were merging with upstream, except for what's in the diff
15:55:33Watusimoto_ok
15:55:35Watusimoto_fine
15:55:47raptoryes
15:56:05Watusimoto_so push looks in the cache if a proxy exists
15:56:22Watusimoto_because the only way a proxy could exist is if it were creaetd and put in the cache, if I recall correctly
15:56:38raptoryes
15:56:41Watusimoto_ok
15:57:22raptorso basically our state is we've added our proxies to upstream LuaW
15:57:30raptorthat's it
15:57:38raptorI reverted any other hacks along the way
15:57:48raptorok
15:57:49raptorso
15:57:53raptorwhat happens
15:58:15raptorif another script runs, the cache loses its objects
15:58:42raptorso if i add a second s_bot, _push will find the proxy of the first s_bot but not the cache item
15:59:12raptorthis returns nil: LuaWrapper<T>::identifier(L, obj)
15:59:14Watusimoto_I'm confused
15:59:21Watusimoto_bot 1 runs
15:59:25raptorthe one right under if(proxy)
15:59:30raptoryes bot 1 runs
15:59:33raptorgood cache
15:59:40Watusimoto_it hits luaw, no proxy, luaw creates proxy and caches userdata
15:59:44raptoryes
15:59:45Watusimoto_bot 2 runs
15:59:51Watusimoto_it has no proxy
15:59:59raptorso far so good
16:00:07Watusimoto_luaw detects this creates a proxy, and caches the second userdata
16:00:11raptorcorrect
16:00:14raptorhowever
16:00:21Watusimoto_hold on
16:00:34Watusimoto_so we have 2 user datas cached using the addresses of our 2 proxies
16:00:34raptorby the time it caches the second userdata, the cache for the first has disappeared, but *not* its proxy object
16:00:36Watusimoto_ok
16:00:47Watusimoto_why did the cache disappear
16:00:50raptorexactly!
16:00:54raptori spent hours and hours
16:00:58Watusimoto_it shouldn't be removed until the proxy object is removed
16:01:03raptorcorrect!
16:01:06Watusimoto_ok
16:01:13Watusimoto_so is the first bot still alive and well?
16:01:16raptorprintfs everywhere, dozens of recompiles
16:01:23raptoryes, the first bot is still alive and well
16:01:32raptorif I were to remove the asserts in _push
16:01:35Watusimoto_but its cache has magically disappeared
16:01:39raptorcorrect
16:01:51Watusimoto_and the reason we need the cache is to maintain consistent userdatas
16:02:03Watusimoto_(not the key issue here, but trying to rmember how this all works)
16:02:07raptoryes
16:02:10Watusimoto_ok
16:02:11raptoralso to save processing
16:02:14Watusimoto_yes
16:02:17raptorand memory
16:02:24Watusimoto_though the first is the most important, I think
16:02:28Watusimoto_but nonethelss
16:02:45raptorso the side effect of removing the asserts...
16:02:50Watusimoto_and all this happens with the code in the repo
16:02:55Watusimoto_that we're looking at
16:02:58raptoris that our logic returns the userdata of the second bot for the first
16:03:05raptorand basically all bots run in harmony
16:03:17raptorbut that's not the real issue - just a side effect so you know
16:03:28Watusimoto_which assert trips?
16:03:31raptoryes, with the code in the repo
16:03:34Watusimoto_line 324 or 325?
16:03:42raptorboth
16:03:46raptorif you continue
16:04:02Watusimoto_311 proves our proxy exists
16:04:03raptorline 314 actually puts 'nil' on the stack instead of the ID
16:04:43Watusimoto_so that's the real problem... the asserts follow on from that?
16:04:51raptorcorrect
16:05:04Watusimoto_so the question is why does 314 push nil
16:05:04raptori've printed out the entirety of the cache at a dozen different points
16:05:29raptoras soon as the second bot is added, the cache is already empty in _push
16:05:47raptor314 is nil because the cache is empty
16:06:02raptorthere's no longer an userdata there
16:06:11Watusimoto_so the identifier comes from luaW_defaultidentifier(lua_State* L, T* obj)?
16:06:26Watusimoto_(because we use the default identifier function, and don't override)
16:06:31raptoryes, and that is basically the userdata pointer as the id
16:07:00Watusimoto_lua_pushlightuserdata(L, obj); ==> pushes address of obj
16:07:28Watusimoto_i.e. address of the proxy object
16:07:44raptoryes, the address, that's right
16:07:51Watusimoto_so, to b e clear, this pushes nil?
16:07:52Watusimoto_LuaWrapper<T>::identifier(L, obj);
16:07:55raptoryes
16:08:03Watusimoto_then what is the address of obj?
16:08:03raptorbut only after the second bot is added
16:08:17raptorif there's only one bot, it finds it in the cache OK
16:08:37raptorobj is a BfObject*
16:08:52Watusimoto_because that's only pushing the address of obj, and obj is not null, so it has an address... so where does the nil come from?
16:09:21raptorit is nil because ::identifier is looking up the userdata by address in cache table. since it can't find it, it pushes nil
16:09:32Watusimoto_no that's not what it's doing on 314
16:09:38raptoroh wait
16:09:41Watusimoto_314 is only pushing the address
16:10:08Watusimoto_I think the bug is lower down, where the lookup actually happens
16:10:15raptorwait! you're right
16:10:20Watusimoto_319
16:10:21raptori was mistaking, it is pushing the address
16:10:28raptor319 returns nil
16:10:30raptordug
16:10:31raptorduh
16:10:33raptorsorry :/
16:10:35Watusimoto_ok, so the address that's being pushed is correct
16:10:40Watusimoto_but the lookup is going wrong
16:10:53raptoryes
16:11:03Watusimoto_one thing to check is if the address is somehow changing
16:11:09Watusimoto_maybe you've done that
16:11:21Watusimoto_but a printf("%p", obj) would show that
16:11:39raptorit's not changing
16:11:42raptorof that I am sure
16:11:43Watusimoto_it's almost certainly not, but if it were, it would explain the problem
16:11:44Watusimoto_ok
16:11:55raptorthe proxy was constant
16:12:03raptoreven after commenting out the asserts and having two bots
16:12:11raptorit would alternate between the same two proxy addresses
16:12:20Watusimoto_so the table is coming from here:
16:12:20Watusimoto_luaW_wrapperfield<T>(L, LUAW_CACHE_KEY);
16:12:23raptoryes
16:12:43Watusimoto_but you are sure that adding the 2nd bot doesn't somehow change the addr of the first one
16:12:45bobdaduck Quit (Read error: Connection reset by peer)
16:13:09Watusimoto_from what you said, it's not the presence of the second bot, but the addition of the 2nd bot that seems to be the problem
16:13:14raptorI saw the addresses of both proxy objects and userdatas, they alternated back and forth
16:13:25raptorwell
16:13:30raptorboth
16:13:37Watusimoto_ok, this is probably not the issue anyway
16:13:55raptorwith two bots, the cache is cleared at the start of each _push again, on every call
16:14:01Watusimoto_so the table comes from luaW_wrapperfield
16:14:13raptorI printed out the full cache table at 4 or 5 different spots in _push to verify that
16:14:33Watusimoto_which in turn just looks up a table in the registry
16:14:38raptoryes
16:14:44Watusimoto_using the key LUAW_CACHE_KEY
16:15:07raptoryes
16:15:08Watusimoto_could luaW_initialize be being run twice?
16:15:31Watusimoto_the second pass could (possibly) wipe the table from the first
16:15:35raptorI wondered that - I don't remember my findings...
16:15:44kaenthat's what it sounds like to me
16:15:48Watusimoto_how can I test?
16:15:54Watusimoto_start game and add two bots?
16:16:01raptoryes
16:16:04Watusimoto_I'll stick a break point in there and see how many times it gets hit
16:16:05raptoradd one bot
16:16:08raptorthen add another bot
16:16:21raptorkaen: you following along?
16:16:23raptor:)
16:16:26kaenindeed :)
16:16:31kaenalways watching...
16:16:56Watusimoto_611 was only hit once, during game startup
16:17:12raptorI was tired in the NICU for a couple days working on this so I could easily be missing something simple..
16:17:29Watusimoto_I'm seriously hoping you did
16:18:50Watusimoto_608 gets hit a bunch
16:19:11raptorwhat about 611
16:19:22Watusimoto_only once, during startup
16:19:27raptorwell great!
16:19:41Watusimoto_and 608 without 611 is harmless
16:19:57raptorand not so great, because that means the bug is elsewhere..
16:20:11Watusimoto_exaclty
16:21:09Watusimoto_ok, so you've dumped out the table pointed to by LUAW_CACHE_KEY
16:21:32Watusimoto_and you see that the first bot's cached userdata is wiped when we add the 2nd bot
16:21:47raptoryes
16:22:06raptorand it is empty again when _push is called on the first bot
16:22:11raptorempty again on the 2nd, etc..
16:25:30Watusimoto_so
16:26:17raptorso buttons!
16:27:28Watusimoto_testing some stuff here
16:30:18Watusimoto_building takes forever with this stuff
16:30:25raptoryes :(
16:37:39Watusimoto_ok
16:37:44Watusimoto_still crashes :-)
16:39:30BFLogBot Commit: 8056bb218081 | Author: watusimoto | Message: Add a tiny bit more logging... not terribly useful
16:39:32BFLogBot Commit: 6b859acab682 | Author: watusimoto | Message: Merge
16:39:53Watusimoto_well, here's a question
16:40:11Watusimoto_what if we created a different cache table, or two cache tables, or...
16:40:36Watusimoto_like I wonder if there's something about the table itself that is the problem
16:40:46raptorI think it would be hard to make work without an indefinite number of cache tables
16:40:51raptoryes
16:41:05raptorso, i saw a note about it being a weak table
16:41:14Watusimoto_I don't think it is
16:41:32raptorwell... rats... because i did research on weak tables
16:41:40raptorand thought that it was garbage collected
16:41:42Watusimoto_we have this
16:41:43Watusimoto_ // Create a cache table, with weak values so that the userdata will not
16:41:43Watusimoto_ // be ref counted
16:41:43Watusimoto_ lua_newtable(L); // ... nil LuaWrapper {}
16:41:43Watusimoto_ lua_setfield(L, -2, LUAW_CACHE_KEY); // ... nil LuaWrapper
16:41:58kaen lua_pushstring(L, "v"); // ... nil LuaWrapper {} "v"
16:41:59Watusimoto_but where is the table made weak?
16:42:04kaen629
16:42:10raptorthe 'v'
16:42:12kaenthat sets the metatable mode to weak
16:42:19kaenaccording to http://lua-users.org/wiki/WeakTablesTutorial
16:42:23raptoroh but that's the main LuaW table, right?
16:42:28raptornot our cache table
16:42:29kaenthat's for CACHE_METATABLE
16:42:36Watusimoto_ah
16:42:38raptorah
16:42:40Watusimoto_maybe that's the problem
16:42:42kaenso the metatable of the cache
16:42:54raptorso i put printfs in luaW_gc
16:43:07Watusimoto_maybe the whole table has been collected
16:43:16raptorand it is only getting run twice (one for each bot) when I exit the level
16:43:18Watusimoto_what's actually being made weak here
16:43:36Watusimoto_lua_newtable(L); // ... nil LuaWrapper {}
16:43:36Watusimoto_ lua_setfield(L, -2, LUAW_CACHE_KEY); // ... nil LuaWrapper
16:43:40Watusimoto_this creates the cache table
16:43:45Watusimoto_not weak (yet)
16:44:01Watusimoto_then we create another table
16:44:01Watusimoto_lua_newtable(L); // ... nil LuaWrapper {}
16:44:14Watusimoto_that new table is made weak
16:44:15Watusimoto_lua_pushstring(L, "v"); // ... nil LuaWrapper {} "v"
16:44:15Watusimoto_ lua_setfield(L, -2, "__mode"); // ... nil LuaWrapper {}
16:44:29Watusimoto_(cache table still strong, i think)
16:44:43raptoryeah, still strong
16:44:59Watusimoto_the weak table is stored with key LUAW_CACHE_METATABLE_KEY
16:45:20raptorbut what does the LUAW_CACHE_METATABLE_KEY actually do?
16:45:22kaenwait
16:45:31kaenthat metatable is for the cache
16:45:48kaensetting __mode to "v" on the *metatable* makes the *table* weak
16:45:59Watusimoto_but it's not yet a metatable
16:46:06Watusimoto_it's still a table at this point
16:46:20Watusimoto_in luaW_setfuncs it becomes a metatable, I think
16:46:27Watusimoto_but why here?
16:46:34Watusimoto_and could this be the problem?
16:46:35kaenbecause this is the stock metatable
16:46:47Watusimoto_yes
16:46:47kaenand it gets assigned to each new userdata that's created I believe
16:46:52Watusimoto_but we have only one cache table
16:46:57Watusimoto_and it needs only one metatable
16:47:02Watusimoto_and that only needs to be set once
16:47:08Watusimoto_so why not set it where all this is created?
16:47:12kaenthere is only one metatable
16:47:13Watusimoto_why set it in luaW_setfuncs?
16:47:25Watusimoto_there is one metatable and one cache table
16:47:26kaenbut each new userdata in lua needs to have its metatable set
16:47:36kaento refer to the one metatable for its class
16:47:48kaenso this one global weak meta table is created only once
16:47:51kaenhere in initialize
16:47:55Watusimoto_yes
16:47:58kaenand then assigned to each new ud
16:48:01kaenso this looks correct.
16:48:16Watusimoto_ahm I see
16:48:17Watusimoto_ok
16:48:20Watusimoto_yes, it might well be
16:48:37Watusimoto_but still, I'm going to check
16:49:02Watusimoto_luaW_setfuncs should only be run once for each class, not each object
16:49:09Watusimoto_of it's run once per object, we have a problem
16:51:22raptorI've wondered if there was some sort of conflict between class types and objects
16:51:33raptorlike it detects another Robot class and wipes the cache
16:54:14Watusimoto_raptor, did you create an stof function?
16:54:18Watusimoto_or was that preexisting?
16:54:54Watusimoto_i.e. in your last checkin
16:54:54raptori don't remember, one of the two..
16:55:01raptornot in my last checkin no
16:55:09raptori didn't touch stringutils...
16:55:12raptori think
16:55:16Watusimoto_because it's no longer compiling
16:55:19Watusimoto_no you didn't
16:56:10Watusimoto_weird
16:57:03raptorin the wrong namespace?
16:57:08raptoror using the wrong one..
16:57:11raptorbrb
16:57:33raptor Quit ()
16:59:41raptor has joined
16:59:45ChanServ sets mode +o raptor
17:00:35Watusimoto_ok, I'm going to bed
17:00:43raptorok
17:00:45Watusimoto_but before I do, I'm going to tell you what the problem is
17:00:49raptorwhat
17:00:54Watusimoto_:-)
17:01:13Watusimoto_Look at the block beginning with lua_getfield(L, -1, LUAW_CACHE_KEY);
17:01:45Watusimoto_this is what creates the cache table for a particular class
17:02:08raptori see two of those..
17:02:16Watusimoto_this table should be created once
17:02:18Watusimoto_c. 706
17:02:30Watusimoto_(my numbers are now slightly different)
17:02:55raptorok
17:02:57raptori'm there
17:03:06Watusimoto_so do you agree this should only run once?
17:03:12Watusimoto_(for a particular class)
17:03:27Watusimoto_create the cache table for, say robots, then never again do that for robots
17:03:33raptorlet's see... that's in setFuncs
17:03:40raptoryes ok
17:03:44Watusimoto_you agree?
17:04:03Watusimoto_well, it does get run once, when you start up
17:04:06raptoragree (after reading the comments again)
17:04:08Watusimoto_as it should
17:04:21Watusimoto_but when I add two bots, it gets run twice more
17:04:31Watusimoto_for all classes
17:04:40raptorthat's not good
17:04:49Watusimoto_the thrid time 9for the 2nd bot) will likely wipe out the cache table
17:04:58Watusimoto_and cause all the mayhem you've observed
17:05:21Watusimoto_it's getting called from prepareEnvironment()
17:05:29raptorthat's only called from _register
17:05:34Watusimoto_from runScript()
17:05:41raptorit's our code!
17:05:48Watusimoto_yes
17:06:02raptoroh interesting... so for each of our script environments...
17:06:44raptorwait... isn't that what we want though? does that mean we're using a static cache table when it shouldn't be?
17:06:49Watusimoto_so I suspect that if we fix this so it only runs once, the problem will go away
17:07:08raptorok, well that's just on set-up
17:07:11Watusimoto_if it runs once for each bot, the 2nd bot will wipe out the first cache
17:07:21raptorso no, we want just one...
17:07:27raptorok
17:07:30raptorgood find
17:07:40Watusimoto_i'm 90% confident
17:07:59raptorbetter than gov't work!
17:08:15Watusimoto_not better than the nsa
17:10:26kaenso that comment says once per script type...
17:10:35kaendoes it really mean once per L?
17:11:02raptorha
17:11:06Watusimoto_where does it say that?
17:11:12kaen registerClasses(); // Register classes -- needs to be differentiated by script type
17:11:13raptorthe NSA knows you said that..
17:11:18kaen514 LuaScriptRunner
17:12:28Watusimoto_so, if I recall, that comment is correct
17:12:52Watusimoto_though
17:13:01Watusimoto_void LuaScriptRunner::registerClasses()
17:13:01Watusimoto_{
17:13:01Watusimoto_ LuaW_Registrar::registerClasses(L); // Register all objects that use our automatic registration scheme
17:13:01Watusimoto_}
17:13:20Watusimoto_that does not depend on script type, so maybe the comment is wrong
17:13:34Watusimoto_that should happen only once per L
17:14:01Watusimoto_as should, I think, registerLooseFunctions
17:14:17raptorcorrect on the loosey functions
17:14:23Watusimoto_in fact, I think all of prepareEnvironment should only be run once per L
17:14:26Watusimoto_i.e. once.
17:14:46Watusimoto_at least up to here:
17:14:47Watusimoto_luaL_dostring(L, "e = table.copy(_G)");
17:15:04raptorlike my sandbox? :)
17:15:13Watusimoto_the part from that line down probably does need to run once perscript
17:15:15Watusimoto_yes
17:15:20Watusimoto_like your sandbox
17:16:58kaenbuilding...
17:17:10Watusimoto_probably all that junk should go here:
17:17:11Watusimoto_configureNewLuaInstance
17:17:24Watusimoto_is that what you did, kaen?
17:17:30Watusimoto_or should I try that here?
17:17:39kaenyes, had to make them static too
17:20:26kaenand then rebuild 80% of the codebase...
17:21:41kaenplaying with two bots works fine
17:21:46kaenis that success?
17:21:54Watusimoto_it is
17:22:00kaen12 bots
17:22:24Watusimoto_why static?
17:22:59kaenbecause configurenewluainstance is static
17:23:26kaenthose should be static anyway because they don't depend on any object state :P
17:23:57kaenhttp://pastie.org/8061231
17:24:04kaenI added those lines to the end of configurenewluainstance
17:24:14kaenand removed them from prepareenvironment
17:24:58kaen30 bots
17:25:06BFLogBot Commit: 8933c3a1fa02 | Author: watusimoto | Message: Fix compiling trivial cleanup
17:26:30raptorso does that mean success?
17:26:36Watusimoto_sounds good! and bots work!
17:26:39kaenI think so
17:26:41kaencan I push?
17:26:44raptorsure!
17:26:49Watusimoto_so where does that leave us?
17:26:54Watusimoto_(yes)
17:26:54raptormemory testing..
17:27:00raptori'll do some of that..
17:27:09raptori know just the level...
17:27:12Watusimoto_does that mean that the luaw stuff is now upgraded?
17:27:18Watusimoto_or is there still more to do?
17:27:28raptordefine 'upgraded'
17:27:35raptorit is equal with upstream
17:27:35Watusimoto_finished for the moment
17:27:39raptor(plus our proxies)
17:27:47Watusimoto_so, leak is fixed
17:27:50raptorcould be..
17:27:51Watusimoto_(theoretcially)
17:27:55raptori will do memory testing
17:28:00Watusimoto_and inconsistent userdata issue is fixed
17:28:05Watusimoto_(probably)
17:28:10raptorwell... luaW_hold is being called
17:28:17raptorbefore we commented it out...
17:28:29Watusimoto_oh, right, that was the source of our leak, no?
17:28:32raptorcorrect
17:28:42raptorbecause without it, it would do the inconsistent userdata thingy
17:28:43Watusimoto_wait, we want it commented out? no
17:28:53Watusimoto_so being called is good
17:28:57raptoryes
17:29:09Watusimoto_ok, good, so the script in our running bugs page should now work
17:29:12raptoralso, that test level of sam686's works without crashing (the test for the inconsistent userdata)
17:29:16Watusimoto_theoretically of course
17:29:17raptoryes that one
17:29:21raptori will test that again, too
17:29:21BFLogBot Commit: d8fd5cefa350 | Author: kaen | Message: move once-per-L setup to configureNewLuaInstance
17:29:26Watusimoto_awesome
17:29:31Watusimoto_good team work!!!
17:29:35kaengood job guys
17:29:38raptoryay!
17:29:49Watusimoto_I really like breakpoints
17:29:56raptorhaha
17:30:02kaenI <3 gdb so much
17:30:21kaensometimes I'll just be walking around doing something completely unrelated to programming
17:30:33kaenand I'll just think to myself, "man, I'm glad I have gdb"
17:30:57raptorwait, registerClasses was virtual...
17:31:12kaenit was never reimplemented
17:31:14kaenI checked :)
17:31:18raptorok phoew
17:32:00raptorRobot::registerClasses()
17:32:14kaen._.
17:32:24raptorLuaLevelGenerator::registerClasses()
17:32:47kaenrobot is a passthrough
17:33:01kaento LuaScriptRunner::registerClasses
17:33:03kaensomehow
17:33:08kaenI don't quite understand that
17:33:20kaenoh!
17:33:21kaenhaha
17:33:33raptora useless override?
17:33:36kaenyep
17:33:49kaencalls the same method on its parent and does nothing else
17:33:53raptorha
17:33:58raptornuke it
17:34:34kaenkind of weird that eclipse didn't find those overrides
17:35:14raptorthat's because RObot isn't a subclass of LuaScriptRunner
17:35:24raptoroh wait, yes it is
17:35:28raptoroddness
17:36:17fordcars has joined
17:36:50kaensounds like pebkac :P
17:37:15raptorhad to look that up...
17:37:20raptorthat's an acronym now?
17:37:22raptorhaha
17:40:36kaenso...
17:40:59kaennow userdata should be equal in between callback invocations?
17:41:20raptoryes, hopefully
17:41:27kaenbetter check...
17:41:44BFLogBot Commit: 6e6aced18e6e | Author: kaen | Message: remove dead registerClasses overrides
17:41:52raptoroh, when you remove the useless overrides, can you fix the comments next to registerClasses
17:41:56raptorerr
17:42:03raptortoo quick
17:42:05raptorfor me
17:43:57kaenah
17:47:34raptornow for the memory test (DnD)
17:50:27raptorhee hee: http://sam6.25u.com/upload3.php
17:50:30raptoroops
17:50:33raptorhttp://sam6.25u.com/upload/3screenshot_26.png
17:50:51raptorstar-studded sword!
17:50:56BFLogBot Commit: 503762541b1f | Author: kaen | Message: fix comment by registerClasses() call
17:51:28raptor2min. of DnD commences...
17:51:32Watusimoto_ Quit (Ping timeout: 240 seconds)
17:51:33raptor(with 10 bots)
17:51:41raptorlast time it rose RAM to 160MB
17:54:35raptorok, after 2.5 min.
17:54:39raptorholding stead at 77MB
17:54:41raptor*steady
17:55:17kaenwow
17:55:29raptorand actually - i think my last test was with 5 bots...
17:55:33kaendare we say...
17:55:35kaenwe fixed it?
17:55:46kaenall the tests run, the performance is in line...
17:55:59raptori think there may a couple of leaks on our side left..
17:56:09raptorI just kicked bots, then added 5 more
17:56:13raptorRAM is rising again..
17:57:02raptorloot bags with stars are cool, too
17:57:27raptori'll run this test with 5 bots for 10 min..
18:01:21kaenstars look so awesome...
18:01:56kaenmaybe they could only have one outline though
18:02:48kaenlooks so cool on that level with the roundabout I'm working on
18:05:10raptorok, so after 10 min with 5 bots RAM is at 230MB
18:05:17raptor8 min
18:05:19raptor:(
18:05:40kaen:x
18:06:06kaenand it gets cleared when the next level starts?
18:23:44raptor450MB
18:23:50raptor(sorry went to dinner)
18:23:54raptorok restarting level...
18:24:53raptorstill 453...
18:25:02raptorok, exiting to main menu..
18:26:19raptorstill at 455... maybe i need to give it more time?
18:27:14kaensounds like valgrind could help us out
18:28:14raptoronwards to valgrind!
18:30:24raptorthis is going to be resource intensive...
18:38:11raptori have heated up the house with that test..
18:40:14raptorok, well there is one big leak: http://pastie.org/8061394
18:42:18raptorthat's a known leak I think
18:42:21kaenin getCurrLoadout
18:42:25kaeninteresting.
18:42:27raptoryes - that's known
18:42:45raptorbut I don't think it has any bearing on our big leak..
18:42:55raptormaybe i need a heap dump..
18:49:19raptorok, now how to read massif data
18:50:00kaentry opening it in vim!
18:50:05kaen:)
18:50:06raptorreally?
18:50:13kaenuh if you know how to use it a little
18:50:21kaenmy vim comes with cool highlighting for valgrind dumps
18:50:45kaenhjkl to scroll
18:51:03kaenand :q<Enter> to quit
18:51:27raptori know the vim basics... didn't know about the scroll
18:51:33kaenheh
18:55:49raptorgraphics!: http://sam6.25u.com/upload/2snapshot12.png
18:56:15raptorhere's the file: http://sam6.25u.com/upload/massif.out.4771
18:56:20kaenl_alloc
18:57:47kaenthat is beautiful, btw
18:58:53raptor:)
18:59:57kaenstill one in luaw_push it seems
19:00:34raptorthat's the loadout one
19:01:43kaenthat's also the only mention on l_alloc in that dump
19:01:49raptorhuh
19:01:51raptoryou're right...
19:02:05raptormaybe that's really the big issue with bots now..
19:02:23kaenit would make sense
19:02:31kaenthink how often bob is pushing loadouts...
19:02:39raptoroh yeah!
19:02:43raptorthat's make total sense
19:04:15raptorha, look at the comment in Ship::lua_getReqLoadout
19:10:41kaenhehehe
19:11:36kaenthat made my day.
19:11:39raptorhaha
19:11:56raptori don't think luaW_hold is doing what it was thought it did..
19:13:02raptorwhat if we just used scoped_ptr and removed the _hold ?
19:13:10raptoror even... do we need 'new' there at all??
19:30:35raptori'm not even sure what to do here...
19:46:33fordcars Quit (Ping timeout: 250 seconds)
20:02:33fordcars has joined
20:04:28raptori feel like the only way to do this is to cache every loadout combination...
20:04:48raptorluaW_gc is never being called...
20:06:09kaenwait, does there really need to be a hold there?
20:06:32kaenwhen you push it you either reference it immediately or store it in a real reference.
20:07:00raptorlooking.. . _push has _hold in it..
20:07:45raptorso no, hold is not needed there anymore - i wonder if this comes from using a much older LuaWrapper
20:13:10raptorbut i imagine there is still a leak? let me get another heap dump..
20:14:25raptor(without the _hold)
20:14:58raptorunrelated note: is there some rogue printf statement printing out lots of empty lines at the start of bitfighter?
20:22:27raptorwithout the _hold, still a big leak with the LuaLoadout
20:41:51Nothing_Much Quit (Quit: l8r)
20:55:54raptorI think the issue is that luaW_gc is not being called on anything but the proxies (and even then not until level end)
21:09:23raptorconverting to a shared_ptr self-deletes immediately and loadouts don't work..
21:13:14kaenraptor, check out this rating display: http://bitfighter.org/pleiades/levels/view/24
21:13:17kaenoh wait
21:13:28kaenhttp://bitfighter.org/pleiades/levels/view/16
21:13:54raptorthe big '0' ?
21:14:08kaeneh
21:14:16kaenyou have to be logged in
21:14:27raptorha!
21:14:28kaenand viewing a map that isn't yours
21:14:29raptori love it
21:14:56raptorgreen and red, too!
21:52:19bobdaduck has joined
21:52:23bobdaduckbad server up
21:52:39raptorbobdaduck: we found the source of the memory leak
21:52:45bobdaduckshiny!
21:53:51raptoryou need to reduce your calles to getCurrLoadout
21:53:55raptorcalls
21:54:01raptormake sure that it isn't in onTick...
21:59:48bobdaduckwhy getcurrloadout?
22:00:01raptorbecause there's an honest-to-goodness memory leak in c++
22:00:05bobdaduckxD
22:00:20raptorand it is only created when the lua API want the current (or requested) loadout
22:01:30bobdaduck..huh.
22:01:32raptorI'm going to merge LuaLoadout and LoadoutTracker... maybe that'll solve the memory leak
22:02:09raptorback in a bit..
22:02:15bobdaduckhow would I solve that
22:02:24bobdaducklike I need to call getCurrLoadout every tick xD
22:02:30raptorreally?
22:02:40bobdaduckNah I suppose not
22:02:51raptoryou'll have to somehow figure out how to not do it..
22:03:07raptorsorry, gotta go, back soon
22:03:32bobdaduckk
22:31:31raptorso i've been thinking
22:31:55raptorinstead of checking loadout in each onTick() only do it when a ship enters a loadout zone
22:32:36raptorstore the players current loadout somewhere and update it when it changes (also at the same time update their class)
22:47:19raptorbobdaduck: http://sam6.25u.com/upload/3screenshot_26.png
22:54:03bobdaduck Quit (Ping timeout: 248 seconds)
23:06:45Nothing_Much has joined
23:07:10Nothing_Much Quit (Changing host)
23:07:11Nothing_Much has joined
23:24:15raptorladies and gentlemen!
23:24:28raptorDnD has been playing for 4 min and RAM is at 24 MB
23:24:34raptor(with 5 bots)
23:35:52BFLogBot Commit: e3983fb101c9 | Author: buckyballreaction | Message: Get rid of a nasty, rotten, lying memory leak: the creation of a new LuaLoadout object was actually never being cleaned up, despite its assurances it was - Remove LuaLoadout class and merge it with LoadoutTracker
23:36:41raptorit's been 10 min with 10 bots on DnD
23:36:48raptorI lost 100 K in RAM...
23:36:57raptor\o/
23:47:32bobdaduck has joined
23:47:56raptorWOW
23:48:00raptormemory leak solved!
23:48:49raptorbobdaduck: i just ran an old version of DnD for 10 min with 10 bots - RAM was at 28 MB the entire time
23:52:01bobdaduckrofl
23:52:04bobdaduckwait um?
23:52:32raptoryes so 019 will not eat your RAM with DnD
23:52:53bobdaducklol
23:54:04bobdaduckyay
23:54:11bobdaduckI'm probably going to run the changes anyway though
23:54:27bobdaduckkeeping loadout calling to onShipEnteredZone will speed it up. Slightly. Supposedly.
23:54:53raptorit may speed it up significantly - it did for me
23:55:24bobdaduckYou tried the changes yourself?
23:55:39raptorno
23:55:56bobdaduckoh okay.
23:55:59bobdaduckjust trying it in 019?
23:56:20raptorbut my change in 019 was a direct result of getCurrLoadout - and I was able to load about 5x as many bots without it freaking out
23:56:42bobdaduckwow.
23:56:43raptorso that method only was slowing everything down
23:57:21bobdaduckdid you commit? can I try loading that now?
23:57:26raptorI did commit
23:57:38raptorso Lua is friendly again now
23:57:40bobdaduckdang
23:57:48raptor?
23:57:49bobdaduckI didn't know the extent of the memory leak
23:57:53bobdaduckBut with 15 bots
23:58:00bobdaduckthe memory usage
23:58:09bobdaduckwhich started at 100k ish
23:58:15bobdaduckis now at 750k
23:58:26raptoryou mean MB?
23:58:31raptor(not KB..)
23:58:47bobdaduckKB.
23:58:53bobdaduckFor whatever reason that's what it tracks it in
23:59:21bobdaducknow its at 1,000,000ish
23:59:24raptorok... KB is actually pretty small...
23:59:26raptorhahaha
23:59:37raptorthat's a large number

Index Search ←Prev date Next date→

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