Dat file handled wrong

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Dat file handled wrong

Post by Eric Walch »

Yesterday I encountered a bug in urutu.oxp that is very strange. Its an old oxp from 2006 but still works with one exception: it can't launch from stations but it can be spawned direct to the system. The problem is in the mod dat file. When I replace it with an other, the ship launches normally. And it is not the size because that would be logged in the latest log. To investigate further, I added a shipscript to the ship that logs various stages. This testversion can be downloaded here.

The shipWillLaunchFromStation fires correctly, indicating it completed the launchShip function. The shipSpawned never fires, indicating it never completes the first update. But when spawning the ship in the normal way, everything seems to be working as it should. I can't explain why it works in one case, but not the other.

This is very likely correlated with the bug about terminated JS script as mentioned her as both happen to the same ship.

EDIT: replaced "mod" by "dat"
Last edited by Eric Walch on Tue Aug 02, 2011 7:45 am, edited 1 time in total.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Mod file handled wrong

Post by Wildeblood »

Eric Walch wrote:
EDIT: replaced "mod" by "dat"
Psst! Eric! The thread title.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Mod file handled wrong

Post by Eric Walch »

Wildeblood wrote:
Psst! Eric! The thread title.
oops! corrected now also.

It does not need to be the dat file giving problems. It could also be the texture it is using. Just strange that it works correctly when adding directly into space, but gives problems when launching. I am not able to see were the code differs, but apparently there is a difference somewhere.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Dat file handled wrong

Post by Svengali »

A while ago I've took a look at the used models.

After converting the urutu_main.dat via Dat2Obj.py MAX refused to load the file, but WINGS loaded it. So I reconverted only to see that the model had less faces. I'd think you're quite right with your guess that it is the model.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Dat file handled wrong

Post by Eric Walch »

Svengali wrote:
I'd think you're quite right with your guess that it is the model.
Even when it really would be the model that has a bug, it is also an Oolite bug when it can handle files in one place in the code and not in the other.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Re: Dat file handled wrong

Post by Frame »

I opened urutu_main.dat in my custom model viewer for windows, and everything seemed in order in regard to the faces. My program uses a custom parser that should be less than robust for faulty dat files, so im not sure it is the dat file.

My model viewer can be found here.. http://www.box.net/shared/o8o493s8vg

it reads out 498 faces... 251 vertexes, a manual count of cut and paste and read out of line numbers confirms this..

However, the center of the physical model urutu_main.dat seems to be at the rear

so I debugConsole commanded a station to launch an UrutuIV, how spawns as docked, and a few seconds later a message comes up

Urutu destroyed...

exact text here

Code: Select all

 player.ship.target.launchShipWithRole("UrutuIV")
> player.ship.target.launchShipWithRole("UrutuIV")
[Ship "Urutu MkIV" position: (0, 0, 0) scanClass: CLASS_NEUTRAL status: STATUS_DOCKED]
urutu will launch from: [Station "Icosahedron Station" "Icosahedron Station" position: (63412.4, -15151.1, 345475) scanClass: CLASS_STATION status: STATUS_ACTIVE]
urutu destroyed.
Im on windows Vista Ultimate...

this was on Oolite 1.75.3

but no crash.. could this be a mac specific thing ?.
Bounty Scanner
Number 935
Post Reply