--- Log opened Sat Jul 21 00:00:47 2012 20120721 00:03:36-!- mjs-de [~mjs-de@f053190090.adsl.alicedsl.de] has quit [Remote host closed the connection] 20120721 00:07:25-!- MeccaGod [majs@host189-199.bornet.net] has quit [] 20120721 00:17:36< CIA-87> jamit * r54806 /trunk/src/ (5 files in 3 dirs): Get rid of parameters that are always *resources::game_map, *resources::units. 20120721 00:19:29-!- mattsc [~mattsc@fw.hia.nrc.ca] has quit [Quit: bye] 20120721 00:25:29-!- oldtopman [~oldtopman@unaffiliated/oldtopman] has quit [Ping timeout: 252 seconds] 20120721 00:25:36-!- oldtopman [~oldtopman@unaffiliated/oldtopman] has joined #wesnoth-dev 20120721 00:29:54-!- neXyon [~neXyon@84-119-52-87.dynamic.xdsl-line.inode.at] has quit [Quit: bye] 20120721 00:46:52-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 248 seconds] 20120721 01:48:04-!- Alarantalara [~Adium@CPEc0c1c09e8055-CM00252eac6d62.cpe.net.cable.rogers.com] has quit [Quit: Leaving.] 20120721 03:16:36-!- Elvish_Pillager [~eli@71-10-229-241.dhcp.oxfr.ma.charter.com] has joined #wesnoth-dev 20120721 03:45:48-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20120721 03:47:12-!- un214 [~un214@108.221.231.209] has joined #wesnoth-dev 20120721 04:17:52-!- Ivanovic_ [~ivanovic@dtmd-4d0bf9ed.pool.mediaWays.net] has joined #wesnoth-dev 20120721 04:17:52-!- Ivanovic_ [~ivanovic@dtmd-4d0bf9ed.pool.mediaWays.net] has quit [Changing host] 20120721 04:17:52-!- Ivanovic_ [~ivanovic@wesnoth/developer/ivanovic] has joined #wesnoth-dev 20120721 04:22:10-!- Ivanovic [~ivanovic@wesnoth/developer/ivanovic] has quit [Ping timeout: 260 seconds] 20120721 04:23:46-!- Ivanovic_ is now known as Ivanovic 20120721 04:30:28-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has quit [Quit: Leaving] 20120721 04:38:59-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has joined #wesnoth-dev 20120721 04:44:44-!- hopman- [~chris@50-193-32-122-static.hfc.comcastbusiness.net] has quit [Ping timeout: 248 seconds] 20120721 04:47:58-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has quit [Quit: Leaving] 20120721 04:50:53-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has joined #wesnoth-dev 20120721 04:54:16-!- hopman- [~chris@50-193-32-122-static.hfc.comcastbusiness.net] has joined #wesnoth-dev 20120721 05:08:16-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has quit [Read error: Connection reset by peer] 20120721 05:10:55-!- hopman- [~chris@50-193-32-122-static.hfc.comcastbusiness.net] has quit [Ping timeout: 246 seconds] 20120721 05:14:55-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has joined #wesnoth-dev 20120721 05:37:25-!- hopman- [~chris@50-193-32-122-static.hfc.comcastbusiness.net] has joined #wesnoth-dev 20120721 05:43:01-!- un214 [~un214@108.221.231.209] has quit [Remote host closed the connection] 20120721 06:21:37-!- janebot [grickit@unaffiliated/gambit/bot/gambot] has quit [Ping timeout: 240 seconds] 20120721 06:24:17-!- jamit [~james@pool-173-61-167-63.cmdnnj.east.verizon.net] has quit [Read error: Connection reset by peer] 20120721 06:34:14-!- oldtopman [~oldtopman@unaffiliated/oldtopman] has quit [Quit: oldtopman has left the house] 20120721 06:53:22-!- ancestral [~ancestral@65-128-225-244.mpls.qwest.net] has joined #wesnoth-dev 20120721 06:54:46-!- happygrue_ [~quassel@c-98-222-183-113.hsd1.il.comcast.net] has joined #wesnoth-dev 20120721 06:54:46-!- happygrue_ [~quassel@c-98-222-183-113.hsd1.il.comcast.net] has quit [Changing host] 20120721 06:54:46-!- happygrue_ [~quassel@wesnoth/developer/wintermute] has joined #wesnoth-dev 20120721 06:55:46-!- stikonas [~gentoo@adsl-dyn-111.95-102-219.t-com.sk] has joined #wesnoth-dev 20120721 06:55:46-!- stikonas [~gentoo@adsl-dyn-111.95-102-219.t-com.sk] has quit [Client Quit] 20120721 06:57:29-!- happygrue [~quassel@wesnoth/developer/wintermute] has quit [Ping timeout: 255 seconds] 20120721 07:05:23-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Quit: Read error: User stopped responding] 20120721 07:10:37-!- hopman- [~chris@50-193-32-122-static.hfc.comcastbusiness.net] has quit [Ping timeout: 240 seconds] 20120721 07:17:26-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has quit [Quit: Leaving] 20120721 07:49:51-!- wesbot changed the topic of #wesnoth-dev to: 179 bugs, 337 feature requests, 17 patches | Logs: http://irclogs.wesnoth.org | Don't paste on IRC! Use a pastebin: http://pastebin.com | http://imagebin.org 20120721 07:51:46-!- ToBeFree [~tobefree@unaffiliated/tobefree] has quit [Excess Flood] 20120721 07:57:01-!- ToBeFree [~tobefree@unaffiliated/tobefree] has joined #wesnoth-dev 20120721 07:57:03-!- hopman- [~chris@50-193-32-122-static.hfc.comcastbusiness.net] has joined #wesnoth-dev 20120721 08:13:47< Ivanovic> moin 20120721 08:22:05-!- dtiger [~dtiger@dynamic-vpdn-46-53-164-47.telecom.by] has joined #wesnoth-dev 20120721 08:22:54-!- dtiger [~dtiger@dynamic-vpdn-46-53-164-47.telecom.by] has quit [Remote host closed the connection] 20120721 08:27:25-!- Gambit [~gambit@wesnoth/developer/grickit] has quit [Remote host closed the connection] 20120721 08:41:31-!- neXyon [~neXyon@84-119-52-87.dynamic.xdsl-line.inode.at] has joined #wesnoth-dev 20120721 09:01:07-!- timotei [~timotei@188.24.5.98] has joined #wesnoth-dev 20120721 09:01:07-!- timotei [~timotei@188.24.5.98] has quit [Changing host] 20120721 09:01:07-!- timotei [~timotei@wesnoth/developer/timotei] has joined #wesnoth-dev 20120721 09:07:45-!- _vdn [~nazgul-sa@217.26.0.104] has joined #wesnoth-dev 20120721 09:08:42-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20120721 09:10:52-!- _vdn [~nazgul-sa@217.26.0.104] has quit [Client Quit] 20120721 09:11:22-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20120721 09:21:56-!- Akihara [~Klyto@ks0.lv0.in] has quit [Remote host closed the connection] 20120721 09:33:16-!- ancestral [~ancestral@65-128-225-244.mpls.qwest.net] has quit [Quit: i go sleeps kthxbai] 20120721 09:48:37-!- Espreon [~espreon@wesnoth/developer/espreon] has joined #wesnoth-dev 20120721 10:25:07-!- horon [~horon@nttkyo331099.tkyo.nt.ngn2.ppp.infoweb.ne.jp] has joined #wesnoth-dev 20120721 10:31:45-!- mjs-de [~mjs-de@d185064.adsl.hansenet.de] has joined #wesnoth-dev 20120721 10:48:23-!- neXyon [~neXyon@84-119-52-87.dynamic.xdsl-line.inode.at] has quit [Quit: bye] 20120721 10:51:58-!- eleazzaar [~jbjerk@ppp-70-226-199-129.dsl.spfdil.ameritech.net] has joined #wesnoth-dev 20120721 10:52:16-!- eleazzaar [~jbjerk@ppp-70-226-199-129.dsl.spfdil.ameritech.net] has left #wesnoth-dev [] 20120721 11:23:14< zookeeper> well that was brief... 20120721 11:26:57< vultraz> rofl... 20120721 11:27:15< vultraz> another someone who rarely comes on IRC :P 20120721 11:42:23-!- yann [~dwitch@nan92-1-81-57-214-146.fbx.proxad.net] has quit [Remote host closed the connection] 20120721 11:43:24-!- negusnyul [~negusnyul@540091DC.dsl.pool.telekom.hu] has joined #wesnoth-dev 20120721 11:52:05-!- Elvish_Hunter [02c65273@gateway/web/freenode/ip.2.198.82.115] has joined #wesnoth-dev 20120721 11:55:32< CIA-87> elvish_hunter * r54807 /trunk/ (changelog src/scripting/lua.cpp): Added new Lua function wesnoth.get_villages() 20120721 12:00:37-!- ejls [~Epsilon01@mszy.domu.7un.net] has quit [Ping timeout: 240 seconds] 20120721 12:03:33< CIA-87> elvish_hunter * r54808 /trunk/ (changelog data/lua/wml-tags.lua src/game_events.cpp): Moved [store_villages] from C++ to Lua 20120721 12:03:53< Espreon> Hoo boy... 20120721 12:12:06-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 245 seconds] 20120721 12:29:03-!- Elvish_Hunter [02c65273@gateway/web/freenode/ip.2.198.82.115] has quit [Quit: Ciao!] 20120721 12:41:31-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 12:53:30-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has quit [Read error: Connection reset by peer] 20120721 12:53:36-!- lipk [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 13:00:04-!- lipk [~lipk@host-91-147-212-174.biatv.hu] has quit [Ping timeout: 248 seconds] 20120721 13:16:20-!- mordante [~mordante@roadie.xs4all.nl] has joined #wesnoth-dev 20120721 13:16:20-!- mordante [~mordante@roadie.xs4all.nl] has quit [Changing host] 20120721 13:16:20-!- mordante [~mordante@wesnoth/developer/mordante] has joined #wesnoth-dev 20120721 13:16:34< mordante> servus 20120721 13:17:45-!- timotei21 [~timotei@188.24.5.98] has joined #wesnoth-dev 20120721 13:17:45-!- timotei21 [~timotei@188.24.5.98] has quit [Changing host] 20120721 13:17:46-!- timotei21 [~timotei@wesnoth/developer/timotei] has joined #wesnoth-dev 20120721 13:18:52-!- timotei [~timotei@wesnoth/developer/timotei] has quit [Ping timeout: 248 seconds] 20120721 13:28:31-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20120721 13:29:22-!- noy [~Noy@wesnoth/developer/noy] has quit [Client Quit] 20120721 13:43:01-!- timotei21 [~timotei@wesnoth/developer/timotei] has quit [Read error: Connection reset by peer] 20120721 13:44:31-!- timotei [~timotei@188.24.5.98] has joined #wesnoth-dev 20120721 13:44:31-!- timotei [~timotei@188.24.5.98] has quit [Changing host] 20120721 13:44:31-!- timotei [~timotei@wesnoth/developer/timotei] has joined #wesnoth-dev 20120721 13:46:07-!- {V} [~V@139-79-ftth.onsneteindhoven.nl] has quit [Read error: Connection reset by peer] 20120721 13:47:02-!- {V} [~V@139-79-ftth.onsneteindhoven.nl] has joined #wesnoth-dev 20120721 14:27:17-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 14:33:27-!- loonybot [~loonybot@46.138.74.131] has joined #wesnoth-dev 20120721 14:33:28-!- loonybot [~loonybot@46.138.74.131] has quit [Changing host] 20120721 14:33:28-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-dev 20120721 14:50:52-!- Gambit [~gambit@wesnoth/developer/grickit] has joined #wesnoth-dev 20120721 14:57:39-!- lipk [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 14:57:56-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has quit [Ping timeout: 248 seconds] 20120721 14:59:57-!- lipk [~lipk@host-91-147-212-174.biatv.hu] has quit [Client Quit] 20120721 15:11:06-!- Octalot [~noct@host86-166-163-104.range86-166.btcentralplus.com] has joined #wesnoth-dev 20120721 15:11:48-!- EdB [~edb@tss37-1-89-82-194-231.dsl.sta.abo.bbox.fr] has joined #wesnoth-dev 20120721 15:15:22-!- Elvish_Pillager [~eli@71-10-229-241.dhcp.oxfr.ma.charter.com] has quit [Ping timeout: 246 seconds] 20120721 15:35:53< timotei> mordante: Wow... now that's a weird situation. Running the game normally It seems it catches the error, but the preprocessor's doesn't 20120721 15:36:14< timotei> I've read somewhere I have to add a try {} catch {} before that exception is thrown 20120721 15:36:14< timotei> :-? 20120721 15:36:16< timotei> Lemme check 20120721 15:49:12-!- Ayne [~Ayne@cpc2-sgyl34-2-0-cust493.sgyl.cable.virginmedia.com] has joined #wesnoth-dev 20120721 15:55:36< mordante> timotei, ok weird 20120721 16:07:59-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 16:25:11< lipkab> Could someone explain me how/why invalid configs cause "Mandatory WML child blahblah" errors? 20120721 16:31:28< timotei> mordante: OK, I've tried wrapping the preprocessor's code into a try{} catch{} but it wouldn't work. I'll need to investigate further 20120721 16:31:33< timotei> mordante: I do have another question though 20120721 16:31:57< timotei> In the src/serialization/preprocessor.cpp:1162, it creates a "new preprocessor_file(*buf, fname);". Just like that, without any deletion 20120721 16:32:03< timotei> Isn't that a memory leaK? 20120721 16:35:45-!- horon [~horon@nttkyo331099.tkyo.nt.ngn2.ppp.infoweb.ne.jp] has quit [Quit: Leaving...] 20120721 16:39:27< mordante> timotei, can you otherwise give the backtrace without symbols, it might help me 20120721 16:39:48< timotei> mordante: A backtrace for what? 20120721 16:40:05< mordante> the point of the throwing 20120721 16:40:07< timotei> I didn't get it working with GDB yet :P 20120721 16:40:13< timotei> Ah 20120721 16:41:36-!- anonymissimus [~chatzilla@HSI-KBW-078-042-163-105.hsi3.kabel-badenwuerttemberg.de] has joined #wesnoth-dev 20120721 16:43:30< anonymissimus> lipkab: AFAIK that error comes if you use config::child instead of config::child_or_empty and the child you try to get isn't there 20120721 16:43:31< timotei> mordante: Something like this? 20120721 16:43:32< timotei> preprocessing specified resource: ../data ... 20120721 16:43:32< timotei> 20120721 17:43:08 info preprocessor: processing resource: ../data/_main.cfg 20120721 16:43:32< timotei> 20120721 17:43:08 error config: #error: ""LOLLL"" at ../data/_main.cfg:2 20120721 16:43:32< timotei> Catchpoint 1 (exception thrown), 0xb79a3ff0 in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6 20120721 16:43:35< timotei> mordante: ^ 20120721 16:43:39< mordante> timotei, I agree to code looks odd, however I don't know that code well enough to fiddle with it 20120721 16:44:04< timotei> I typed: `gdb`, then `catch throw`, then `run ...` Where the `...` are the arguments for preprocessing 20120721 16:44:11< anonymissimus> lipkab: perhaps it's only for vconfigs or configs or both, don't remember 20120721 16:44:13< mordante> timotei, can you now type bt in gdb and then pastebin the result 20120721 16:44:35< timotei> mordante: Sure/. 20120721 16:44:43< anonymissimus> config::child appears to consider the child you try to get to be mandatory 20120721 16:44:45< timotei> mordante: (Yesterday it didn't want to execute fine :D) 20120721 16:45:04< timotei> mordante: http://pastebin.com/FFewjmwm 20120721 16:45:10< lipkab> anonymissimus: I used to think so, too, but for e.g.: config c = c2.find_child("nonexistent", "child", "blahblah") throws that error, too. 20120721 16:45:37< lipkab> However, it works fine if I don't try to assign the return value. 20120721 16:47:56< anonymissimus> lipkab: there's also has_child which never throws that error, so perhaps check previously 20120721 16:48:01-!- Elvish_Pillager [~eli@71-10-229-241.dhcp.oxfr.ma.charter.com] has joined #wesnoth-dev 20120721 16:48:05< timotei> mordante: So it throws that... but somehow It doesn't take it in account 20120721 16:48:15< timotei> mordante: How can I make it continue running? `continue`? 20120721 16:48:29< mordante> yes or c 20120721 16:48:35< anonymissimus> also, if you have vconfigs, it doesn't happen IIRC, you can check with ::null() IIRC 20120721 16:49:13< anonymissimus> and generally, it's better to keep vconfigs for as long as possible for variable substitution (if you are anywhere in the wml action engine) 20120721 16:49:17< timotei> mordante: So it continues just fine :( 20120721 16:49:36< timotei> mordante: Instead of the error to bubble up and reach the main() 20120721 16:51:29< lipkab> anonymissimus: One more thing. The above code doesn't work either if you replace 'config c' with 'const config& c'. Now that is what really confuses me. And... what is a vconfig? 20120721 16:53:45< lipkab> (So, to clear up the question: how the hell can it be that I can't reference an invalid config?) 20120721 16:54:24< mordante> timotei, did you also do catch catch before continuing? 20120721 16:54:32< timotei> No 20120721 16:54:42< mordante> :-( 20120721 16:54:48< timotei> Should I do it? 20120721 16:54:52< timotei> I can do it again 20120721 16:55:11< mordante> please I'd like to know where the exception is caught 20120721 16:55:14< timotei> OK 20120721 16:55:26< timotei> So after getting that bt, `catch catch` then continue? 20120721 16:55:41< timotei> Or I should `catch throw` and `catch catch` before the run>? 20120721 16:56:09< mordante> the catch throw needs to be before the run the catch catch doesn't matter 20120721 16:57:06< timotei> mordante: http://pastebin.com/J5A1BiQB this is after the bt 20120721 16:57:20< lipkab> anonymissimus: has_child unfortunately isn't good to check something which I'd like to look up with find_child. 20120721 16:57:59< mordante> thanks 20120721 16:58:01< timotei> mordante: It seems is caught in the libstdc++ library, right? 20120721 16:58:26< mordante> yes 20120721 16:58:45< mordante> I might need some more info later, I might have an idea what happens 20120721 16:58:58< timotei> I am now trying to move the --preprocess handling closer to the game->init_config() method. 20120721 17:00:25< timotei> mordante: It's nice this gdb to allow me to see where the exception was caught :D 20120721 17:00:31< timotei> MSVC Doesn't have such thing IIRC 20120721 17:00:40< timotei> OK, not unless you step-by-step 20120721 17:01:02< mordante> not sure you can catch throw points in MSVC, not sure about catch points 20120721 17:04:29< mordante> timotei, can you replace `throw preproc_config::error(error);' with `throw 0;' in preprocessor_streambuf::error 20120721 17:04:51< timotei> mordante: Will try once I finish checking something. 20120721 17:07:38< mordante> actually not too sure it will matter, looking at the code I start to doubt, but need to read more 20120721 17:23:35-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20120721 17:23:41< mordante> timotei, still around? 20120721 17:23:48< timotei> mordante: yep 20120721 17:23:59< mordante> the debugger still open? 20120721 17:25:08< timotei> mordante: not yet. But say what to do 20120721 17:26:17< mordante> try `p std::ios_base::badbit' , same for failbit as well 20120721 17:26:53< timotei> mordante: this after the catch? Or after the throw 20120721 17:27:13< mordante> doesn't matter, but I'd like something at the throw as well 20120721 17:29:02< mordante> when at the throw, please type `f 3' `p buffer_.exceptions()' 20120721 17:32:38-!- oldtopman [~oldtopman@unaffiliated/oldtopman] has joined #wesnoth-dev 20120721 17:39:39-!- negusnyul [~negusnyul@540091DC.dsl.pool.telekom.hu] has quit [Quit: Konversation terminated!] 20120721 17:39:51-!- negusnyul [~negusnyul@540091DC.dsl.pool.telekom.hu] has joined #wesnoth-dev 20120721 17:45:35< timotei> mordante: (gdb) f 3 20120721 17:45:35< timotei> #3 0x0920b2b4 in preprocessor_streambuf::underflow() () 20120721 17:45:35< timotei> (gdb) p buffer_.exceptions() 20120721 17:45:35< timotei> No symbol table is loaded. Use the "file" command. 20120721 17:45:39< timotei> (When at throw 20120721 17:45:41-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has joined #wesnoth-dev 20120721 17:45:56< timotei> mordante: I get the same symbol table thingy for p as well. 20120721 17:46:04< timotei> It seems I need to compile wesnoth with debug symbols? 20120721 17:46:08< timotei> How can I do that? 20120721 17:48:18< mordante> what build system? 20120721 17:49:00< timotei> cmake.. 20120721 17:50:22< mordante> in cmake set the build_type to DEBUG 20120721 17:51:22< timotei> mordante: like: make -Dbuild_type=DEBUG? 20120721 17:52:38< mordante> -DCMAKE_BUILD_TYPE=DEBUG 20120721 17:55:40< timotei> mordante: Oh, I have to regenerate the cmake files then? And recompile the whole wesnoth? 20120721 17:56:28< mordante> yup 20120721 17:59:10-!- EdB [~edb@tss37-1-89-82-194-231.dsl.sta.abo.bbox.fr] has quit [Quit: Konversation terminated!] 20120721 18:00:04< mordante> afk, dinner 20120721 18:00:34< timotei> ok 20120721 18:00:46< timotei> Bon apettite 20120721 18:10:05-!- Ayne [~Ayne@cpc2-sgyl34-2-0-cust493.sgyl.cable.virginmedia.com] has quit [Quit: Leaving] 20120721 18:16:54-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20120721 18:23:29-!- noy [~Noy@wesnoth/developer/noy] has quit [Ping timeout: 252 seconds] 20120721 18:23:40-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20120721 18:29:29-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has quit [Quit: And away we go] 20120721 18:30:24-!- ancestral [~ancestral@65-128-225-244.mpls.qwest.net] has joined #wesnoth-dev 20120721 18:41:21-!- MeccaGod [majs@host189-199.bornet.net] has joined #wesnoth-dev 20120721 18:45:44< timotei> mordante ok, let's see 20120721 18:56:16< timotei> mordante: http://pastebin.com/qEZ4GLPJ 20120721 18:56:18< timotei> Weird. 20120721 18:57:04< anonymissimus> lipkab: "how the hell can it be that I can't reference an invalid config" dunno, but sounds logical that one shouldn't do that 20120721 18:57:29< anonymissimus> lipkab: vconfig is the data structure wml blocks have before they are variable substituted 20120721 18:58:27< anonymissimus> lipkab: coding some addon lua code is an excellent way to get to know it, since the logic is exactly the same as in the c++ source :) 20120721 18:59:12< anonymissimus> lipkab: dunno; I'd try looking up some existing code which does similar things to what you plan and look how thy do it 20120721 19:10:16-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120721 19:21:22-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 19:25:28-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20120721 19:43:23< timotei> mordante: I've updated the pastebin: http://pastebin.com/qEZ4GLPJ 20120721 19:43:31< timotei> I still couldn't find the exceptions() thingy 20120721 19:49:51-!- wesbot changed the topic of #wesnoth-dev to: 180 bugs, 337 feature requests, 17 patches | Logs: http://irclogs.wesnoth.org | Don't paste on IRC! Use a pastebin: http://pastebin.com | http://imagebin.org 20120721 19:55:13< mordante> timotei, let me have another look 20120721 19:55:25< timotei> buffer_ is a stringstream. 20120721 19:55:40< timotei> I've tried with this->exceptions, but to no avail. 20120721 19:56:49< mordante> and current_->exceptions() ? 20120721 19:57:25< timotei> Nope. Couldn't find method preprocessor::exceptions 20120721 20:00:11< timotei> On failure underflow(), uflow() and overflow() may simply return 20120721 20:00:12< timotei> traits::eof() as it's stated in ยง27.5.2.4. For xsputn(), xsgetn() on 20120721 20:00:12< timotei> failure return 0. 20120721 20:00:15< timotei> I've read that just now. 20120721 20:01:08< mordante> I'm looking at 27.6.1.3/13 20120721 20:01:43< mordante> in the catch breakpoint can you there try to get the exceptions() in frame 1 ? 20120721 20:02:13< timotei> So `c', then `this->exceptions()' ? 20120721 20:02:59< timotei> mordante: http://pastebin.com/tSXSt7BH 20120721 20:04:49< mordante> timotei, did the this->exceptions() work? 20120721 20:05:02< timotei> (gdb) f 20120721 20:05:02< timotei> #0 0xb79a2d10 in __cxa_begin_catch () from /usr/lib/i386-linux-gnu/libstdc++.so.6 20120721 20:05:07< timotei> (gdb) p this->exceptions() 20120721 20:05:07< timotei> No symbol "this" in current context. 20120721 20:05:09< timotei> Nope :( 20120721 20:05:21< mordante> please to a f 1 first 20120721 20:05:32< timotei> Ah yeah. 20120721 20:06:22< timotei> Hmm, still no Symbol 20120721 20:07:07< timotei> This is weird 20120721 20:07:34< mordante> yeah 20120721 20:08:22< timotei> (ALso, where are you reading the C++ standard from?) 20120721 20:10:53< mordante> why do you want a copy? 20120721 20:14:58< timotei> I was wondering where you are reading the C++ standard. I searched a bit on the interwebs but couldn't find it in a suitable form of reading xD 20120721 20:15:07< timotei> Maybe I was just searching in a wrong way 20120721 20:18:19< mordante> I can link you to the improved version of C++11 20120721 20:19:14< mordante> and also the really bleeding edge, some assembly required ;-) 20120721 20:23:21-!- neXyon [~neXyon@84-119-52-87.dynamic.xdsl-line.inode.at] has joined #wesnoth-dev 20120721 20:24:05< mordante> timotei, the C++11 version with some minor fixes http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf 20120721 20:24:46< mordante> and in case you'd like to get the bleeding edge https://github.com/cplusplus/draft/ 20120721 20:27:06< timotei> Thanks 20120721 20:27:18< mordante> you're welcome 20120721 20:27:32< timotei> It seems I need to install some debugging info for libstdc++ 20120721 20:27:37< timotei> timotei: Install debug info for libstdc++, without it you cannot have 'this' there. (Fedora would suggest you the debuginfo-install command.) 20120721 20:27:57< mordante> the drafts are available for free only the official standard not 20120721 20:28:07< timotei> I see 20120721 20:28:25< mordante> and for C++11 I wouldn't recommend the latest official draft, some changes were made 20120721 20:29:15< mordante> I read them in the FDIS version, but that version wasn't supposed to be online ... so they removed it after a short while 20120721 20:31:21-!- ancestral [~ancestral@65-128-225-244.mpls.qwest.net] has quit [Quit: i go sleeps kthxbai] 20120721 20:39:16< mordante> timotei, just checked, but the buffer_ must have an exceptions() member, and the compiler agrees 20120721 20:39:48< timotei> mordante: http://www.cplusplus.com/reference/iostream/ios/exceptions/ indeed 20120721 20:39:49< timotei> Hmm 20120721 20:41:21< timotei> Ah, here I should have set the exceptions flag :( 20120721 20:41:38< timotei> I tried something with the exceptions() earlier this morning but I did it on the wrong object. 20120721 20:44:07< timotei> mordante: I remember we had some problems regarding this exceptions thingy some much time ago :) 20120721 20:51:13< mordante> timotei, I recall something about it as well 20120721 21:07:23< timotei> mordante: Does this help? 20120721 21:07:23< timotei> (gdb) p 'std::basic_ios >::exceptions' 20120721 21:07:23< timotei> $1 = {} 0xb7961f90 >::exceptions(std::_Ios_Iostate)> 20120721 21:08:45-!- un214 [~un214@108.221.231.209] has joined #wesnoth-dev 20120721 21:10:13< mordante> timotei, and if you just do `p exceptions()' ? 20120721 21:12:24< timotei> mordante: Nope. No symbol "exceptions" in current context. 20120721 21:13:02< timotei> Well, is the buffer_ the one who should throw an exception? 20120721 21:13:11< timotei> Because that's used just to gather the text. 20120721 21:13:21< timotei> The exception is thrown in the current streambuf instance 20120721 21:14:21-!- Elvish_Pillager [~eli@71-10-229-241.dhcp.oxfr.ma.charter.com] has quit [Ping timeout: 252 seconds] 20120721 21:27:27-!- neXyon [~neXyon@84-119-52-87.dynamic.xdsl-line.inode.at] has quit [Quit: bye] 20120721 21:28:00-!- un214 [~un214@108.221.231.209] has quit [Remote host closed the connection] 20120721 21:32:52< mordante> *grumble* 20120721 21:33:34< mordante> timotei, what happens if you set the exception mask of buffer_ to the badbit and failbit (only the latter should be required) 20120721 21:35:01< timotei> mordante: I've done this in the constructors: `buffer_.exceptions(std::ios_base::failbit | std::ios_base::badbit);', but still nothing 20120721 21:35:06< timotei> I am now trying something else 20120721 21:35:11< mordante> ok 20120721 21:35:21< timotei> HA! 20120721 21:35:23< timotei> Found it :X 20120721 21:35:46< timotei> I've added the .exceptions(std::ios_base::failbit | std::ios_base::badbit); to the string stream at line 1204 20120721 21:36:06< timotei> Because that was the first it entered in, according to the stack trace :) 20120721 21:36:14< timotei> Yupiii 20120721 21:37:18< timotei> mordante: Thanks a lot for the help. At least now I've learned a bit of gdb :D 20120721 21:38:31< lipkab> zookeeper: http://imagebin.org/221669 20120721 21:38:49< timotei> And I think I need a new computer :-" 20120721 21:44:08< lipkab> zookeeper: There're some bad news as well, though. GUI2 apparently doesn't have a combo box widget yet, so I can't implement the respective option for now. 20120721 21:44:44< mordante> timotei, nice, what is line 1204 for you? 20120721 21:45:10< timotei> mordante:scoped_istream stream = preprocess_file(res_name, defines_map); 20120721 21:45:10< timotei> std::stringstream ss; 20120721 21:45:10< timotei> ss.exceptions(std::ios_base::failbit | std::ios_base::badbit); 20120721 21:45:29< mordante> timotei, would also be nice to get the result of .exceptions() before your change on both GCC and MSVC 20120721 21:45:42< timotei> mordante: Ah. OK 20120721 21:46:12< mordante> then we at least know what really went wrong 20120721 21:47:02< mordante> I expect that both have no flag set 20120721 21:47:25< mordante> but like to know for sure 20120721 21:47:27< timotei> OK. 20120721 21:50:25-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20120721 22:07:31< zookeeper> lipkab, hmh, i see. 20120721 22:08:40< zookeeper> lipkab, have a screenshot showing how it looks with several modifications? 20120721 22:13:19-!- lipk [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 22:13:20-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has quit [Read error: Connection reset by peer] 20120721 22:19:24-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 22:20:48-!- lipk [~lipk@host-91-147-212-174.biatv.hu] has quit [Read error: Connection reset by peer] 20120721 22:23:22< lipkab> zookeeper: Here you go: http://imagebin.org/221674 20120721 22:24:16< timotei> mordante: Current exceptions() state: 0 new state: 6 for MSVC 20120721 22:24:25< timotei> Current exceptions() state: 0 new state: 5 20120721 22:24:25< timotei> for GCC 20120721 22:24:39< lipkab> zookeeper: Oh, and it works not with modifications but eras and scenarios, too. 20120721 22:24:43< lipkab> *not only 20120721 22:24:47< timotei> Opps, on MSVC I get a runtime error for setting that :( 20120721 22:26:16< zookeeper> lipkab, looks good to me... if there's a horizontal separator widget of some kind then it might be a good idea to use that, if not then no big deal 20120721 22:26:35< zookeeper> err, i mean vertical separator... like a horizontal line 20120721 22:26:58< mordante> timotei, the state itself doesn't tell me much if I don't know the value of the flags 20120721 22:27:11< mordante> they depend on the implementation 20120721 22:27:12< timotei> static const _Iostate failbit = (_Iostate)0x2; 20120721 22:27:12< timotei> static const _Iostate badbit = (_Iostate)0x4; 20120721 22:27:19< timotei> For MSVC 20120721 22:27:24< lipkab> zookeeper: I'm afraid we don't have anything like that either. 20120721 22:27:39< timotei> And for gcc... IDK where to search exaclty 20120721 22:28:26< mordante> you posted them in the log, looking for them 20120721 22:28:33< mordante> but both start at 0? 20120721 22:28:40< timotei> Yes 20120721 22:29:39< lipkab> zookeeper: I have a question though. The options currently translate into a variable definition in a prestart event, which is inserted to the front (so that it's the first prestart to fire). 20120721 22:29:49< mordante> ok so both start with an empty exception mask 20120721 22:30:39< lipkab> zookeeper: Is that ok, or should I somehow add them even earlier? 20120721 22:30:40< timotei> I don't like the runtime error on MSVC's binary. 20120721 22:30:52< timotei> I think I'll guard the exception setting to non _MSC compilers 20120721 22:30:57< mordante> not? 20120721 22:31:26< timotei> Oh well, before setting that, it still worked fine :P 20120721 22:31:34< timotei> Now setting that I get a runtime error :( 20120721 22:31:37< timotei> Which is .. bad 20120721 22:31:43< mordante> but if we throw this exception we want to catch it in main? 20120721 22:31:49< timotei> Yes 20120721 22:31:51< lipkab> zookeeper: I mean, is it possible that someone would want to use the options before the first prestart event? 20120721 22:31:56< timotei> It will catch it 20120721 22:32:05< zookeeper> lipkab, well, there's the preload event... 20120721 22:32:20< timotei> mordante: } catch(game::error &) { 20120721 22:32:20< timotei> // A message has already been displayed. 20120721 22:32:20< timotei> return 1; 20120721 22:32:42< zookeeper> lipkab, but the preload event gets triggered when loading saves, too, so it could result in something funny happening if someone for instance overwrites one of the variables used by the modification 20120721 22:33:01< lipkab> Yeah... 20120721 22:33:02< mordante> timotei, reading the standard I think MSVC is buggy, can you try with only the failbit in both gcc and MSVC? 20120721 22:33:18< timotei> mordante: I just tried. On MSVC I still get runtime error 20120721 22:33:28< zookeeper> lipkab, i think your prestart idea is perfectly good as long as it's mentioned in the WML reference entry for modifications 20120721 22:33:30< timotei> Like: Unhandled exception at 0x7514b9bc in wesnoth.exe: Microsoft C++ exception: std::ios_base::failure at memory location 0x0016e04c.. 20120721 22:33:51< zookeeper> most limitations like that aren't a problem as long as they're clearly mentioned 20120721 22:34:30< lipkab> zookeeper: Ok, that saves me a possibly tiring trip to the darkest depths of the WML engine :) 20120721 22:34:41< lipkab> *VERY tiring 20120721 22:37:12-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has quit [Read error: Connection reset by peer] 20120721 22:37:15-!- lipk [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 22:38:06< mordante> timotei, can you add a catch handler in main for that specific exception? 20120721 22:38:48< timotei> That specific meaning? preproc_config::error ? 20120721 22:43:03< mordante> no I'd like you to catch `std::ios_base::failure' 20120721 22:43:51< mordante> I think the original exception is caught, and then a std::ios_base::failure is thrown 20120721 22:44:07< timotei> In the MSVC binary, right? 20120721 22:44:09< mordante> so the original exception went into lala-land 20120721 22:44:12< mordante> timotei, yes 20120721 22:44:19-!- neXyon [~neXyon@84-119-52-87.dynamic.xdsl-line.inode.at] has joined #wesnoth-dev 20120721 22:44:22< timotei> Well, isn't it somehow worthless to catch the exception? 20120721 22:44:37< timotei> I mean it exists through main() ... and exists the program :-? 20120721 22:44:49< timotei> Or maybe that's the reason for the Runtime Erro? 20120721 22:44:51< timotei> Error* 20120721 22:45:05-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20120721 22:45:15< timotei> Actually, what I was wondering is, why add a catch() in the main() method, if the program is going to end anyway? 20120721 22:45:19-!- ejls [~Epsilon01@mszy.domu.7un.net] has joined #wesnoth-dev 20120721 22:45:26-!- lipk [~lipk@host-91-147-212-174.biatv.hu] has quit [Ping timeout: 245 seconds] 20120721 22:46:56< mordante> timotei, since uncaught exceptions are naughty 20120721 22:47:04< timotei> OK 20120721 22:47:48< mordante> it is not specified whether or not destructors are called when an exceptions is not caught 20120721 22:48:34< mordante> so for example the preferences may or may not be saved 20120721 22:49:00< timotei> I see 20120721 22:49:01< timotei> OK 20120721 22:49:09< mordante> and also it would it will satisfy my curiosity to know what MSVC does ;-) 20120721 22:49:46< mordante> that also makes it possible to add proper comment regarding what's going on 20120721 22:50:17< timotei> Oky doky 20120721 22:52:45-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120721 22:57:58< fendrin> AI0867: Regarding the [area] thing, I have some related code lying around. 20120721 22:59:16< timotei> mordante: Yup. With the catch the binary won't get a Runtime Error anymore :D 20120721 22:59:22< timotei> That's on MSVC 20120721 22:59:25< timotei> Testing now again on GCC 20120721 23:01:11< mordante> timotei, ok good, I expect GCC to catch the error thrown in the pre-processor 20120721 23:01:32< mordante> and not the ios_base exception 20120721 23:08:11< mordante> I'm off night 20120721 23:08:17-!- anonymissimus [~chatzilla@HSI-KBW-078-042-163-105.hsi3.kabel-badenwuerttemberg.de] has quit [Quit: ChatZilla 0.9.88.2 [Firefox 11.0/20120312181643]] 20120721 23:08:38-!- mordante [~mordante@wesnoth/developer/mordante] has quit [Quit: Leaving] 20120721 23:10:10-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20120721 23:10:29< CIA-87> mordante * r54809 /trunk/CMakeLists.txt: Add -Wctor-dtor-privacy to the pedantic flags. 20120721 23:10:31< CIA-87> mordante * r54810 /trunk/CMakeLists.txt: Add -Wnon-virtual-dtor to the pedantic flags. 20120721 23:10:34< CIA-87> mordante * r54811 /trunk/CMakeLists.txt: Add -Wdouble-promotion to the pedantic flags. 20120721 23:10:36< CIA-87> mordante * r54812 /trunk/CMakeLists.txt: Add -Wmismatched-tags to the pedantic flags. 20120721 23:20:29< timotei> mordante: 20120722 00:15:46 error config: #error: ""LOLLL"" at ../data/_main.cfg:2 20120721 23:20:29< timotei> game::error exception caught 20120721 23:20:36< timotei> So yes, game:error is caught in GCC. 20120721 23:20:39< timotei> I'll commit the fix then :D 20120721 23:20:59-!- lipkab [~lipk@host-91-147-212-174.biatv.hu] has quit [Quit: And away we go] 20120721 23:21:19-!- MeccaGod [majs@host189-199.bornet.net] has quit [] 20120721 23:23:26-!- timotei [~timotei@wesnoth/developer/timotei] has quit [Read error: Connection reset by peer] 20120721 23:25:06-!- timotei [~timotei@wesnoth/developer/timotei] has joined #wesnoth-dev 20120721 23:25:08-!- un214 [~un214@108.221.231.209] has joined #wesnoth-dev 20120721 23:36:55-!- vultraz [~chatzilla@124.109.10.221] has quit [Ping timeout: 246 seconds] 20120721 23:37:04-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120721 23:40:10-!- janebot [grickit@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20120721 23:41:13< CIA-87> timotei * r54813 /trunk/src/game.cpp: Move the --preprocess command's logic into a separate function 20120721 23:41:16< CIA-87> timotei * r54814 /trunk/src/ (game.cpp serialization/preprocessor.cpp): 20120721 23:41:16< CIA-87> Set the std::ios::failbit exception when preprocessing a resource. Fixes bug #19335 20120721 23:41:16< CIA-87> This is needed in order for the preprocessor's thrown 20120721 23:41:16< CIA-87> exceptions to reach our code and not be caught inside 20120721 23:41:17< CIA-87> STL's stream implementation. 20120721 23:57:05< timotei> Good night 20120721 23:57:05-!- timotei [~timotei@wesnoth/developer/timotei] has quit [Quit: SIGKILL] --- Log closed Sun Jul 22 00:00:49 2012