Can be a real pain!
Ryzom Core Studio is a cross platform tool, the entire point of creating it was to move away and get free of the shackles of Windows as the old Ryzom tools were written with MFC.
Unfortunately two of it’s plugins kept triggering an assert when loaded together.
As it turns out the source of the problem was that GCC and Visual Studio link libraries differently:
Ryzom is built on Nel the Nevrax libraries. One of these libraries is the LIGO library, which is basically a data library. Also Nel uses a quite powerful (de)serialization system which is based on an abstract object factory, which is implemented using static methods and static member variables. What’s also important that these Nel libraries are linked statically right now.
Unfortunately as it turns out it behaves differently depending on which compiler built it: GCC or Visual Studio.
When building with Visual Studio each plugin gets it’s own instance of the static variables, while with GCC they share the same one.
So when the LIGO library is started up, it registers it’s classes. When the first plugin that uses it loads there’s no problem, but with the second an assert is triggered because those classes have already been registered.
In this case solving this problem was fairly simple: Since those plugins use their own LIGO configs ( a context object of sorts ), guarding against multiple registrations was enough.
So after some procastination and hesitation finally I’ve given in and started reading this book that is not only famous, but rightfully part of the basic literature on the topic.
I’ve known some of these patterns for a long time, but the book is still a quite nice read, it’s giving me a brand new perspective on these patterns.
I highly recommend it to everyone.
So I’ve done the following:
Renamed and moved out toolset which used to be called OVQT.
Now it’s called Ryzom Core Studio, and resides in it’s own directory ( studio ) in the main source code directory.
Implemented a general settings dialog that shows up on the first start of studio, so one can set the paths and whatnot that are needed for the various plugins to work.
Made plugins hot-load and unloadable so that they can be load/unloaded while studio is running ( obviously ).
I also improved the splash screen: Now it shows the startup progress with a progressbar and prints text messages as well.
Improved the GUI Editor’s usability by allowing various properties to be set using either a combobox ( the enum ones ), or a texture chooser, or a color picker instead of setting them as strings.
Added an UXT Editor widget to the Translation Manager plugin.
UXT files basically contain the translations to various GUI texts and messages. So it’s quite important!
Implemented the Tile Editor plugin: This plugin allows the creation of tilesets, which are used to paint land components.
Again quite important!
Implemented the form, DFN, and type editors for the Georges Editor plugin.
In short Georges is an XML database system created for Ryzom in the early 2000s. It contains data for the game.
It allows one to create custom types, organize the types into structure definitions ( DFN ) and put those structures into a form which can be filled in.
So this is really essential for Ryzom!
Created a node-based expression editor for the GUI Editor plugin. So that GUI expressions that GUI widgets depend on can be graphically created instead of typing.
Here’s an example for such an expression:
This is how it looks implemented:
I’ve been getting complaint about the Ryzom Core Studio GUI Editor plugin crashing instead of rendering what it should, so I did a little investigation. Apparently if you try to render OpenGL into a simple QWidget it will crash the driver ( at least the Intel one I have on my lappy ).
The solution: use QGLWidget instead of QWidget on Linux, even if you don’t use the rendering features of it.
The screen shows it working on my HP 6910p laptop, running XUbuntu 14.04.