*** tpb has joined #freeorion | 00:00 | |
fixIt | hey 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 |
---|---|---|
fixIt | this is my structure atm "C:/Users/Greg/Desktop/Free Orion/Free Orion/msvc2010/FreeOrion/freeorion.sln" | 01:00 |
fixIt | Okay 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 lol | 01:09 |
GeofftheMedio | fixit: try Working Directory set to $(TargetDir) | 02:09 |
*** lethu has quit IRC | 02:15 | |
CIA-29 | FreeOrion: geoffthemedio * r4441 /trunk/FreeOrion/python/PythonUniverseWrapper.cpp: Exposed Universe's linearDistance, jumpDistance, and systemsConnected functions in Python API. | 02:16 |
fixIt | hmm setting it to to output dir didnt work and i just tried $(TargetDir) and I am getting unable to start C:\users.......etcetc.../GiGi.dll | 02:16 |
GeofftheMedio | again: change startup project to freeorion | 02:19 |
GeofftheMedio | and change the working directory of the freeorion project specifically | 02:19 |
*** GeofftheMedio has quit IRC | 02:19 | |
*** lethu has joined #freeorion | 02:29 | |
*** GeofftheMedio has joined #freeorion | 02:37 | |
fixIt | whoops 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 invalid | 02:37 |
fixIt | something 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 times | 02:38 |
fixIt | whereas before freeorion would open up once close and show the error then it was over | 02:38 |
fixIt | weird 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 one | 02:51 |
fixIt | i took dejavu bold out of the default folder then tried and it made no difference i still get the same error | 02:53 |
GeofftheMedio | try deleting your config.xml | 03:28 |
*** STalKer-X has joined #freeorion | 03:38 | |
*** STalKer-Y has quit IRC | 03:40 | |
*** STalKer-X has quit IRC | 04:01 | |
*** STalKer-X has joined #freeorion | 04:06 | |
dansan | Hey, 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 |
dansan | I know looking through the AI debug log is probably better, but there's a lot of info in here :) | 04:10 |
GeofftheMedio | start a game with the species super testers | 04:10 |
dansan | ahh, thanks! | 04:10 |
GeofftheMedio | you might need to remove the comment lines from species.txt that surround the las ttwo entries | 04:10 |
GeofftheMedio | the /* and */ I think | 04:10 |
dansan | ok | 04:10 |
dansan | aww, they're just sitting there :( | 04:16 |
dansan | but no error messages in the log files | 04:16 |
GeofftheMedio | what do the AI log files contain? | 04:17 |
GeofftheMedio | and are they actually produced by your latest build, and not the installed version? | 04:17 |
dansan | yeah, latest build, although I haven't pulled and rebuilt (or updated from svn) in a day | 04:18 |
dansan | they are 1.8 MB long for 9 turns, I'll compress one for you | 04:18 |
GeofftheMedio | I mean are you sure the log files weren't left over from a previous game with an old build? | 04:18 |
GeofftheMedio | if they're not moving, but the og files are long, they're probably old | 04:19 |
dansan | http://loudmouth.javamonger.org/freeorion/AI_1.log.gz | 04:19 |
tpb | <http://ln-s.net/9Fii> (at loudmouth.javamonger.org) | 04:19 |
dansan | oh yeah, I cleaned them prior | 04:20 |
GeofftheMedio | right at the start it says | 04:20 |
GeofftheMedio | 2011-10-25 23:14:24,890 ERROR AI : Unable to redirect Python stdout and stderr. | 04:20 |
GeofftheMedio | so you won't get any error messages | 04:21 |
dansan | ahh! | 04:21 |
dansan | thanks | 04:21 |
dansan | for some reason, I looked for a lower case "error", sorry :) | 04:21 |
dansan | So 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 out | 04:23 |
dansan | I'm using Gentoo, it can get messy sometimes | 04:23 |
GeofftheMedio | can you open up the python 3.0 interpreter and type some stuff in for me? | 04:23 |
dansan | sure | 04:23 |
GeofftheMedio | import sys | 04:23 |
dansan | there | 04:23 |
GeofftheMedio | class debugLogger: | 04:23 |
GeofftheMedio | def write(self, stng): | 04:23 |
dansan | IndentationError: expected an indented block | 04:24 |
dansan | rather, this came first: File "<stdin>", line 2 | 04:24 |
dansan | def write(self, stng): | 04:24 |
GeofftheMedio | did you type the " " before def? | 04:24 |
dansan | lol! oops :) | 04:24 |
dansan | ok :) | 04:24 |
dansan | there's more then I presume :) | 04:25 |
GeofftheMedio | yes | 04:25 |
GeofftheMedio | open PythonAI.cpp | 04:25 |
GeofftheMedio | I'm telling you to do this, not to type it | 04:25 |
GeofftheMedio | and go to line 216 | 04:25 |
GeofftheMedio | that's the Python script that redirects standard out and error in Python to the FreeOrion logger system | 04:25 |
dansan | oh, lol! | 04:25 |
GeofftheMedio | which is not working with your Python 3.2 | 04:26 |
dansan | ok, let me get the quotes out of it | 04:27 |
GeofftheMedio | the import freeorion stuff won't work in the interpreter | 04:27 |
GeofftheMedio | so remove the calls to it | 04:27 |
GeofftheMedio | and just have those functions do something irrlivant... like x = 5 | 04:27 |
GeofftheMedio | and then try assigning them to stdout and stderr as below | 04:28 |
GeofftheMedio | or just put | 04:28 |
GeofftheMedio | class debugLogger: | 04:28 |
GeofftheMedio | def write(self, stng): | 04:28 |
GeofftheMedio | pass | 04:28 |
dansan | ok | 04:29 |
dansan | hmm, invalid syntax, let me try again | 04:30 |
dansan | http://pastebin.com/nCJ2B4Mh | 04:32 |
tpb | Title: class debugLogger: def write(self, stng): x = 1 sys.stdout = debugLogge - Pastebin.com (at pastebin.com) | 04:32 |
GeofftheMedio | import sys at the top | 04:32 |
GeofftheMedio | and replace the x = 1 with pass | 04:32 |
dansan | ahh | 04:33 |
dansan | same error | 04:33 |
GeofftheMedio | ok, well, search online to figure out how to access standard out in python 3 since apparently the python 2.7 method doesn't work | 04:34 |
dansan | actually, maybe I'm doing something else wrong here. it seems to interpret it as different text chunks: http://pastebin.com/pwBN6rQR | 04:34 |
tpb | Title: $ 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 |
dansan | started a fresh interpreter to make sure | 04:35 |
GeofftheMedio | hit enter twice after pass before typing more | 04:35 |
dansan | ahhh! | 04:35 |
dansan | sorry, I know nothing about python :( | 04:35 |
dansan | ok, it took that :) | 04:36 |
dansan | so maybe just add the extra carriage return in PythonAI.cpp then | 04:36 |
dansan | ? | 04:36 |
GeofftheMedio | doubtful | 04:38 |
GeofftheMedio | now try | 04:38 |
GeofftheMedio | print("test!!!") | 04:38 |
dansan | hehe, 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 |
GeofftheMedio | what does happen when you do print("test") ? | 04:41 |
dansan | no output | 04:41 |
dansan | but that's what we want right? | 04:41 |
GeofftheMedio | yes | 04:41 |
dansan | hurray! | 04:41 |
GeofftheMedio | except it doesn't explain why it doesn't work in FO | 04:41 |
GeofftheMedio | oh | 04:42 |
GeofftheMedio | wait | 04:42 |
GeofftheMedio | try changing PythonAI.cpp line 266 | 04:42 |
dansan | ok, will do | 04:42 |
GeofftheMedio | by putting () around the ' ' | 04:42 |
dansan | oh! | 04:42 |
dansan | in the print statement, right? | 04:42 |
GeofftheMedio | ... | 04:42 |
dansan | ok, I lost my previous build files for GiGI and I had to rebuild it. building FO now | 04:49 |
dansan | aww, I guess some header files changed. It's doing the whole world | 04:49 |
dansan | I'll let you know how it turns out in a bit :) | 04:49 |
GeofftheMedio | in 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 work | 04:50 |
dansan | ahh, ok | 04:50 |
dansan | whew, build finished, but just have two python files left now | 05:02 |
dansan | ok, let me double check them | 05:06 |
dansan | if I was more comfortable with regular expressions, I could have just used that | 05:06 |
dansan | hmm, I know how to do that on perl too, oh well | 05:06 |
dansan | hmm, same error: Unable to redirect Python stdout and stderr | 05:11 |
dansan | I'll look it up | 05:11 |
GeofftheMedio | look what up? | 05:12 |
dansan | oh, how to redirect stdout in python 3 | 05:13 |
dansan | I'm guessing they changed something with it | 05:13 |
GeofftheMedio | doubtful, since the interpreter test worked fine | 05:13 |
dansan | ahhh | 05:13 |
GeofftheMedio | what is your line 226 ? | 05:13 |
dansan | "class errorLogger:\n | 05:14 |
dansan | missed last double quote | 05:14 |
GeofftheMedio | that's line 221 | 05:14 |
dansan | no, it's 226 on mine. svn diff shows no changes | 05:15 |
dansan | I'm on the trunk | 05:16 |
GeofftheMedio | http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/FreeOrion/AI/PythonAI.cpp?revision=4441&view=markup | 05:16 |
tpb | Title: SourceForge.net Repository - [freeorion] Contents of /trunk/FreeOrion/AI/PythonAI.cppSourceForge.net Repository - freeorion Index of / (at freeorion.svn.sourceforge.net) | 05:16 |
GeofftheMedio | check line 226 | 05:16 |
GeofftheMedio | you've got a messed up file, or something... | 05:17 |
dansan | hmmm | 05:17 |
dansan | wierd | 05:17 |
dansan | maybe I'll delete it and have subversion restore it | 05:17 |
dansan | that's strange | 05:17 |
GeofftheMedio | whatever; what is your version of that line? | 05:17 |
dansan | or my IDE is messed up | 05:17 |
dansan | yeah, it has the parethesis | 05:18 |
GeofftheMedio | paste it | 05:18 |
dansan | "print ('Python stdout and stderr redirected')"; | 05:18 |
dansan | hah! it's not unmodified, I must have typed something wrong. I have my macro for compiling with python 3.x added to it | 05:19 |
dansan | more specifically, here's my diffs: http://pastebin.com/wPXNbPWB | 05:20 |
tpb | Title: Index: PythonAI.cpp =========================================================== - Pastebin.com (at pastebin.com) | 05:20 |
GeofftheMedio | that preprocessor stuff looks dangerous. You'd be better to put an ifdef around the call to the initialization function | 05:22 |
dansan | ok, that'll work too | 05:22 |
dansan | wait, 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 |
GeofftheMedio | why won't ifdef work? | 05:25 |
GeofftheMedio | if most likely won't work because in either case, one of the two symbols won't be defined | 05:25 |
dansan | I don't think initfreeOrionLogger is a pre-processor macro when boost creates it with python 2.x | 05:25 |
dansan | I mean, I think it uses macros to create their declaration, but those names aren't macros | 05:26 |
dansan | yeah | 05:26 |
dansan | I know, we'll just do the whole thing and call freeOrionLogger.log("hello") to see if the problem is it not getting initialized | 05:28 |
dansan | hmm, I think it's supposed to call "init_module_" + "module_name" | 05:33 |
CIA-29 | FreeOrion: 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 |
dansan | I hope you like my crappy, no-good patches :) | 05:34 |
GeofftheMedio | that's not a you patch | 05:34 |
dansan | hehe | 05:36 |
dansan | Hurray! calling init_module_freeOrionLogger() throws an exception now :) | 05:36 |
dansan | well, 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 |
GeofftheMedio | what did you change to make that happen? | 05:45 |
dansan | I called init_module_freeOrionLogger() and init_module_freeOrionAIInterface() instead of the PyInit_ | 05:46 |
dansan | I'm just fighting with cmake now. I want to build PythonAI.cpp with no optimizations, but the rest with the mild optimizations | 05:47 |
dansan | build systems hate when you want to do stuff like that | 05:47 |
dansan | When I worked on Glest, my debug build always compiled the pathfinder with full optimizations because it was so slow | 05:48 |
* dansan blushes | 05:56 | |
dansan | I've been ignoring these errors to my stderr at the console: | 05:56 |
dansan | AttributeError: 'NoneType' object has no attribute 'prepareForSave' | 05:56 |
dansan | AttributeError: 'NoneType' object has no attribute 'generateOrders' | 05:56 |
* dansan chuckles nerviously | 05:57 | |
GeofftheMedio | that's due to the freeorion AI interface not being initialized | 06:03 |
dansan | yeah | 06:07 |
dansan | sorry, would have realized that sooner if I had read it | 06:07 |
dansan | games 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 itme | 06:07 |
dansan | *time | 06:08 |
dansan | I'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 day | 06:09 |
GeofftheMedio | a thought: | 06:13 |
dansan | Reading about the Boost patch that changed this: http://www.mail-archive.com/[email protected]/msg01992.html | 06:14 |
GeofftheMedio | did you build python yourself? | 06:14 |
tpb | <http://ln-s.net/9FjF> (at www.mail-archive.com) | 06:14 |
dansan | uh, well yes and no. It's Gentoo, so everything that's installed is built locally | 06:14 |
dansan | But it's an automated process | 06:14 |
dansan | there could be some option that was possibly disabled though, let me check my USE flags | 06:14 |
GeofftheMedio | well, 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 consistent | 06:15 |
GeofftheMedio | doesn't sound like it'll be an issue for you | 06:15 |
dansan | I think I check that already (it's a common problem on Gentoo) | 06:15 |
GeofftheMedio | but I had to build Python myself on Windows since the download had a dependency on a different version of the Visual C++ runtiem | 06:15 |
dansan | ahh | 06:16 |
dansan | Since, 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 dependencies | 06:16 |
dansan | I should check it anyway | 06:17 |
dansan | I 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 |
dansan | wow, 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()s | 06:41 |
*** StrangerDanger has quit IRC | 06:41 | |
dansan | wierd | 06:41 |
GeofftheMedio | it shouldn't need one; it should auto-convert to string, I think... | 06:42 |
dansan | ohhh! | 06:42 |
dansan | that's the problem | 06:42 |
dansan | Py_GetVersion, et al. are retrning wchar_t* | 06:43 |
dansan | could be part of the problem :) | 06:43 |
GeofftheMedio | is that new in 3.x? | 06:44 |
GeofftheMedio | in 2.7 they return const char * | 06:44 |
dansan | yeah and even the docs say it should return const char*. It's sounding to me like a local issue maybe | 06:44 |
*** VargaD has joined #freeorion | 06:45 | |
dansan | ok, well Py_GetVersion is returning const char*, but Py_GetPrefix and Py_GetPath are returning const *wchar_t | 06:54 |
dansan | yeah, 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.html | 06:55 |
tpb | Title: Initialization, Finalization, and Threads Python v2.7.2 documentation (at docs.python.org) | 06:55 |
GeofftheMedio | wrap in std::string? | 06:56 |
dansan | it makes sense. Some people use UTF-8, which I think is compatible with const char*, but in some countries, their filesystem will use wide charactors | 06:57 |
dansan | oh, no, sorry, I misunderstood that | 06:57 |
GeofftheMedio | FO does have issues with non-latin characters in pathes | 06:57 |
dansan | you're ahead of most people there :) | 06:58 |
GeofftheMedio | having a problem is a step ahead? | 06:59 |
dansan | oh! I thought you said "doesn't" | 06:59 |
dansan | sorry, I must be tired | 06:59 |
dansan | The 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 names | 07:00 |
GeofftheMedio | real problem is with windows user names | 07:08 |
GeofftheMedio | which show up in the path to user directories | 07:09 |
dansan | ahhh! | 07:09 |
dansan | Well they do it on Linux as well | 07:09 |
dansan | not sure about user names, but in file systems they do | 07:09 |
*** VargaD has quit IRC | 07:42 | |
dansan | ok, 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/vdhXjzqa | 07:47 |
tpb | Title: Here's my output starting a new game. (I always get the error messages about jac - Pastebin.com (at pastebin.com) | 07:47 |
dansan | oh, I see that the __dict__ is from FO code, my mistake | 07:49 |
GeofftheMedio | __dict__ is a property of the main python namespace | 07:57 |
dansan | ok | 07:57 |
*** em3 has joined #freeorion | 08:00 | |
dansan | well, I'll just build 1.46 using python 2.7 for now and use that | 08:01 |
GeofftheMedio | you might try asking in the boost irc channel | 08:05 |
dansan | yeah, they are all asleep :( | 08:05 |
dansan | well, there's a few people, I should try again | 08:06 |
*** VargaD has joined #freeorion | 09:59 | |
fixIt | Geoff! 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 |
fixIt | So 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 |
GeofftheMedio | not corrupted; just pointing to the wrong location | 11:21 |
fixIt | Ahh okay well I'm glad we got it fixed | 11:23 |
CIA-29 | FreeOrion: geoffthemedio * r4443 /trunk/FreeOrion/UI/TechTreeWnd.cpp: | 11:24 |
CIA-29 | FreeOrion: -Fixed the tech tree view resetting whenever a tech was added or removed from the queue. | 11:24 |
CIA-29 | FreeOrion: -Grooming | 11:24 |
CIA-29 | FreeOrion: geoffthemedio * r4444 /trunk/FreeOrion/ (Empire/Empire.cpp util/Order.cpp): Trivial grooming | 11:25 |
CIA-29 | FreeOrion: geoffthemedio * r4445 /trunk/FreeOrion/UI/ResearchWnd.cpp: | 11:27 |
CIA-29 | FreeOrion: -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-29 | FreeOrion: -Grooming | 11:27 |
*** __alex has joined #freeorion | 11:48 | |
*** em3 has quit IRC | 13:16 | |
*** guini has quit IRC | 14:39 | |
*** guini has joined #freeorion | 14:40 | |
*** rmentat has joined #freeorion | 15:08 | |
*** Farmer_ has quit IRC | 15:32 | |
*** em3 has joined #freeorion | 15:56 | |
*** __alex has quit IRC | 16:30 | |
*** rmentat has left #freeorion | 16:45 | |
*** StrangerDanger has joined #freeorion | 16:46 | |
*** Farmer_ has joined #freeorion | 16:50 | |
*** Xenux has joined #freeorion | 18:36 | |
Xenux | bonjour à tous | 18:36 |
GeofftheMedio | rather presumptive... | 18:37 |
GeofftheMedio | might be nuit for some... | 18:37 |
*** Xenux has quit IRC | 19:07 | |
*** em3 has quit IRC | 19:44 | |
*** StrangerDanger has quit IRC | 20:18 | |
*** VargaD has quit IRC | 22:09 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!