Now about that segfault bug:
The weapontype vector is populated by the following line in game.cpp:
xml_loaded_ok&=populate_from_xml(weapontype,"weapons.xml",xmllog);
This populate_from_xml() function is declared and implemented in game.cpp. It is a template function (a fancy C++ thingie). So when it's called on weapontype, it is called on the type "vector<WeaponType *>". The key line from it is this:
while(xml.FindElem()) types.push_back(new Type(xml.GetSubDoc()));
In the case of WeaponType, it calls the WeaponType constructior on the XML data, and then pushes it back to the weapontype vector (adding a new element to the end of the vector, and the vector can be addressed similarly to an array).
So then the thing to look at next would be the WeaponType constructor for XML data. It is the very first function in /items/weapontype.cpp.
Most likely there is some error in your XML code in /art/weapons.xml that this WeaponType constructor cannot interpret properly.
The XML parsing itself is done by the CMarkup class although it is quite a well-written class used by many different projects and we do not ever modify the code for it, we just use the latest version of it. We don't modify the code for PDCurses or ncurses or SDL2 or SDL2_mixer either.
Oh, and for every attack listed for a weapon, the WeaponType constructor calls the attackst constructor and adds it as an attack with a given priority and such. So the attackst constructor, also in /items/weapontype.cpp, also needs to be looked at.
Also of course game.cpp, weapon.cpp, weapon.h, item.cpp, item.h, itemtype.cpp, itemtype.h, creature.cpp, and creature.h (as well as other .cpp and .h files in the /creature directory) need to be looked at too, along with weapontype.cpp and weapontype.h, I think.
And also the skill_string_to_enum() function in /common/stringconversion.cpp too, which handles the skill strings in the XML.
Anyway I can't see what the problem is yet. Just by eyeballing the code, both your XML code and the code that parses and deals with it, I don't see anything wrong.
Now I did notice some of your description strings in the XML are rather long, longer than for other weapons. This SHOULDN'T be a problem, since the relevant classes such as WeaponType use std::strings which can handle any length string.
HOWEVER, there are fixed-length C-strings in the game. I am starting to suspect the cause of this segfault bug is, one of your weapon description strings for what happens when you use it or something like that is too long for a fixed-length C-string used somewhere else in the game where weapons are used. Since segfaults occur during character creation of a new character with superpowers, we'll need to examine creature.cpp and creature.h and other .cpp and .h files in the /creature directory to see if they use C-strings for this type of stuff.
Also I can't use the GDB GNU debugger to find the source of this bug. Why? Because GDB, for some reason, changes the number of rows PDCurses can use from 25 to 24 leaving the 25th row of the screen empty and stuff that should go there goes on the 24th row instead and this causes problems when I try debugging in Code::Blocks on Windows using GDB (the debugger to use with stuff compiled with GCC). Among other things, entering a name for a character doesn't work at all when debugging using GDB... not just in Terra Vitae but the vanilla game too... because PDCurses behaves differently when it is run inside a debugger. This is a real pain in the arse and prevents me from being able to use a debugger. And I can't find anything wrong with the code when I eyeball it, looking for the cause of the segfault.
Looks like you're having better luck getting to the cause of the segfault anyway. I bet your debugger doesn't have that problem, since on UNIX-based systems you use ncurses, not PDCurses, and ncurses probably doesn't have this odd behavior like PDCurses does (24 rows on the screen instead of 25, and entering a name being broken), when run inside a debugger. Maybe PDCurses when it is being run in a debugger reserves the bottom line of the screen for debugging messages, so if I temporarily changed the number of lines on the screen from 25 to 26 just when I am debugging, this
could maybe fix the 25th line not working when run inside a debugger. I am not sure if PDCurses also does this in MS Visual C++'s debugger. Probably a 50/50 chance of that.
Anyway, make sure you are using the SVN revision 852 merge with Terra Vitae 0.11 that I uploaded in the previous comment as your codebase please. It doesn't have this bug fixed since I have no idea the cause of this bug. But it has plenty of other stuff fixed and improved.
Here is the download link again:
https://www.sendspace.com/file/0we666. That link will expire in 30 days on October 18, 2014, you have 30 days to download it and then that file will disappear from that site. Please be sure and get it and use it as the basis for all your future coding on this mod, I put a lot of work into it.