SDL/SDK branch status and test builds

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: SDL/SDK branch status and test builds

#16 Post by Vezzra »

I tried to build and run the SDL/SDK branch on OSX after Geoff had merged trunk. I had to fix a few things in the Xcode project, and also had to fix build errors with GG. The culprit turned out to be GG/Base.h, the changes that came in with the merge broke building on OSX. The GG/Base.h version of the branch prior to the merge used to work on all platforms (AFAIK), and actually made dealing with special cases for the different platforms obsolete, as we switched to use glew on all platforms. So, assuming that the changes introduced by the merge actually reverted this better solution back to something we did in trunk which hadn't the fixes of the SDK/SDL branch, I tried building with the reverted GG/Base.h, which not only solved the build errors on OSX, but also built and run fine on Windows.

So I decided to be bold, went ahead and committed these fixes. Should my reasoning turn out to be wrong, the fix to GG/Base.h should be easy enough to undo.

I can run FO on Windows, however, I get a crash on OSX, a failing assertion:

Code: Select all

Assertion failed: (px != 0), function operator->, file /Users/user/SoftwareProjekte/FO/sdk/Xcode/dep/include/boost/smart_ptr/shared_ptr.hpp, line 648.
Backtrace attached.
Attachments
backtrace.txt.zip
(16.06 KiB) Downloaded 71 times

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: SDL/SDK branch status and test builds

#17 Post by Vezzra »

Geoff the Medio wrote:The SVN version of the SDL/SDK branch now has most changes from the posted patch integrated. I might have missed some stuff, but it at least starts up and can play a few turns without major errors apparent.
Without apparent errors? That's strange... when I built and ran the SDL/SDK branch on Windows (without my fixes to GG/Base.h, clean build of the checkout), I could run FO and start a game, even play a few turns, right - but I had an immediate obvious error regarding the chat/message windows and the pedia - the former stays empty all the time, in the latter I get either no text at all, or only some bits and pieces (the pedia index shows up only partially, all the sections with articles about game concepts missing, when I select one of the remaining categories, I get an empty window or just some headings). First, when no messages appeared in the chat/message window during game startup/universe generation, I even thought the game startup process got stuck somewhere, before the map finally appeared.

Do these windows display their contents normally with your build?

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: SDL/SDK branch status and test builds

#18 Post by Vezzra »

Oh, and before I forget: The AI seems to be broken too - it isn't doing anything. Probably due to this error:

Code: Select all

2015-02-15 18:57:03,940 ERROR AI : Traceback (most recent call last):
2015-02-15 18:57:03,940 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/FreeOrionAI.py", line 10, in <module>
2015-02-15 18:57:03,940 ERROR AI :     import AIstate
2015-02-15 18:57:03,940 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIstate.py", line 5, in <module>
2015-02-15 18:57:03,940 ERROR AI :     import AIFleetMission
2015-02-15 18:57:03,940 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIFleetMission.py", line 3, in <module>
2015-02-15 18:57:03,940 ERROR AI :     import AIFleetOrder
2015-02-15 18:57:03,940 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/AIFleetOrder.py", line 5, in <module>
2015-02-15 18:57:03,940 ERROR AI :     import MilitaryAI
2015-02-15 18:57:03,940 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/MilitaryAI.py", line 7, in <module>
2015-02-15 18:57:03,940 ERROR AI :     import PlanetUtilsAI
2015-02-15 18:57:03,941 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/PlanetUtilsAI.py", line 3, in <module>
2015-02-15 18:57:03,941 ERROR AI :     import ColonisationAI
2015-02-15 18:57:03,941 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/ColonisationAI.py", line 10, in <module>
2015-02-15 18:57:03,941 ERROR AI :     import ProductionAI
2015-02-15 18:57:03,941 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/ProductionAI.py", line 9, in <module>
2015-02-15 18:57:03,941 ERROR AI :     import PriorityAI
2015-02-15 18:57:03,941 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/PriorityAI.py", line 6, in <module>
2015-02-15 18:57:03,941 ERROR AI :     import ExplorationAI
2015-02-15 18:57:03,941 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/ExplorationAI.py", line 6, in <module>
2015-02-15 18:57:03,941 ERROR AI :     import MoveUtilsAI
2015-02-15 18:57:03,941 ERROR AI :   File "/Users/user/SoftwareProjekte/FO/sdk/Xcode/build/Test/FreeOrion.app/Contents/Resources/default/AI/MoveUtilsAI.py", line 9, in <module>
2015-02-15 18:57:03,941 ERROR AI :     from freeorion_tools import ppstring
2015-02-15 18:57:03,941 ERROR AI : ImportError: No module named freeorion_tools

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: SDL/SDK branch status and test builds

