Wednesday, 2011-10-26

*** tpb has joined #freeorion00:00
fixIthey lethu right now my working directory is set to ($Projectdir) I am trying right now to change it to my output folder. is that right or where should it point...maybe to the top of everything?00:57
fixItthis is my structure atm "C:/Users/Greg/Desktop/Free Orion/Free Orion/msvc2010/FreeOrion/freeorion.sln"01:00
fixItOkay i just read some msdn doc on that and it says to set it to where the app is lauched from so it would be where the binary is from. I havent tried this yet but i will soon, thank you lethu for the help. There are so many things I dont know about VS lol01:09
GeofftheMediofixit: try Working Directory set to $(TargetDir)02:09
*** lethu has quit IRC02:15
CIA-29FreeOrion: geoffthemedio * r4441 /trunk/FreeOrion/python/PythonUniverseWrapper.cpp: Exposed Universe's linearDistance, jumpDistance, and systemsConnected functions in Python API.02:16
fixIthmm setting it to to output dir didnt work and i just tried $(TargetDir) and I am getting unable to start C:\users.......etcetc.../GiGi.dll02:16
GeofftheMedioagain: change startup project to freeorion02:19
GeofftheMedioand change the working directory of the freeorion project specifically02:19
*** GeofftheMedio has quit IRC02:19
*** lethu has joined #freeorion02:29
*** GeofftheMedio has joined #freeorion02:37
fixItwhoops forgot i reset everything got it as start up again now. ok its acting similar so i stepped into the instance and now i got a new error so were making some progress lol main() caught exception(GG::Font::BadFile): Face object created from "C:\Users\Greg\Desktop\Free Orion\FreeOrion\default\DejaVuSans-Bold.ttf" was invalid02:37
fixItsomething to note now it will display this try to lauch freeorion then it will quickly exit then it tries to do this with the same error multiple times02:38
fixItwhereas before freeorion would open up once close and show the error then it was over02:38
fixItweird it actually is from what i can tell doing the same thing opening/closing really fast when i lauch it from outside of visual studio now as well i dont have a chance to read the error but i believe it looks like the same one02:51
fixIti took dejavu bold out of the default folder then tried and it made no difference i still get the same error02:53
GeofftheMediotry deleting your config.xml03:28
*** STalKer-X has joined #freeorion03:38
*** STalKer-Y has quit IRC03:40
*** STalKer-X has quit IRC04:01
*** STalKer-X has joined #freeorion04:06
dansanHey, I want to make sure the Python AI is working (since I built it with Python 3.2).  Is there a debug mode or way to spy on the AI to make sure it's doing things?04:09
dansanI know looking through the AI debug log is probably better, but there's a lot of info in here :)04:10
GeofftheMediostart a game with the species super testers04:10
dansanahh, thanks!04:10
GeofftheMedioyou might need to remove the comment lines from species.txt that surround the las ttwo entries04:10
GeofftheMediothe /* and */  I think04:10
dansanok04:10
dansanaww, they're just sitting there :(04:16
dansanbut no error messages in the log files04:16
GeofftheMediowhat do the AI log files contain?04:17
GeofftheMedioand are they actually produced by your latest build, and not the installed version?04:17
dansanyeah, latest build, although I haven't pulled and rebuilt (or updated from svn) in a day04:18
dansanthey are 1.8 MB long for 9 turns, I'll compress one for you04:18
GeofftheMedioI mean are you sure the log files weren't left over from a previous game with an old build?04:18
GeofftheMedioif they're not moving, but the og files are long, they're probably old04:19
dansanhttp://loudmouth.javamonger.org/freeorion/AI_1.log.gz04:19
tpb<http://ln-s.net/9Fii> (at loudmouth.javamonger.org)04:19
dansanoh yeah, I cleaned them prior04:20
GeofftheMedioright at the start it says04:20
GeofftheMedio2011-10-25 23:14:24,890 ERROR AI : Unable to redirect Python stdout and stderr.04:20
GeofftheMedioso you won't get any error messages04:21
dansanahh!04:21
dansanthanks04:21
dansanfor some reason, I looked for a lower case "error", sorry :)04:21
dansanSo I should probably just build boost against Python 2.7 and use that.  I don't want to change my system default for Python, so I'll just need to figure that one out04:23
dansanI'm using Gentoo, it can get messy sometimes04:23
GeofftheMediocan you open up the python 3.0 interpreter and type some stuff in for me?04:23
dansansure04:23
GeofftheMedioimport sys04:23
dansanthere04:23
GeofftheMedioclass debugLogger:04:23
GeofftheMedio  def write(self, stng):04:23
dansanIndentationError: expected an indented block04:24
dansanrather, this came first: File "<stdin>", line 204:24
dansandef write(self, stng):04:24
GeofftheMediodid you type the "  " before def?04:24
dansanlol! oops :)04:24
dansanok :)04:24
dansanthere's more then I presume :)04:25
GeofftheMedioyes04:25
GeofftheMedioopen PythonAI.cpp04:25
GeofftheMedioI'm telling you to do this, not to type it04:25
GeofftheMedioand go to line 21604:25
GeofftheMediothat's the Python script that redirects standard out and error in Python to the FreeOrion logger system04:25
dansanoh, lol!04:25
GeofftheMediowhich is not working with your Python 3.204:26
dansanok, let me get the quotes out of it04:27
GeofftheMediothe import freeorion stuff won't work in the interpreter04:27
GeofftheMedioso remove the calls to it04:27
GeofftheMedioand just have those functions do something irrlivant... like x = 504:27
GeofftheMedioand then try assigning them to stdout and stderr as below04:28
GeofftheMedioor just put04:28
GeofftheMedioclass debugLogger:04:28
GeofftheMedio  def write(self, stng):04:28
GeofftheMedio    pass04:28
dansanok04:29
dansanhmm, invalid syntax, let me try again04:30
dansanhttp://pastebin.com/nCJ2B4Mh04:32
tpbTitle: class debugLogger: def write(self, stng): x = 1 sys.stdout = debugLogge - Pastebin.com (at pastebin.com)04:32
GeofftheMedioimport sys at the top04:32
GeofftheMedioand replace the x = 1 with pass04:32
dansanahh04:33
dansansame error04:33
GeofftheMediook, well, search online to figure out how to access standard out in python 3 since apparently the python 2.7 method doesn't work04:34
dansanactually, maybe I'm doing something else wrong here. it seems to interpret it as different text chunks: http://pastebin.com/pwBN6rQR04:34
tpbTitle: $ python Python 3.2.2 (default, Sep 18 2011, 05:30:47) [GCC 4.4.5] on linux2 - Pastebin.com (at pastebin.com)04:34
dansanstarted a fresh interpreter to make sure04:35
GeofftheMediohit enter twice after pass before typing more04:35
dansanahhh!04:35
dansansorry, I know nothing about python :(04:35
dansanok, it took that :)04:36
dansanso maybe just add the extra carriage return in PythonAI.cpp then04:36
dansan?04:36
GeofftheMediodoubtful04:38
GeofftheMedionow try04:38
GeofftheMedioprint("test!!!")04:38
dansanhehe, sorry, I got ahead of myself and already closed the interpter.  So did it again and no error when I do print("test!!!")04:40
GeofftheMediowhat does happen when you do print("test") ?04:41
dansanno output04:41
dansanbut that's what we want right?04:41
GeofftheMedioyes04:41
dansanhurray!04:41
GeofftheMedioexcept it doesn't explain why it doesn't work in FO04:41
GeofftheMediooh04:42
GeofftheMediowait04:42
GeofftheMediotry changing PythonAI.cpp line 26604:42
dansanok, will do04:42
GeofftheMedioby putting () around the ' '04:42
dansanoh!04:42
dansanin the print statement, right?04:42
GeofftheMedio...04:42
dansanok, I lost my previous build files for GiGI and I had to rebuild it.  building FO now04:49
dansanaww, I guess some header files changed. It's doing the whole world04:49
dansanI'll let you know how it turns out in a bit :)04:49
GeofftheMedioin the mean time, you might go through all the .py files and wrap the parameters to print commands in () since you'll need that done for them to work04:50
dansanahh, ok04:50
dansanwhew, build finished, but just have two python files left now05:02
dansanok, let me double check them05:06
dansanif I was more comfortable with regular expressions, I could have just used that05:06
dansanhmm, I know how to do that on perl too, oh well05:06
dansanhmm, same error: Unable to redirect Python stdout and stderr05:11
dansanI'll look it up05:11
GeofftheMediolook what up?05:12
dansanoh, how to redirect stdout in python 305:13
dansanI'm guessing they changed something with it05:13
GeofftheMediodoubtful, since the interpreter test worked fine05:13
dansanahhh05:13
GeofftheMediowhat is your line 226 ?05:13
dansan"class errorLogger:\n05:14
dansanmissed last double quote05:14
GeofftheMediothat's line 22105:14
dansanno, it's 226 on mine.  svn diff shows no changes05:15
dansanI'm on the trunk05:16
GeofftheMediohttp://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/FreeOrion/AI/PythonAI.cpp?revision=4441&view=markup05:16
tpbTitle: SourceForge.net Repository - [freeorion] Contents of /trunk/FreeOrion/AI/PythonAI.cppSourceForge.net Repository - freeorion Index of / (at freeorion.svn.sourceforge.net)05:16
GeofftheMediocheck line 22605:16
GeofftheMedioyou've got a messed up file, or something...05:17
dansanhmmm05:17
dansanwierd05:17
dansanmaybe I'll delete it and have subversion restore it05:17
dansanthat's strange05:17
GeofftheMediowhatever; what is your version of that line?05:17
dansanor my IDE is messed up05:17
dansanyeah, it has the parethesis05:18
GeofftheMediopaste it05:18
dansan"print ('Python stdout and stderr redirected')";05:18
dansanhah! it's not unmodified, I must have typed something wrong.  I have my macro for compiling with python 3.x added to it05:19
dansanmore specifically, here's my diffs: http://pastebin.com/wPXNbPWB05:20
tpbTitle: Index: PythonAI.cpp =========================================================== - Pastebin.com (at pastebin.com)05:20
GeofftheMediothat preprocessor stuff looks dangerous.  You'd be better to put an ifdef around the call to the initialization function05:22
dansanok, that'll work too05:22
dansanwait, ifdef wont work I don't think.  How about I just use an if block to call either set of funtions in the PythonAI constructor?05:24
GeofftheMediowhy won't ifdef work?05:25
GeofftheMedioif most likely won't work because in either case, one of the two symbols won't be defined05:25
dansanI don't think initfreeOrionLogger is a pre-processor macro when boost creates it with python 2.x05:25
dansanI mean, I think it uses macros to create their declaration, but those names aren't macros05:26
dansanyeah05:26
dansanI know, we'll just do the whole thing and call freeOrionLogger.log("hello") to see if the problem is it not getting initialized05:28
dansanhmm, I think it's supposed to call "init_module_" + "module_name"05:33
CIA-29FreeOrion: geoffthemedio * r4442 /trunk/FreeOrion/AI/PythonAI.cpp: Tweaked hard-coded Python script in PythonAI.cpp to hopefully be Python 3.x compatible. (Untested)05:33
dansanI hope you like my crappy, no-good patches :)05:34
GeofftheMediothat's not a you patch05:34
dansanhehe05:36
dansanHurray! calling init_module_freeOrionLogger() throws an exception now :)05:36
dansanwell, one of them throws, not sure which, I'll play with it a bit more, but I gotta get to sleep earlier 2nite :(05:38
GeofftheMediowhat did you change to make that happen?05:45
dansanI called init_module_freeOrionLogger() and init_module_freeOrionAIInterface() instead of the PyInit_05:46
dansanI'm just fighting with cmake now.  I want to build PythonAI.cpp with no optimizations, but the rest with the mild optimizations05:47
dansanbuild systems hate when you want to do stuff like that05:47
dansanWhen I worked on Glest, my debug build always compiled the pathfinder with full optimizations because it was so slow05:48
* dansan blushes05:56
dansanI've been ignoring these errors to my stderr at the console:05:56
dansanAttributeError: 'NoneType' object has no attribute 'prepareForSave'05:56
dansanAttributeError: 'NoneType' object has no attribute 'generateOrders'05:56
* dansan chuckles nerviously05:57
GeofftheMediothat's due to the freeorion AI interface not being initialized06:03
dansanyeah06:07
dansansorry, would have realized that sooner if I had read it06:07
dansangames in development so frequently spit out odd error messages that don't mean anything that I got into the habit of ignoring them, not so good all of the itme06:07
dansan*time06:08
dansanI'm not finding good docs on why the change from init<modname> to init_module_<modname> or PyInit_<modname>, but I might have to pick this one up another day06:09
GeofftheMedioa thought:06:13
dansanReading about the Boost patch that changed this: http://www.mail-archive.com/[email protected]/msg01992.html06:14
GeofftheMediodid you build python yourself?06:14
tpb<http://ln-s.net/9FjF> (at www.mail-archive.com)06:14
dansanuh, well yes and no.  It's Gentoo, so everything that's installed is built locally06:14
dansanBut it's an automated process06:14
dansanthere could be some option that was possibly disabled though, let me check my USE flags06:14
GeofftheMediowell, just make sure the versions of Python that boost was built against is the same as FO.  And if there's any system libraries, that they're consistent06:15
GeofftheMediodoesn't sound like it'll be an issue for you06:15
dansanI think I check that already (it's a common problem on Gentoo)06:15
GeofftheMediobut I had to build Python myself on Windows since the download had a dependency on a different version of the Visual C++ runtiem06:15
dansanahh06:16
dansanSince, on Gentoo, everything is built locally, broken dependencies are a part of almost every single upgrade!  There's a script that finds them and forces those broken packges to rebuild against the newer version of their dependencies06:16
dansanI should check it anyway06:17
dansanI can't say how many times I've worked on tracking down the cause of some bug, only to find out it was a system issue :(06:18
dansanwow, ostream (at least on GNU STL) has no operator<<(const char *) overload.  All of the Logger().debugStream() << calls that get a const char * print the address.  I'm going to wrap these in std::string()s06:41
*** StrangerDanger has quit IRC06:41
dansanwierd06:41
GeofftheMedioit shouldn't need one; it should auto-convert to string, I think...06:42
dansanohhh!06:42
dansanthat's the problem06:42
dansanPy_GetVersion, et al. are retrning wchar_t*06:43
dansancould be part of the problem :)06:43
GeofftheMediois that new in 3.x?06:44
GeofftheMedioin 2.7 they return const char *06:44
dansanyeah and even the docs say it should return const char*.  It's sounding to me like a local issue maybe06:44
*** VargaD has joined #freeorion06:45
dansanok, well Py_GetVersion is returning const char*, but Py_GetPrefix and Py_GetPath are returning const *wchar_t06:54
dansanyeah, that's one of the changes alright: 2.7 - http://docs.python.org/c-api/init.html and 3.3 - http://docs.python.org/dev/c-api/init.html06:55
tpbTitle: Initialization, Finalization, and Threads Python v2.7.2 documentation (at docs.python.org)06:55
GeofftheMediowrap in std::string?06:56
dansanit makes sense.  Some people use UTF-8, which I think is compatible with const char*, but in some countries, their filesystem will use wide charactors06:57
dansanoh, no, sorry, I misunderstood that06:57
GeofftheMedioFO does have issues with non-latin characters in pathes06:57
dansanyou're ahead of most people there :)06:58
GeofftheMediohaving a problem is a step ahead?06:59
dansanoh! I thought you said "doesn't"06:59
dansansorry, I must be tired06:59
dansanThe Glest subversion tree used to have files with non-English characters in it, and that always caused me problems it seemed.  But it makes sense for people who read & write in other languages that they would want to use their own language for their file names07:00
GeofftheMedioreal problem is with windows user names07:08
GeofftheMediowhich show up in the path to user directories07:09
dansanahhh!07:09
dansanWell they do it on Linux as well07:09
dansannot sure about user names, but in file systems they do07:09
*** VargaD has quit IRC07:42
dansanok, so I put the PyErr_Print() in all of the catch statements and it appears that in Boost.Python with Python 3.x, we're supposed to call the PyInit_ instead of init_module_.  When I call init_module_, the exception is because some Boost.Python property isn't defined (specifically "__dict__").  However, this is my output now:http://pastebin.com/vdhXjzqa07:47
tpbTitle: Here's my output starting a new game. (I always get the error messages about jac - Pastebin.com (at pastebin.com)07:47
dansanoh, I see that the __dict__ is from FO code, my mistake07:49
GeofftheMedio__dict__ is a property of the main python namespace07:57
dansanok07:57
*** em3 has joined #freeorion08:00
dansanwell, I'll just build 1.46 using python 2.7 for now and use that08:01
GeofftheMedioyou might try asking in the boost irc channel08:05
dansanyeah, they are all asleep :(08:05
dansanwell, there's a few people, I should try again08:06
*** VargaD has joined #freeorion09:59
fixItGeoff! I deleted the config.xml and I now can debug freeorion from inside VS!! Thanks Geoff and lethu for the help.11:15
GeofftheMedio...11:16
fixItSo I guess the main problems were setting the start up project/working project and then deleting the config.xml if it got corrupted. Now I can finally test removing the font from the default lol.11:21
GeofftheMedionot corrupted; just pointing to the wrong location11:21
fixItAhh okay well I'm glad we got it fixed11:23
CIA-29FreeOrion: geoffthemedio * r4443 /trunk/FreeOrion/UI/TechTreeWnd.cpp:11:24
CIA-29FreeOrion: -Fixed the tech tree view resetting whenever a tech was added or removed from the queue.11:24
CIA-29FreeOrion: -Grooming11:24
CIA-29FreeOrion: geoffthemedio * r4444 /trunk/FreeOrion/ (Empire/Empire.cpp util/Order.cpp): Trivial grooming11:25
CIA-29FreeOrion: geoffthemedio * r4445 /trunk/FreeOrion/UI/ResearchWnd.cpp:11:27
CIA-29FreeOrion: -Reworked when the ResearchWnd causes TechTreeWnd layout updates: instead of always doing so in response to an add / remove / drag user action, do so in response to research queue changed signals.11:27
CIA-29FreeOrion: -Grooming11:27
*** __alex has joined #freeorion11:48
*** em3 has quit IRC13:16
*** guini has quit IRC14:39
*** guini has joined #freeorion14:40
*** rmentat has joined #freeorion15:08
*** Farmer_ has quit IRC15:32
*** em3 has joined #freeorion15:56
*** __alex has quit IRC16:30
*** rmentat has left #freeorion16:45
*** StrangerDanger has joined #freeorion16:46
*** Farmer_ has joined #freeorion16:50
*** Xenux has joined #freeorion18:36
Xenuxbonjour à tous18:36
GeofftheMediorather presumptive...18:37
GeofftheMediomight be nuit for some...18:37
*** Xenux has quit IRC19:07
*** em3 has quit IRC19:44
*** StrangerDanger has quit IRC20:18
*** VargaD has quit IRC22:09

Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!