Custom starship meshes causing crashes

This is the location for all mods to collaborate. Anyone making or planning their own mod should post help requests, screen shots and news here.

Moderators: Omega, tillias, Mod Contributor

Post Reply
w03
Mercenary
Mercenary
Posts: 125
Joined: Sat Apr 11, 2009 1:47 am

Custom starship meshes causing crashes

Post by w03 »

Hello- I've been trying to add custom starships for the past couple of days, but whenever I go to buy them there's problems. As soon as I click on "Hangar", the game crashes. Switching out the mesh for one that's already in the game stops the crashing. I'm running the latest SVN.

I tried adding the custom vessels to faction_ships.py, and there aren't any apparent problems with the vessels or the meshes when they generate. Stranger yet, using the old Koala mesh from 0.5.1 also makes it crash in the hangar.

A super old model I made on an earlier version of Blender works fine... perhaps my export settings are wrong? I am using -Y up/Z forward, apply modifiers, include edges, write normals, include UVs, write materials, objects as OBJ objects, and path mode set to "auto".

Thanks :D

EDIT: Here's the log files with the higher level debug settings.
stderr.txt is here https://drive.google.com/file/d/0B9DQMD ... sp=sharing
stdout.txt is here https://drive.google.com/file/d/0B9DQMD ... sp=sharing
Last edited by w03 on Thu Jun 11, 2015 7:58 pm, edited 1 time in total.
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

Hello !
EDIT: stderr.txt and stdout.txt are here: https://titanpad.com/PAh9AlLqm4
good idea .
I suggest to you to go to the config file in " general" scope and set the debug level on 3 .
I'm running the latest SVN.
And i suppose you are not a windows user ?

Other :
Do you use Blender as modeler ?
Have you got screenshots of your models ?
Do you plan to share dem ?
:?:

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Custom starship meshes causing crashes

Post by loki1950 »

Ezze Windows 6 is mentioned in that stdout/stderr so he is a windows user Win 7 I believe looking at that file it appears that one of the csv files is borked most likely units.cvs as that is where the path to each mesh is defined be careful when editing csv files with a spread sheet app as they often do not save in the proper format.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
w03
Mercenary
Mercenary
Posts: 125
Joined: Sat Apr 11, 2009 1:47 am

Re: Custom starship meshes causing crashes

Post by w03 »

Thanks, that might be it. I got lazy and went through everything with Excel instead of Notepad++.
Time to go through and look for all the missing commas and quotes etc. :p
w03
Mercenary
Mercenary
Posts: 125
Joined: Sat Apr 11, 2009 1:47 am

Re: Custom starship meshes causing crashes

Post by w03 »

Hmm, it seems the mesh is the root of the problems, not the csv errors.
I fixed them and the problem is still there, so I downloaded a clean copy of SVN and replaced the Dostoevsky's model using Notepad++.
The same hangar crash occurred, and the mesh is the only thing that changed.

The log files are here:
stderr.txt: https://drive.google.com/file/d/0B9DQMD ... sp=sharing
stdout.txt: https://drive.google.com/file/d/0B9DQMD ... sp=sharing
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

i made a search in the sources for this report :
Assumed exit on unit Dostoevsky(if not quitting, report error)
that string is referenced in

Code: Select all

Unit::~Unit()
{
    if(pMeshAnimation) {
        delete pMeshAnimation;
        pMeshAnimation = NULL;
    }

    free( pImage->cockpit_damage );
    if ( (!killed) )
        VSFileSystem::vs_fprintf( stderr, "Assumed exit on unit %s(if not quitting, report error)\n", name.get().c_str() );
    if (ucref)
        VSFileSystem::vs_fprintf( stderr, "DISASTER AREA!!!!" );
The destructor was called , perhaps because of too many fails .

What is that folder ?
/sales
Is it a new folder in the actual svn Data?
If not , try to put your models and sounds in an "official folder " , because
the VSFileSystem seem to don't know what to do :
Loading a VSFileSystem::SoundFile : sales/salespitchDostoevskyaccept.wav
Loading a VSFileSystem::UnknownFile : sales/salespitchDostoevskyaccept.wav
I made that reminder some days ago about files and folders in VS:
https://sourceforge.net/p/vegastrikevo/ ... e%20types/

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Custom starship meshes causing crashes

Post by TBeholder »

I suspect the exporter.
Converting from OBJ may be the only way to get working BFXM. Which raises an obvious question...
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

Which raises an obvious question...
Why don't we use .obj and .mtl directly in the engine instead of .bfxm ?

Glad to hear you again TBeHolder !

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Custom starship meshes causing crashes

Post by TBeholder »

ezee wrote:Why don't we use .obj and .mtl directly in the engine instead of .bfxm ?
Well, yes. Of course, they are text files, so loading/parsing/validating would take more time and resources.
But even then, .bfxm could be moved out of the way completely by automatically generating/precaching them - much like there are .pyc files.
A funny bit: did you see "generatedbsp" (unused at least from r3719) subdirectory in user data? :D
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

A funny bit: did you see "generatedbsp" (unused at least from r3719) subdirectory in user data? :D
:) of course , no . Your knowledge about vegastrike's arcanes is really precious .
I even don't know what " launcher " is ... But i noticed the use of GTK , and i remember
you were talking about it months ago .
I think gtkglext should be tested for the creation of 2b bases for example .
https://github.com/tdz/gtkglext