#19 Post by Geoff the Medio »

Vezzra wrote:The AI seems to be broken too - it isn't doing anything. Probably due to this error:
Added a few missing-from-trunk files...

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: SDL/SDK branch status and test builds

#20 Post by Geoff the Medio »

Vezzra wrote:Without apparent errors?
Apparent in the sense of immediately noticed when starting the game. I didn't look a the pedia or research screen, and didn't check on AIs. I didn't see any error messages from AIs, though I might have just not noticed them. I did not carefully test.

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: SDL/SDK branch status and test builds

#21 Post by Vezzra »

Geoff the Medio wrote:I didn't see any error messages from AIs, though I might have just not noticed them. I did not carefully test.
Well, I didn't see any error messages from the AIs in the chat/message window either, but that's probably because there hasn't been any text in there at all. The missing "Creating AI Clients" and "Generating universe" messages at game startup were quite obvious, the AI greeting messages were gone too, so I didn't expect AI error messages to show up there...

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: SDL/SDK branch status and test builds

#22 Post by Vezzra »

Apparently the modifications to the English stringtable that have been introduced by the revised colonization branch didn't make it in the SDL/SDK branch when trunk was merged. No idea why, because all the other stuff did (as it should, because the rev col branch had already been merged to trunk). Anyway, I reapplied those modifications and committed them.

I hope there isn't anything else that got mixed up that way... otherwise merging this branch back into trunk is going to be hell... :(

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: SDL/SDK branch status and test builds

#23 Post by Geoff the Medio »

Vezzra wrote:...all the sections with articles about game concepts missing...
I have this issue, and some other missing strings. Seems like the stringtable's still not properly updated with trunk changes. Fixing it with a diff is properly easier than attempting to port a specific range of revisions...

Edit: manual merging with diff seems to have restored the missing pedia index string changes.
First, when no messages appeared in the chat/message window during game startup/universe generation
I think these messages are appearing, but are in oddly dark text. Try making the window big and highlighting the first three rows...

Edit: I have some potential changes related to glew headers and win32 arising from moving files between the trunk and branch, but I'm not sure if any should be implemented... Could you look at the patch?

I also had some missing tech icons that needed to be copied from trunk...
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

missing tech icons
missing tech icons
missing_tech_icons.png (48.3 KiB) Viewed 1163 times
dark text messages
dark text messages
dark_text_messages.png (13 KiB) Viewed 1163 times

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: SDL/SDK branch status and test builds

#24 Post by Vezzra »

Good news, one of the changes you committed yesterday fixed the crash on OSX. Text display in pedia and chat/message window is also back to normal. At least on OSX (where I hadn't the chance to observe the issue though, due to the crash). I'm not at home now, only have my Mac with me, and I can only build, not run FO in my Win VM. So checking things on Windows will have to wait until today evening.
Geoff the Medio wrote:manual merging with diff seems to have restored the missing pedia index string changes.
Yep, looks good now.
I think these messages are appearing, but are in oddly dark text. Try making the window big and highlighting the first three rows...
That could have been it. Well, looks like you fixed it anyway, so case closed. :)
Edit: I have some potential changes related to glew headers and win32 arising from moving files between the trunk and branch, but I'm not sure if any should be implemented... Could you look at the patch?
With "look at the patch" I assume you mean test if the patch works for me? As far as OSX is concerned, I can build and run r7950 of the SDL/SDK branch fine now, with and without the patch. Doesn't make any difference, at least not on a quick first glance.

Building r7950 with and without the patch works on my Win VM too, I can test how well these builds run on my XP machine when I'm back home.

One thing I noticed when looking at the patch: Apparently these platform specific include constructs I reverted in GG/Base.h occur in several other places as well. Shouldn't it be possible to simplify them in those other places the same way?

