#gemrb@irc.freenode.net logs for 21 Dec 2010 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage

[00:17:29] --- barra_home is now known as barraAway
[00:31:47] <-- edheldil_ has left IRC (Ping timeout: 240 seconds)
[03:06:35] --- barraAway is now known as barra_home
[04:13:43] <-- barra_home has left IRC (Quit: Verlassend)
[07:01:41] --> lynxlynxlynx has joined #GemRb
[07:01:41] --- ChanServ gives channel operator status to lynxlynxlynx
[08:05:03] --> Bo_Thomsen has joined #GemRb
[08:15:06] --> lubos has joined #GemRb
[08:28:40] <-- lupine_85 has left IRC (Changing host)
[08:28:40] --> lupine_85 has joined #GemRb
[09:30:43] <-- |Cable| has left IRC (Remote host closed the connection)
[09:45:42] * fuzzie shivers.
[09:46:06] <fuzzie> I guess -5C is nothing to some of you, but I am cold. :P
[09:47:56] <lynxlynxlynx> shake it
[09:48:05] <lynxlynxlynx> use entropy to your advantage
[10:39:04] <edheldil> I used to rest my feet on a UPS, produced comfortable heat :)
[10:39:49] <edheldil> but if you have -5C at home, you should perhaps close the windows ;-)
[10:41:02] <Lightkey> hehe
[10:43:53] <Lightkey> reminds me of a picture from icculus with his feet on two machines, he said one was an AMD64 box with an 1.6 GHz CPU when it was not released yet, AMD said he *had* to bring the box to the presentation where he showed UT2003 on Linux/amd64 because there was no other working AMD64 machine at the time! *jealous*
[10:57:47] <-- lupine_85 has left IRC (Quit: ZNC - http://znc.sourceforge.net)
[11:01:30] --> lupine_85 has joined #GemRb
[11:14:05] --> kivan117 has joined #GemRb
[11:35:34] <-- kivan117 has left #GemRb
[11:57:27] --> barra_home has joined #GemRb
[12:06:55] --> Avenger has joined #GemRb
[12:06:56] --- ChanServ gives channel operator status to Avenger
[12:07:02] <Avenger> hi
[12:18:12] <Avenger> hmm gotta make a lucky roll, with luck decreasing the rolls
[12:34:00] <-- Avenger has left IRC (Quit: ChatZilla 0.9.86 [Firefox 3.6.13/20101203075014])
[12:46:20] --- barra_home is now known as barraAway
[12:49:08] --> Avenger has joined #GemRb
[12:49:08] --- ChanServ gives channel operator status to Avenger
[12:50:32] <Avenger> eep, lynxlynxlynx, fuzzie: make[1]: *** No rule to make target `gemrb.6', needed by `all-am'. Stop.
[12:50:37] <Avenger> what to do? :)
[12:50:53] <fuzzie> don't use a broken make system ;p
[12:51:00] <fuzzie> but i guess lynx changed that, i have no clue
[12:51:03] <Avenger> i didn't break it :P
[12:51:38] <Avenger> he added some gemrb.6.in file
[12:51:41] <fuzzie> you can just copy gemrb.6.in to gemrb.6 for the lazy way
[12:51:56] <fuzzie> but i don't know if it'll work or install
[12:52:08] <Avenger> or just list gemrb.6.in in Makefile.in somewhere?
[12:52:46] <Avenger> assuming i can do the same with it as with gemrb.spec.in
[12:52:52] <fuzzie> i expect so :)
[12:53:08] <CIA-29> GemRB: 03avenger_teambg * r4efa426102c8 10gemrb/gemrb/core/ (3 files in 2 dirs): lucky roll flags are now in a bitfield
[12:53:10] <CIA-29> GemRB: 03avenger_teambg * r1207baf83f5a 10gemrb/gemrb/core/Interface.cpp: fixed intmod columns (read/store the maze dice columns too)
[12:53:33] <wjp> the list of things to process from x.in to x is in configure.ac IIRC
[12:54:03] <Avenger> you mean configure.in ?
[12:56:03] <wjp> yes. (We're that far out of date?)
[12:56:16] <Avenger> i am
[12:56:34] <Avenger> i am the only one still using automake, i guess
[12:56:48] <fuzzie> yes, so no-one is maintaining it
[12:57:09] <Avenger> so how can i use cmake?
[12:57:15] <fuzzie> i doubt the porters are all using cmake, though
[12:57:18] <Avenger> last time i tried, it didn't work
[12:57:55] <fuzzie> you do 'mkdir build' in your root gemrb dir, then 'cd build' and 'cmake ..'
[12:58:43] <Avenger> and then?
[12:59:14] <Avenger> cmake install?
[12:59:22] <fuzzie> then you just do 'make'
[12:59:45] <Avenger> ah ok
[13:00:29] <Avenger> i hope make install will still put it in the old place --> ~/GemRB
[13:00:36] <Avenger> not some /usr/local or such
[13:00:42] <fuzzie> well, you have to specify what you want
[13:00:56] <fuzzie> i think both build systems put it in /usr/local by default?
[13:00:57] <Avenger> when?
[13:01:26] <Avenger> huh, there is a color orgy on my display
[13:01:30] <fuzzie> oh, i see, autogen.sh does weird things
[13:01:37] <fuzzie> anyway i don't know how to make it go in ~/GemRB :P
[13:01:37] <Avenger> red, magenta, green
[13:01:51] <Avenger> pfft
[13:02:00] <fuzzie> i don't install
[13:02:06] <fuzzie> so i guess another question for lynxlynxlynx
[13:02:12] <Avenger> besides, it didn't even compile
[13:02:38] <Avenger> .../gemrb/gemrb/plugins/GUIScript/GUIScript.h:31:20: error: Python.h: No such file or directory
[13:02:43] <Avenger> pfft
[13:03:14] <fuzzie> you would think it would get that right :P
[13:03:42] <Avenger> this is a vanilla ubuntu lts stuff, unmodded
[13:03:53] <Avenger> dirt common linux system
[13:03:58] <Avenger> how it couldn't find python
[13:04:00] <fuzzie> and you didn't already have a build dir?
[13:04:33] <Avenger> what build dir? i just mkdir'd it now
[13:04:35] <fuzzie> it complains loudly at me if i don't have python, at the 'cmake ..' step
[13:04:37] <Avenger> it is still empty, though
[13:04:44] <Avenger> it didn't
[13:05:15] <Avenger> - Looking for Python libraries and headers: found
[13:05:21] <Avenger> pfft
[13:06:12] <Avenger> i got this as a complaint, only: If you want to build the SDL_mixer plugin, install SDL_mixer first.
[13:06:14] <fuzzie> also if your build directory is empty, you probably forgot the 'cd build', and it has overwritten your automake makefiles :P
[13:06:19] <Avenger> but i don't want sdlaudio
[13:06:42] <lynxlynxlynx> to install under home, pass -DLAYOUT=home
[13:06:53] <fuzzie> lynxlynxlynx: and some prefix?
[13:07:03] <lynxlynxlynx> that's optional
[13:07:20] <lynxlynxlynx> no, it isn't, actually
[13:07:44] <Avenger> fuzzie, when i type cmake .. in the build dir, it says: Build files have been written to: ~/gemrb
[13:07:49] <lynxlynxlynx> -DCMAKE_INSTALL_PREFIX="~" and i suggest -DCMAKE_BUILD_TYPE=Debug
[13:08:30] <Avenger> so my build dir is empty
[13:09:14] <Avenger> well, i need a complete walkthrough from the beginning
[13:12:39] <fuzzie> i think you probably already ran cmake outside the build dir at some point
[13:12:50] <fuzzie> we struggled with this before, cmake is stupid about it
[13:13:35] <Avenger> so what shall i do? reinstall my linux? :P
[13:14:16] <edheldil> rm -rf ~/ should be enough :-P
[13:14:28] <edheldil> Hi, Avenger
[13:14:32] <Avenger> hi
[13:15:02] <lynxlynxlynx> do you have any CMakeCache.txt anywhere in the source tree?
[13:15:16] <Avenger> yep, in gemrb root
[13:15:18] <edheldil> lynxlynxlynx: are these commonly used arguments described in our build docs?
[13:15:20] <Avenger> shall i rm it?
[13:16:08] <Avenger> ok, i deleted it, and now i got files in build dir
[13:16:10] <Avenger> cool
[13:17:07] <Avenger> i just forgot to add -DLAYOUT=home
[13:18:46] <Avenger> btw, sdlvideo compiles
[13:18:57] <Avenger> ahh ok, it is not a miracle
[13:19:05] <lubos> lynxlynxlynx: I think it would help to add CHECK_OUT_OF_SOURCE macro http://ryzom.hg.sourceforge.net/hgweb/ryzom/ryzom/file/da78b4cdbfe6/code/CMakeModules/nel.cmake
[13:20:05] <lynxlynxlynx> Avenger: won't the maze change cause crashes in iwd2? that table has only 4 columns there
[13:20:23] <lynxlynxlynx> edheldil: they are
[13:20:32] <Avenger> no, if the table is allocated as 5 coluns, and the reader tries to read 5 columns too
[13:20:32] <edheldil> thanks
[13:20:45] <Avenger> it will simply store some 0's
[13:20:52] <lynxlynxlynx> maybe not the debug one, since it is only interesting to developers
[13:21:12] <Avenger> lynx: previously the int table was allocated only as 3 columns :)
[13:21:24] <Avenger> that would have caused a crash, even on Tob
[13:21:38] <lynxlynxlynx> lubos: thanks, i'll check it out. i've seen it before, but didn't think it was needed
[13:22:05] <Avenger> ok, what is the name of SDL_mixer today?
[13:22:06] <lynxlynxlynx> Avenger: but only those were accessed
[13:22:29] <Avenger> 'apt-get install SDL_mixer' is not working
[13:22:31] <lynxlynxlynx> but i'm happy that it's still ok
[13:22:41] <lynxlynxlynx> try with a lib prefix?
[13:23:09] <lynxlynxlynx> or dpkg -i mixer # or something like that for searching
[13:24:30] <Avenger> libsdl-mixer1.2
[13:24:51] <Avenger> and i already got it
[13:25:00] <Avenger> so cmake can suck it
[13:26:34] <lynxlynxlynx> you need the headers too
[13:26:43] <lynxlynxlynx> maybe -dev
[13:28:27] <Avenger> libsdl-mixer1.2-dev
[13:28:33] <Avenger> obscure names ftw
[13:28:56] <Avenger> this should be included in some helpfiles
[13:29:09] <Avenger> i'm pretty sure i'm not the only one who will curse at this
[13:29:36] <Avenger> and what do i do with this --> file cannot create directory: /usr/local/man/man6.
[13:29:37] <lynxlynxlynx> of course you're not, it's the bane of every developer
[13:29:54] <Avenger> i only specified -DLAYOUT=home
[13:30:02] <lynxlynxlynx> don't make install then
[13:30:10] <Avenger> heh
[13:30:13] <lynxlynxlynx> the default install prefix is /usr/local
[13:30:19] <lynxlynxlynx> per fhs
[13:30:45] <lynxlynxlynx> oh, you can also delete the CMakeFiles dir in the source tree (leftover)
[13:30:45] <Avenger> but didn't -DLAYOUT change that?
[13:31:02] <lynxlynxlynx> the layout only changed the actual layout of the different dirs and destinations
[13:31:10] <Avenger> shit, yes, i had them
[13:31:34] <lynxlynxlynx> remove the cache in the build dir and you'll be able to reconfigure
[13:31:36] <Avenger> i need to make, my gemrb game dir is different from the sandbox
[13:31:43] <Avenger> i did that
[13:31:49] <fuzzie> <lynxlynxlynx> -DCMAKE_INSTALL_PREFIX="~"
[13:32:04] <Avenger> hmm and what's the other thing? i need both?
[13:32:36] <fuzzie> the -DLAYOUT=home stops it from making all the directories like 'man' and 'bin' and 'etc' and 'lib'
[13:33:53] <Avenger> ok, so far i got these:
[13:33:55] <Avenger> rm -rf CMakeFiles
[13:33:57] <Avenger> cmake .. -DCMAKE_INSTALL_PREFIX="~" -DLAYOUT=home
[13:34:00] <Avenger> is this enough?
[13:35:12] <Avenger> ok, and rm CMakeCache.txt
[13:35:13] <lynxlynxlynx> no need to remove CMakeFiles, they'll get regenerated
[13:35:28] <lynxlynxlynx> the cache is important since it prevents the new options to have an effect
[13:35:30] <Avenger> yes, i know, but if i want them regenerated properly
[13:36:28] <Avenger> i hope i was the last one who used autotools :)
[13:36:40] <Avenger> because now it is officially broken in gemrb
[13:38:32] <lynxlynxlynx> now? :)
[13:41:41] <fuzzie> like i said, i'm pretty sure some porters are still using them
[13:41:44] <fuzzie> or just their own custom stuff
[13:42:36] <Avenger> lynx: it broke now, it worked until now
[13:42:53] <Avenger> the man file broke it
[13:43:09] <Avenger> ok, it still cannot compile python
[13:43:13] <Avenger> wtf
[13:43:44] <Avenger> #include <Python.h> ?
[13:43:53] <Avenger> wouldn't cmake die on this too?
[13:44:44] <lubos> you need metapackage python-dev
[13:45:39] <Avenger> python-dev is already the newest version.
[13:45:58] <Avenger> i got /usr/include/python2.6
[13:46:01] <Avenger> but no Python.h in it
[13:46:14] <lubos> dpkg -S Python.h
[13:46:16] <lynxlynxlynx> uhh
[13:46:18] <fuzzie> huh, no Python.h?
[13:47:52] <Avenger> oops, there is it
[13:48:09] <Avenger> but also: python2.6-dbg: /usr/include/python2.6_d/Python.h
[13:48:11] <Avenger> python2.6-dev: /usr/include/python2.6/Python.h
[13:49:48] <Avenger> ok, lets try again
[13:55:33] <Avenger> it is compiled now, except sdl audio
[13:57:40] <lubos> Is libsdl1.2-dev installed?
[13:58:05] <fuzzie> sdl audio shouldn't matter, should it?
[13:59:27] <lynxlynxlynx> if he doesn't want to hack on it, then it shouldn't
[14:00:14] <Avenger> weird
[14:00:56] <Avenger> libsdl1.2-dev is already the newest version.
[14:02:20] <lynxlynxlynx> you need the mixer
[14:02:53] <edheldil> <Avenger> libsdl-mixer1.2-dev
[14:03:10] <Avenger> interesting: -- Looking for SDL_mixer: found
[14:03:16] <Avenger> now it says this
[14:03:57] <Avenger> maybe now it will compile
[14:04:48] <Avenger> hmm actually, it compiled earlier too, i just don't know why it didn't load then
[14:04:51] <lubos> It was problem with cmake cache
[14:05:35] <Avenger> yeah, probably
[14:05:44] <Avenger> that was surely a problem earlier
[14:05:56] <Avenger> but now, it is already installed, and i got this: DelayPlugin=OpenALAudio.so
[14:06:09] <Avenger> yet, it is what loads finally
[14:06:47] <Avenger> and i still get this: file cannot create directory: /usr/local/share/man/man6.
[14:07:44] <Avenger> i don't understand :(
[14:08:07] <Avenger> first it worked, now it doesnt
[14:08:22] <Avenger> i still use the same line: cmake .. -DCMAKE_INSTALL_PREFIX="~/GemRB" -DLAYOUT=home
[14:08:26] <Avenger> it is in a file :)
[14:11:56] <lynxlynxlynx> let me check
[14:12:43] <lynxlynxlynx> uh, for the home layout the path is different
[14:12:56] <lynxlynxlynx> no share and you specified a different prefix anyway
[14:13:31] <lynxlynxlynx> check the MAN_DIR path that is printed at the end of the cmake output
[14:13:57] <Avenger> CmakeCache creeped back
[14:16:57] <lynxlynxlynx> then it should be fine now
[14:17:37] <Avenger> ok, it seems correct, except i see this:
[14:17:40] <Avenger> [PluginMgr]: Loading: /home/laci/GemRB/plugins/NullSound.so... Null Sound Driver...[OK]
[14:17:42] <Avenger> [PluginMgr]: Loading: /home/laci/GemRB/plugins/OpenALAudio.so... OpenAL Audio Driver...[OK]
[14:17:52] <Avenger> i thought only one plugin of a kind can load
[14:18:08] <Avenger> sdlaudio is loaded earlier
[14:18:24] <Avenger> i just cannot be sure due to those lines :)
[14:19:42] <Avenger> lol, i'm seeing [OpenAL]: Playing Next Music
[14:19:44] <Avenger> so, meh
[14:19:57] <lynxlynxlynx> use the AudioDriver = sdlaudio option
[14:20:20] <Avenger> oh, i didn't even know we got that
[14:20:25] <lynxlynxlynx> you'll still see all plugin registering though
[14:20:51] <lynxlynxlynx> i'm not sure the delay/skip plugin stuff works anymore, there was some debate about it with tomprince long ago
[14:21:12] <Avenger> well, if you remove something, do it properly :(
[14:21:44] <Avenger> i don't insist on that, but the text is misleading
[14:22:30] <fuzzie> yes, i grumped about that at the time
[14:23:39] <Avenger> ok, i see now sdlaudio on the log :)
[14:24:13] <Avenger> so,i can give it a valgrind kick
[14:26:26] <Avenger> ==28341== Thread 3:
[14:26:28] <Avenger> ==28341== Invalid write of size 2
[14:26:30] <Avenger> ==28341== at 0xC380C6A: ACMReader::read_samples(short*, int) (ACMReader.cpp:103)
[14:26:32] <Avenger> ==28341== by 0xA442C37: SDLAudio::music_callback(void*, unsigned short*, int) (SDLAudio.cpp:87)
[14:26:39] <Avenger> can this be a problem? ;)
[14:27:30] <Avenger> crash !!!
[14:28:53] <Avenger> it is really odd, not even in sdlaudio
[14:29:14] <fuzzie> not in another thread?
[14:29:32] <Avenger> another thread
[14:29:42] <fuzzie> openal and sdlaudio both have this problem where there's no locking in the core
[14:32:56] <fuzzie> ok that SDLAudio thing is stupid
[14:33:05] <fuzzie> someone remove the *2 from line 97 please
[14:33:57] <Avenger> stream = stream + (cnt * 2); ?
[14:34:02] <fuzzie> yes
[14:34:05] <fuzzie> stream is a short pointer..
[14:34:25] <Avenger> so it is overwriting stuff?
[14:34:37] <Avenger> ok, maybe that broke me :)
[14:35:19] <Avenger> another valgrind run
[14:35:31] <fuzzie> but got to run now.
[14:35:46] <Avenger> ok, the sound is still good
[14:40:37] <lynxlynxlynx> do you get any lag with sdlaudio?
[14:41:28] <Avenger> well, valgrind is laggy
[14:41:37] <Avenger> i found another memory problem
[14:41:45] <CIA-29> GemRB: 03avenger_teambg * rff785eb12c0b 10gemrb/gemrb/plugins/SDLAudio/SDLAudio.cpp: possible fix of the sdlaudio crasher
[14:41:47] <CIA-29> GemRB: 03avenger_teambg * rf5d8f1c9b336 10gemrb/gemrb/core/Map.cpp: another memory problem
[14:44:11] <CIA-29> GemRB: 03avenger_teambg * rf87652ab695d 10gemrb/gemrb/ (4 files in 3 dirs): iwd/tob opcode fixes (shroud of flame, mold touch, maze)
[14:47:18] <Avenger> meh, it is still bugging?
[14:50:29] <lynxlynxlynx> that *100 on duration is also in the original?
[14:51:40] <Avenger> yes
[14:51:48] <Avenger> btw, sound is lagging in sdlaudio
[14:51:59] <Avenger> it is especially noticeable with button clicks
[15:00:30] <lynxlynxlynx> yeah, here too
[15:00:38] <lynxlynxlynx> fuzzie doesn't have that problem though
[15:00:56] <lynxlynxlynx> neither did the porters that used it iirc
[15:03:45] <Avenger> well, i don't really care about that, i just wanted to see if the crash in sdl was truly 3rd party problem, or ours
[15:03:56] <Avenger> and it looks like it was ours :)
[15:04:49] <Avenger> valgrind can show all kinds of memory problems the most early
[15:05:57] <Avenger> btw, sdl and python doesn't show up on valgrind so much nowadays
[15:06:10] <Avenger> either there are good filters or they got fixed
[15:06:30] <Avenger> pfft, i had to jynx that
[15:08:00] <-- Bo_Thomsen has left IRC (Quit: Leaving.)
[15:08:26] <CIA-29> GemRB: 03avenger_teambg * r2a4b721997f7 10gemrb/gemrb/core/Map.cpp: fixed memory problem in searchmap
[15:08:34] --- barraAway is now known as barra_home
[16:06:04] <Avenger> haha, the crasher i get is not because of sdlaudio
[16:07:19] <Avenger> why would the system ever call Actor::GetToHit without target
[16:11:43] <lynxlynxlynx> don't you see the backtrace?
[16:14:38] <Avenger> i will
[16:14:42] <Avenger> but this is insane
[16:14:48] <Avenger> GetToHit is called once
[16:15:06] <Avenger> and LastTarget should be valid at that point
[16:15:09] <Avenger> ever
[16:15:18] <Avenger> but i already determined it is the crasher
[16:15:30] <Avenger> when i added the melee penalty stuff i didn't check if target is null
[16:16:04] <Avenger> the problem is, those null checks are not supposed to be needed, and this whole function call should be invalid if there is no target
[16:16:38] <Avenger> now i added an abort there, so i will see ;)
[16:16:39] <lynxlynxlynx> make it print something useful
[16:17:06] <Avenger> before that i print the actor's name (it is the lightning mephit's first attack) and lasttarget
[16:17:40] <Avenger> it looks like the first GetToHit happens before lasttarget is set
[16:17:48] <Avenger> however is it possible, i don't know yet
[16:18:16] <Avenger> starting a game in valgrind is slooow
[16:20:04] <Avenger> ok, lasttarget is totally 0 here, but i didn't get a call trace
[16:21:18] <wjp> what do you mean by "didn't get a call trace"?
[16:21:22] <Avenger> i hope this will crash *(unsigned int *) (0)=10;
[16:21:36] <Avenger> i thought abort() will cause a trace list in valgrind
[16:22:00] <wjp> hm, just add an assert and trap it in gdb?
[16:22:31] <lynxlynxlynx> that's too easy
[16:25:19] --- barra_home is now known as barra_away
[16:25:25] <Avenger> OOH
[16:25:37] <Avenger> AttackCore calls GetCombatDetails
[16:25:43] <Avenger> without setting target
[16:25:49] <Avenger> who did that O_o
[16:26:00] <fuzzie> why is GetCombatDetails not checking the target?
[16:26:10] <Avenger> it IS how it should be done, generally
[16:26:16] <fuzzie> i'm pretty sure i did that
[16:26:21] <Avenger> i mean, attackcore should perform the attack
[16:26:26] <Avenger> that's how the original works
[16:26:31] <Avenger> it just needs target first
[16:26:33] <fuzzie> and i'm pretty sure GetCombatDetails wasn't doing that at the time :P
[16:26:44] <fuzzie> because, i want the weapon distance etc first.
[16:26:52] <Avenger> //action performed
[16:26:54] <Avenger> if(target->Type == ST_ACTOR) {
[16:26:56] <Avenger> actor->SetTarget( target );
[16:26:58] <Avenger> }
[16:27:03] <Avenger> this needs before combatdetails
[16:27:11] <fuzzie> and then what happens if it's not an actor? :P
[16:27:21] <Avenger> it will still be zero, yep
[16:27:34] <CIA-29> GemRB: 03lynxlupodian * rf8eda27d0642 10gemrb/Makefile.am: blindly try fixing the manpage installation for the unsupported bs
[16:27:44] <CIA-29> GemRB: 03lynxlupodian * r505e4e107d5b 10gemrb/CMakeLists.txt: cmake: prevent in-source builds
[16:27:51] <fuzzie> that first GetCombatDetails call is solely to get the weapon range, i think.
[16:27:56] <fuzzie> but i don't have the code here, just going from memory.
[16:28:57] <fuzzie> and we should remove the non-actor stuff from AttackCore completely..
[16:29:07] <Avenger> ok, i will pass target to getcombatdetails
[16:29:15] <lynxlynxlynx> it should probably be split into more functions
[16:29:17] <Avenger> you can never have enough parameters :P
[16:29:25] <lynxlynxlynx> you can tell by the amount of arguments that it is doing too many things :P
[16:29:35] <lynxlynxlynx> heh
[16:29:43] <Avenger> yes but now i will just add the parameter
[16:29:55] <lynxlynxlynx> just
[16:29:59] <fuzzie> why not just check for NULL? :P
[16:30:29] <Avenger> and even pass it to GetToHit
[16:30:37] <Avenger> because then your function won't work!!!
[16:30:45] <Avenger> you want to pass the target, believe me :)
[16:30:47] <fuzzie> i mean
[16:30:55] <fuzzie> the target will be NULL for non-actors
[16:31:00] <fuzzie> so you have to fix that somehow
[16:31:54] <fuzzie> and GetToHit didn't crash when I wrote this code..
[16:32:07] <Avenger> oh well, won't add an assert
[16:32:12] <Avenger> just return 0 from gettohit
[16:32:19] <Avenger> it had spurious check for 0
[16:32:50] <Avenger> but it is nonsense, if there is no target, there is no ToHit number
[16:33:11] <fuzzie> oh i see, you broke it :P
[16:33:48] <fuzzie> but yes, returning 0 sounds good
[16:33:49] <Avenger> Actor::GetCombatDetails should probably return those values in a struct
[16:33:58] <Avenger> most of the params are return params
[16:34:04] <fuzzie> i think lynx's idea about more functions is probably better
[16:34:42] <Avenger> well, if you want to explode it now, tell me
[16:34:45] <Avenger> lynx?
[16:34:55] <Avenger> or i just fix it, and then you can explode it anytime
[16:35:11] <fuzzie> i go back to cooking :)
[16:35:19] <lynxlynxlynx> i wrote it all summed up since most of the lookups are shared
[16:35:38] <lynxlynxlynx> except for the combat code itself, most users care only about a few of the parameters
[16:36:11] <lynxlynxlynx> but yes, the cleanup can be done later
[16:36:15] <Avenger> ok
[16:37:16] <fuzzie> wait
[16:37:20] <fuzzie> how does the GUI calculate it?
[16:37:33] <Avenger> ?
[16:37:41] <fuzzie> the value in the GUI comes from GetToHit
[16:37:44] <fuzzie> so you can't just return zero
[16:39:59] <Avenger> eep?
[16:40:32] <Avenger> whoa
[16:41:30] <Avenger> well, i think a lot of stuff is not included in the display
[16:42:42] <Avenger> anyway, i will return tohit midway then
[16:42:54] <Avenger> anything after it may use target
[16:42:58] <Avenger> anything before it may not
[16:43:18] <Avenger> hmm that's not good either
[16:45:43] <Avenger> huh, GetCombatDetails has side effect: it calls SetStance
[16:46:08] <Avenger> this is getting worse and worse :)
[16:46:41] <Avenger> i comment those out
[16:51:31] --> Maighstir has joined #GemRb
[16:53:25] <-- lubos has left IRC (Quit: Leaving.)
[16:54:07] <fuzzie> heh
[17:43:40] <CIA-29> GemRB: 03avenger_teambg * r61fb3945b178 10gemrb/gemrb/ (4 files in 3 dirs): fixed crash in GetCombatDetails
[17:43:43] <CIA-29> GemRB: 03avenger_teambg * rf138869dbd87 10gemrb/ (CMakeLists.txt Makefile.am): Merge branch 'master' of ssh://gemrb.git.sourceforge.net/gitroot/gemrb/gemrb
[18:21:19] --> |Cable| has joined #GemRb
[18:22:56] <Avenger> make dist doesn't work too well with cmake
[18:23:11] <Avenger> it creates a tgz i cannot simply open, i wonder why
[18:24:33] <Avenger> heh, it creates a crippled tar
[18:24:36] <Avenger> how
[18:25:13] <Avenger> sucks
[18:25:28] <Avenger> probably it wants to tar itself?
[18:27:29] <lynxlynxlynx> huh?
[18:27:41] <Avenger> check it yourself
[18:27:45] <lynxlynxlynx> i made the last three releases with it :P
[18:27:54] <lynxlynxlynx> that's some 10 tarballs
[18:28:05] <Avenger> you used it from build?
[18:28:10] <lynxlynxlynx> yes
[18:28:18] <lynxlynxlynx> i'll go do one now
[18:28:23] <Avenger> it doesn't work for me :(
[18:28:42] <lynxlynxlynx> hmm, it's broken here too now
[18:28:42] <Avenger> it creates a smaller than usual tgz file
[18:29:03] <Avenger> none of your previous saves were damaged?
[18:29:06] <Avenger> then it is very recent
[18:29:26] <lynxlynxlynx> it just calls git archive and tar
[18:29:38] <lynxlynxlynx> hmm and sed for that werror thing
[18:29:47] <lynxlynxlynx> but it worked for that, i tested it
[18:30:08] <lynxlynxlynx> go do something more interesting, i'll tackle this
[18:30:16] <Avenger> meh, i wonder why stuff like this breaks ;)
[18:30:23] <Avenger> yeah, i'll
[18:32:08] <lynxlynxlynx> implement fx_select_spell? :)
[18:32:27] <lynxlynxlynx> the archive breaks when it hits the top CMakeLists.txt
[18:32:53] <Avenger> i looked at fx_select today
[18:33:02] <Avenger> i wondered, hey, didn't we already implement this
[18:33:10] <lynxlynxlynx> nope
[18:33:45] <lynxlynxlynx> the comments in the effect are correct, it has two modes
[18:34:11] <Avenger> i'm too tired today, but maybe tomorrow i'll do this
[18:34:17] <Avenger> it is not too difficult
[18:34:23] <Avenger> just a new actionbutton row
[18:34:28] <lynxlynxlynx> the 2da one is used for spells like enchanted weapon, which creates one of three weapons
[18:34:37] <lynxlynxlynx> the other one is for wild magic
[18:34:41] <Avenger> and spell resistance
[18:34:54] <lynxlynxlynx> per-spell spell resistance? :C
[18:34:57] <lynxlynxlynx> :D
[18:34:59] <Avenger> spell immunity, i think
[18:35:04] <lynxlynxlynx> oh, right
[18:35:16] <lynxlynxlynx> i thought you were planning to also implement that ;)
[18:42:49] --- barra_away is now known as barra_home
[20:07:16] --> Taimon has joined #GemRb
[20:07:36] <Avenger> whoa, massive leak: ==12545== 119,168 bytes in 3,724 blocks are definitely lost in loss record 475 of 480
[20:07:43] <Taimon> hi guys
[20:07:49] <Avenger> hi Taimon!!!
[20:08:03] <Taimon> how are you doing? :)
[20:08:14] <Avenger> well, just fixing leaks right now
[20:08:20] <Taimon> valgrind?
[20:08:22] <Avenger> i was playing with ida in the morning
[20:08:24] <Avenger> yep
[20:08:27] <Taimon> ah
[20:08:36] <fuzzie> where would we be without it :)
[20:08:51] <Avenger> yeah, ida and valgrind are the greatest thing(s)
[20:09:10] <Taimon> oh well IDA could certainly be improved :)
[20:09:38] <Avenger> i agree with that
[20:09:44] <Avenger> you got 5.0 ?
[20:10:09] <Taimon> i think it's 5.2.something
[20:10:21] <Taimon> non-free though
[20:10:37] <Taimon> but I could give you the structure dump via IDC
[20:10:48] <Avenger> well, i didn't look on bittorrent, and got no 1000 some coins to buy it
[20:11:15] <Taimon> yes I understand (rapidshare *g*)
[20:11:19] <Avenger> hmm, some structure maps would be good
[20:11:37] <Avenger> though i got many not in tobex :)
[20:11:39] <fuzzie> yeah, it's a pity they can't work out a public discount scehem which works
[20:12:45] <Taimon> by the way, I think I confused you with what I wrote about the action handling stuff
[20:12:56] <Avenger> fuzzie said the last time, she still doesnt' understand some stuff
[20:13:02] <Taimon> is there any way I can clear that up?
[20:13:05] <Avenger> and she said she would work if she does :)
[20:13:16] <Taimon> hehe
[20:13:37] <fuzzie> well, when we poked through this last time, i thought the check for actions being in instant.ids was *after* the loop, making it impossible to only run non-instants
[20:13:40] <Avenger> well, as for myself, i go back to patch these terrible leaks
[20:13:59] <fuzzie> but from what you said, it sounds like it will check them beforehand, which would make my life a lot easier
[20:14:00] <Taimon> wait I sec, I'll fire up IDA to point you to the offsets
[20:20:38] <Taimon> okay, so the key pause/unpause branch is at 0x8E87E3
[20:20:40] <Avenger> heh, lynx just made my life miserable with this in-source build ban
[20:20:52] <Taimon> and the instants loop at 0x8E9C77
[20:22:46] <Taimon> there is also a subroutine at 0x9559B6 that only processes instants
[20:23:11] <Taimon> it's called from the ai update routine
[20:23:22] <Taimon> (not sure if this helps at all)
[20:23:33] <CIA-29> GemRB: 03avenger_teambg * r77647d775fda 10gemrb/gemrb/plugins/STOImporter/STOImporter.cpp: fixed leaking CREItem pieces all over in store
[20:24:15] <fuzzie> well, i don't have IDA w/ToB right here, but i think that last routine is probably exactly what i was looking for
[20:26:34] <Taimon> it's tricky if you don't have the structure information
[20:26:46] <Taimon> because you don't know when the branch will be taken
[20:28:55] <Avenger> ok, now the biggest leaking chunk is in by 0x4EB4F9B: SaveGame::GetPreview() const (SaveGameIterator.cpp:135)
[20:29:05] <fuzzie> the IE really makes win16 disasm seem very attractive
[20:29:09] <Avenger> that is tomprince's stuff, i guess ;)
[20:30:29] <Taimon> how big is the performance impact of valgrind? (gemrb still usable?)
[20:30:53] <Avenger> if you turn off sound, and got a pretty fast machine, it is playable
[20:31:07] <Avenger> load times are horrible :)
[20:31:11] <Taimon> :))
[20:31:13] <Avenger> but it works
[20:31:29] <Taimon> i must admit i haven't used it at all
[20:31:38] <lynxlynxlynx> unbearable on my machine
[20:31:47] <Taimon> (mainly doing embedded system development)
[20:31:51] <Avenger> i use it once per 6 months to keep leaks on a tolerable level :)
[20:31:57] <fuzzie> valgrind is quite, quite amazing if you can run it on your target
[20:32:11] <Taimon> "on your target" is the problem :)
[20:32:29] <fuzzie> it runs on ppc and arm
[20:32:44] <Taimon> 120MHz ARMv4?
[20:32:51] <fuzzie> if you're running linux ;p
[20:33:13] <Taimon> yeah ELDK, uCLinux and so on
[20:33:18] <fuzzie> and i guess the trunk needs ARMv7
[20:33:32] <fuzzie> was under the impression there was someting more useful for older machines around
[20:33:33] <Taimon> hm, too bad
[20:33:57] <Taimon> we usually debug via JTAG and it's horrible
[20:34:46] <fuzzie> sounds like bigger problems than valgrind could fix anyway :)
[20:34:56] <Taimon> yeah, you're right
[20:35:47] <Taimon> just ranting about a bad day at work :)
[20:45:58] <Avenger> fuzzie: do you think if i comment out that acquire at GUIScript.cpp line 3292, it will be all right?
[20:46:07] <Avenger> i think it increases refcount twice
[20:46:33] <Avenger> at least, valgrind doesn't complain when i took it out :)
[20:47:08] <Avenger> whee, definitely lost: 75 bytes
[20:47:23] <Avenger> this is a new record
[20:48:09] <fuzzie> the acquire?
[20:48:13] <fuzzie> oh, right
[20:48:42] <CIA-29> GemRB: 03avenger_teambg * rf50310399e37 10gemrb/gemrb/plugins/GUIScript/GUIScript.cpp: commented out an extra incref
[20:48:54] <Avenger> i vaguely remember a change about it, i just don't remember if it was this place or something else
[20:49:20] <fuzzie> not so sure it's good
[20:50:04] <CIA-29> GemRB: 03avenger_teambg * r923291c7651f 10gemrb/gemrb/core/DisplayMessage.cpp: defend from the attack of (null)
[20:50:05] <wjp> constructing the CObject should do the acquire, right?
[20:50:11] <Avenger> yes it does that
[20:50:23] <Avenger> i don't know if it should do it or not :)
[20:50:44] <fuzzie> yes, but then it's released when it comes off the stack
[20:50:57] <Avenger> well, it still works
[20:50:59] <wjp> ah, right, get doesn't do anything
[20:51:09] <fuzzie> and SetPicture() got a raw pointer
[20:51:11] <Avenger> and valgrind doesn't complain
[20:51:11] <wjp> and neither does SetPicture
[20:51:21] <fuzzie> so this should crash :)
[20:51:37] <fuzzie> but presumably the reference counting is bad elsewhere
[20:51:40] <Avenger> it doesn't and everything is fine no extra free and no extra malloc :)
[20:52:03] <Avenger> it might hit us later, so i left the acquire in comments
[20:53:08] <fuzzie> i guess the Sprite2D starts with a RefCount of 1
[20:53:11] <wjp> hm
[20:53:19] <Avenger> if it is freed on exit, then i couldn't scroll the games list
[20:53:48] <fuzzie> because it isn't wrapped with a refcounter at source
[20:53:49] <Avenger> i scrolled through the games list, so it should be ok, the icons are set only once
[20:53:51] <fuzzie> so this is fine
[20:53:57] <fuzzie> i mean, horrible, but fine
[20:54:01] <Avenger> hehe
[20:54:12] <Avenger> yeah, i would get rid of passing data around python
[20:54:32] <fuzzie> well, the refcounting is used in more than just python :)
[20:54:40] <Avenger> i just wonder what msvc7 would say about this
[20:55:12] <fuzzie> well, we looked back when tomprince started, and there were cross-module frees all over the place
[20:55:13] <Avenger> someone, somewhere allocated this nice picture, oops, its refcount is 0, lets free it
[20:55:16] <Avenger> boom :)
[20:55:18] <fuzzie> there are hidden ones too
[20:55:41] <Avenger> yes, i know, but that's not an excuse to make more
[20:55:43] <fuzzie> it only works for the STL because there's some horrible hack in the msvc STL
[20:56:32] <Avenger> that other leak i fixed today, creitems in store, was also caused by msvc7's memory stuff
[20:56:36] <fuzzie> but it seems to all work fine with all msvc as long as you don't use the debug static stuff
[20:56:50] <fuzzie> so i would suggest just not linking anything against the debug static lib :P
[20:57:07] <fuzzie> or just doing a build into a single .exe, i guess
[20:57:18] <Avenger> well, i don't know, if i compile everything as release, it crashes on exit
[20:57:43] <Avenger> i think it would be fine with everything as one big happy exe
[20:58:54] <Avenger> i don't know how to make it so, though :)
[20:59:10] <Avenger> or maybe i'm just lazy
[20:59:20] <fuzzie> set STATIC_LINK
[20:59:33] <fuzzie> don't know if it works on Windows
[20:59:38] <Avenger> i got some 40 subprojects :)
[20:59:49] <fuzzie> sure, i mean, make a new project, dump all the files in it :P
[20:59:55] <Avenger> hmm
[20:59:56] <fuzzie> but it is probably some work
[21:00:16] <Avenger> yes, and you are right, i should definitely make a new one
[21:01:22] <Avenger> ok, now i just wait for lynx's make dist fix
[21:04:22] <lynxlynxlynx> that middle sed is problematic
[21:30:09] <Lightkey> Avenger: woah, worrying news about your country
[21:32:17] <Taimon> ?
[21:33:59] <Taimon> ah, just read Fefe's Blog, i see now :)
[21:36:00] --> edheldil_ has joined #GemRb
[21:37:46] <-- Maighstir has left IRC (Read error: Connection reset by peer)
[21:37:49] --> Maighstir_ has joined #GemRb
[21:44:06] <-- Maighstir_ has left IRC (Read error: Connection reset by peer)
[21:44:54] --> Maighstir_ has joined #GemRb
[21:54:55] <-- edheldil_ has left IRC (Ping timeout: 272 seconds)
[22:28:33] <Avenger> what news?
[22:56:05] --> edheldil_ has joined #GemRb
[23:02:36] --- barra_home is now known as barraAway
[23:07:45] <-- edheldil_ has left IRC (Ping timeout: 272 seconds)
[23:11:10] <Lightkey> Avenger: "what news?" exactly :-)
[23:11:22] <Lightkey> Orban getting the media under control
[23:16:56] --> barra_away has joined #GemRb
[23:19:50] <-- barraAway has left IRC (Ping timeout: 245 seconds)
[23:25:40] <Avenger> well, i knew it will happen when they won the election
[23:25:41] <Avenger> i didn't foresee that they will rob my pension, though
[23:26:48] --> edheldil_ has joined #GemRb
[23:32:43] <-- lynxlynxlynx has left IRC (Remote host closed the connection)
[23:34:27] <Avenger> bye!
[23:34:30] <-- Avenger has left IRC (Quit: bye!)