But the future is webgl , where designers could work online :
http://threejs.org/editor/
I have already uploaded the " dodo" from vs , and it was easy to build a 3dscene ( hangar ) around it . We could build complete 3D bases levels from scratch .

For the bsp , i never worked with that , even never tried to make a quake level .
But a lot of indie games use it , and probably every good level designer have experienced
it .
ANd GTK again, in http://icculus.org/gtkradiant/

So thank you very much for that hint , i will look closer into that direction .
:wink:

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

So talking about meshes and bsp , there is in units.csv columns for that : 17 and 18
,"Directory","Name","STATUS","Object_Type","Combat_Role","Textual_Description","Hud_image","Unit_Scale",
"Cockpit","CockpitX","CockpitY","CockpitZ","Mesh","Shield_Mesh","Rapid_Mesh","BSP_Mesh",
"Use_BSP","Use_Rapid","NoDamageParticles","Mass","Moment_Of_Inertia","Fuel_Capacity","Hull",
...
...
I don't know if it was intended to use with vessels , i guess no .
More probably with terrain meshes + bases interior
Mesher works good , tested with .obj and .mtl exported from blender :
[youtube]https://youtu.be/za7t1zBzq0w[/youtube]

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Custom starship meshes causing crashes

Post by TBeholder »

ezee wrote:So talking about meshes and bsp , there is in units.csv columns for that : 17 and 18
,"Directory","Name","STATUS","Object_Type","Combat_Role","Textual_Description","Hud_image","Unit_Scale",
"Cockpit","CockpitX","CockpitY","CockpitZ","Mesh","Shield_Mesh","Rapid_Mesh","BSP_Mesh",
"Use_BSP","Use_Rapid","NoDamageParticles","Mass","Moment_Of_Inertia","Fuel_Capacity","Hull",
...
...
I don't know if it was intended to use with vessels , i guess no .
"grep -Ri trunk" gives only one mention (aside of CSV in "data/units/" and "data/documentation/") - "vegastrike/objconv/ucsv.py"
ezee wrote:Mesher works good , tested with .obj and .mtl exported from blender :
Well, yeah, and it works with Wings3D output just fine too. Straightforward conversion is easy, but it's good for what - mount models and missiles?
It's arranging LoDs and other fine touches that's messy and requires some attention.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

I just made my first shield for the s256-c2 .
Really simple with blender and mesher when we got the trick ...
A little adventure called " Under attack at shipyard " :

" ALERT ... BANDIT IN APPROACH " said my dear old console , lady lee . (^^ )

Image

Ok , i started an escape manoeuver ...

Image

But ... OUCHH ....
Image

Hey !! I'm a poor engineer that only do some flying tests ... Happilly , it was this
time to test the new shield system ....

Image

Ouch again ...

Image

Hey !! Peopo' on the shipyard , are you sleeping ? I AM UNDER ATTACK !!

Holly shit ! This guy has a better engine than mine , he's now at my twelve ...
And no guns ... RAAAH ...
Image

How am i still alive ?
Well , that's just a game .
:wink:

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

@TBHolder
"grep -Ri trunk" gives only one mention (aside of CSV in "data/units/" and "data/documentation/") - "vegastrike/objconv/ucsv.py"
Thanks , i have looked onto ucsv.py , it only writes out if bsp is used or not for a unit ...
I think that bsp should be used for 3D bases where you can fly into for docking.
And ... i imagine also a python room that will load a bsp level when docked instead of 2d point and click
:lol:

Back to custom ships , i am thinking of a kind of installer for new vessels or whatever .
And found in the "vegastrike/objconv " folder some good py :
# csvimport.py
# Rewritten by: geoscope
# This file opens units.csv (or another similar file), and a <unitname>.csv file (created most likely with csvexport.py
# it looks within units.csv for a line with the <unitname> key, and if found, updates that line to whatever information
# is is the <unitname>.csv file.
Today , when i send a vessel folder to my team mates , they must manually add the line i wrote for
the vessel in the units.csv . They can do that , they are dev . :lol:

But for end users , it will be better to make an automation .
Say you put the folder at the right place ( /Data/units/vessels ) , then at startup VS will scan each folder
to see if a .csv is found inside. ( 1 line .csv file )
If yes , and the line doesn't exists already in units.vcv , copy it .
Neat ?

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Custom starship meshes causing crashes

Post by TBeholder »

ezee wrote:I think that bsp should be used for 3D bases where you can fly into for docking.
And ... i imagine also a python room that will load a bsp level when docked instead of 2d point and click
3D bases would be an improvement, but 2D does what's necessary well enough.
It's a munor improvement while there are other things that don't work well - subunits, [weapon] effects and location/repair equipment system, just to name the most painfully obvious bottlenecks.
ezee wrote:

Code: Select all

# it looks within units.csv for a line with the <unitname> key, and if found, updates that line to whatever information
Today , when i send a vessel folder to my team mates , they must manually add the line i wrote for
the vessel in the units.csv . They can do that , they are dev . :lol:

But for end users , it will be better to make an automation .
Import is necessary only for updates. When a mod is not one CSV per ship/closely related group, because then the new file would overwrite the old already.
With mod vs. core data, either mod trumps core, or core is ignored either way, so there are no special cases.
New ships don't need import mechanism at all other than reading one more CSV dumped into right location, and that's it.
ezee wrote:Say you put the folder at the right place ( /Data/units/vessels ) , then at startup VS will scan each folder
to see if a .csv is found inside. ( 1 line .csv file )
If yes , and the line doesn't exists already in units.vcv , copy it .
Neat ?
If it's here and readable, what is the reason to write it anywhere?
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

If it's here and readable, what is the reason to write it anywhere?
Good point , 15 / 0 .... :lol:

I try to respect the "logic" of VS , that's why i wanted to write his definition in the units.csv , for example .
But i could rewrite the way VS loads units , to make it read one .csv file in his folder instead of in units.csv
But that mean open and close a file each time a vessel is loaded ( i hope the actual initialisation keeps the units.csv opened while it loads all the vessel ...) .
It's a minor improvement while there are other things that don't work well - subunits, [weapon] effects and location/repair equipment system, just to name the most painfully obvious bottlenecks.
I agree .
If you could develop what is the problem and your idea to fix it , we could work on that with priority set to high . :wink:
If you want , take a ticketin the evolved site , we could work on that now .

For the 3d bases , it's clear it is not my first objective .
Now that i have made a menuBuilder.py that helps to create menuPages , i want to improve it to manage efficiently " rooms " .By doing minor things , i'm learning how VS works , that allows major graphical improvement in the gui system,
and later a better use of the python code .

I'm working on the RPG side of vegastrike , and in VS evolved , you could choose your faction before start a new campain.
So it should be possible to choose a type of character and even tweak it ( outfits , skin color , race etc ... )
That is an RPG attribute i'd like to implement now .

An other thing i think about , is your old idea to use the gui rooms to serve while in simulation as ship interiors .
That is a clever idea that would add some visual pleasure ( or not ... :mrgreen: ) to the gamers .
We could set autopilot on , and go to the cargo panel see them in 3d ( like the ship in the landing pad you know )
Or go to the electrical system panel , and play with buttons ... :lol:
Some long flight are so annoying , there must be something to do .

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Custom starship meshes causing crashes

Post by TBeholder »

ezee wrote: I try to respect the "logic" of VS , that's why i wanted to write his definition in the units.csv , for example .
But i could rewrite the way VS loads units , to make it read one .csv file in his folder instead of in units.csv
But that mean open and close a file each time a vessel is loaded ( i hope the actual initialisation keeps the units.csv opened while it loads all the vessel ...) .
My point was that units.csv ended up split into smaller files in r13666 - exactly because it's too unwieldy to handle, whether for editing, update or parsing on unit creation. And once there are several data files (without a hardcoded list), there are as many of them as developer deemed convenient.
ezee wrote: If you could develop what is the problem and your idea to fix it , we could work on that with priority set to high . :wink:
Well, we had some discussions here, one of the issues was where to cut classes to reduce overhead without cutting too much.
Which is also tied to choices on the physical engine, of course.
ezee wrote: So it should be possible to choose a type of character and even tweak it ( outfits , skin color , race etc ... )
That is an RPG attribute i'd like to implement now .
This part is also tied into gameplay, because crew members could have different acceleration tolerance and life support requirements depending on species/subspecies (remember, there are a handful of human subspecies, and 3 of Rlaan) - if such things were tracked.

But also, there's place for NPC personalities and traits, that may affect performance. In much the same way as skills and personality stats in WC, but sandbox game requires more than mission-based one.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Custom starship meshes causing crashes

Post by ezee »

Thanks for the links , that will help !
:wink:

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Post Reply