Which brings me to another question, @Dilvish: How does r7950 work on Linux? Does it build and run, any issues?

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: SDL/SDK branch status and test builds

#25 Post by Vezzra »

Vezzra wrote:One thing I noticed when looking at the patch: Apparently these platform specific include constructs I reverted in GG/Base.h occur in several other places as well. Shouldn't it be possible to simplify them in those other places the same way?
Follow up: When I replace

Code: Select all

// include OpenGL headers
#if defined(__APPLE__) && defined(__MACH__)
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
#elif defined(_WIN32)
# include <GL/glew.h>
#else
# include <GL/gl.h>
# include <GL/glu.h>
#endif
with plain

Code: Select all

// include OpenGL headers
# include <GL/glew.h>
in ShaderProgram.h I can still build and run fine on OSX. So this "#if defined..." stuff isn't necessary, on OSX at least. Don't know about Linux, but I guess it should work there too. Dilvish?

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: SDL/SDK branch status and test builds

#26 Post by Dilvish »

Vezzra wrote:Don't know about Linux, but I guess it should work there too. Dilvish?
For me, GL/glew.h has an (apparently MacOS dependent) include for GL/glu.h, which in turn has an include for GL/gl.h, so it seems using just GL/glew.h should work out fine here as well.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: SDL/SDK branch status and test builds

#27 Post by Vezzra »

Vezzra wrote:Building r7950 with and without the patch works on my Win VM too, I can test how well these builds run on my XP machine when I'm back home.
Both builds run fine on my XP machine. The patch does not seem to make any difference.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: SDL/SDK branch status and test builds

#28 Post by Geoff the Medio »

Vezzra wrote:Good news, one of the changes you committed yesterday fixed the crash on OSX.
If you mean on the research screen, I'd guess it's related to the missing tech icons. You might want to investigate that, perhaps by deleting some and seeing if you can open that screen. Both default-visible, and icons visible only after adjusting filters could be tested.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: SDL/SDK branch status and test builds

#29 Post by Dilvish »

I just noticed this:
Vezzra wrote:@Dilvish: How does r7950 work on Linux? Does it build and run, any issues?
I had to make a few CmakeList.txt changes (committed). With that, most of the rest compiles fine, but I have a compile error with OgreGui.cpp:

Code: Select all

/home/FO/programs/freeorion_sdl/GG/src/Ogre/OgreGUI.cpp:68:1: error: prototype for ‘GG::OgreGUI::OgreGUI(Ogre::RenderWindow*, Ogre::Root*, const boost::filesystem::path&)’ does not match any in class ‘GG::OgreGUI’
 OgreGUI::OgreGUI(Ogre::RenderWindow* window, Ogre::Root* root,
 ^
In file included from /home/FO/programs/freeorion_sdl/GG/src/Ogre/OgreGUI.cpp:25:0:
/home/FO/programs/freeorion_sdl/GG/GG/Ogre/OgreGUI.h:121:7: error: candidates are: GG::OgreGUI::OgreGUI(const GG::OgreGUI&)
 class GG_OGRE_API OgreGUI :
       ^
/home/FO/programs/freeorion_sdl/GG/GG/Ogre/OgreGUI.h:130:14: error:                 GG::OgreGUI::OgreGUI(Ogre::RenderWindow*, const boost::filesystem::path&)
     explicit OgreGUI(Ogre::RenderWindow* window,
              ^
/home/FO/programs/freeorion_sdl/GG/src/Ogre/OgreGUI.cpp:136:63: error: no ‘std::vector<std::basic_string<char> > GG::OgreGUI::GetSupportedResolutions() const’ member function declared in class ‘GG::OgreGUI’
 std::vector< std::string > OgreGUI::GetSupportedResolutions() const {
I took a quick look at the code, but the solution was not immediately apparent to me. I don't know why I would encounter this but not you guys. Doing a clean build did not help.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: SDL/SDK branch status and test builds

#30 Post by Geoff the Medio »

Dilvish wrote:I took a quick look at the code, but the solution was not immediately apparent to me.
Remove the file from the build; a major point of this branch is converting to using SDL.

Post Reply