[RELEASE] WildShips OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Gimbal Locke
---- E L I T E ----
---- E L I T E ----
Posts: 293
Joined: Sun Jan 08, 2012 11:32 pm
Location: Brussels
Contact:

Re: [RELEASE] WildShips OXP

Post by Gimbal Locke »

Thargoid wrote:
OK next trial. Can you please open the kiota script (wildships_kiota.js) and change this.shipDied (line 145 downward to where this.shipFiredMissile starts) to the code below:

Code: Select all

this.playerWillEnterWitchspace = this.shipRemoved = this.shipDied = function()
	{
	if(this.callbackID)
		{
		removeFrameCallback(this.callbackID); 
		delete this.callbackID;
		}
		
	if(this.liftTimer && this.liftTimer.isRunning)
		{
		this.liftTimer.stop();
		delete this.liftTimer;
		}
	}
That should stop the callbacks in any case of the station being removed, including a player jump. Then restart with shift held to clear the old script from the cache.

Let's see if cim's idea can show fruit here...
[/color]
Tried that, still crashing after jumping + dying.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] WildShips OXP

Post by cim »

Gimbal Locke wrote:
Tried that, still crashing after jumping + dying.
Try my modification instead, which also stops missileTimer.

I think I see a logic error in the timer stopping code; recompiling Oolite now to see if I was right...
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: [RELEASE] WildShips OXP

Post by Thargoid »

Anyway I've just uploaded a tweaked version with cim's and my own script mods (which I've expanded to include the missile timer too). It's available here. It's as thorough in shutting everything down if the station is removed as I can get it.
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: [RELEASE] WildShips OXP

Post by Gimi »

Thargoid wrote:
Anyway I've just uploaded a tweaked version with cim's and my own script mods (which I've expanded to include the missile timer too). It's available here. It's as thorough in shutting everything down if the station is removed as I can get it.
Hmmm, that didn't work either. Hope cim is on to something.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Gimbal Locke
---- E L I T E ----
---- E L I T E ----
Posts: 293
Joined: Sun Jan 08, 2012 11:32 pm
Location: Brussels
Contact:

Re: [RELEASE] WildShips OXP

Post by Gimbal Locke »

Same here as with Gimi, still crash after death.

Code: Select all

23:49:01.742 [bigShips_populator]: 0 big trader(s) added to the Ausar system.
23:50:36.811 [script.javascript.init.error]: JavaScript processes still pending. Can't reset JavaScript engine.
23:50:36.811 [script.javascript.init.error]: Scheduling new JavaScript reset.
23:50:36.811 [load.failed]: ***** Failed to load saved game "Gimbal Locke.oolite-save": Game engine still resetting while loading game.
23:50:36.858 [script.javascript.init.error]: JavaScript processes still pending. Can't reset JavaScript engine.
23:50:36.858 [script.javascript.init.error]: Scheduling new JavaScript reset.
23:50:37.017 [script.javascript.init.error]: JavaScript processes still pending. Can't reset JavaScript engine.
23:50:37.017 [script.javascript.init.error]: Scheduling new JavaScript reset.
Note that the errors start before trying to load the saved game. The last thing I hear after dying is usually "target lost".
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: [RELEASE] WildShips OXP

Post by Kaks »

Hmm, evil js reset errors.

Unfortunately my 'full time' dev computer is on windows, which doesn't exhibit this problem, so I couldn't test my attempted fixes properly... :(

Fingers crossed cim did indeed spot a logic error in the reset code, which in all likelihood would be mine...

Cheers,

Kaks.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: [RELEASE] WildShips OXP

Post by Capt. Murphy »

cim wrote:
That's unfortunately not particularly relevant. The textures are stored compressed on disk by the .png format, but have to be stored uncompressed in memory for rendering (64Mb for a 4096x4096, plus probably a bit for language dependent stuff, buffers to shift the texture data on to the graphics card, etc.)
Hadn't considered that the small file size on 'simple' but large textures was simply compression. Thanks cim.

Good work on group bug-hunting going on here..... go get 'em lads.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: [RELEASE] WildShips OXP

Post by Thargoid »

I've removed the temporary versions of the OXP, and uploaded a 1.01 "main" version which has the reduced texture sizes, the shader fix, the revised script (cim's suggestion plus my own - so a bit belt & braces) plus a couple of shipdata file tweaks. There's also now a note in the readme about the CTD issue, just in case anyone does actually read them.

Hopefully that may save some people this issue and warn others, but if this is a trunk code problem then roll on 1.76.1! (and good luck cim!).
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: [RELEASE] WildShips OXP

Post by Eric Walch »

Gimi wrote:
I have included two logs in the zip file below.
Previous.log is with the works enabled; that is _override = yes; in a custom logcontrol.plist. (The log is over 3MB)
Such a log with additional logging is always quite informative. The only errors I see is with the mesh of two Wildship ships:

Code: Select all

22:30:53.437 [rendering.opengl.error]: OpenGL error: "invalid operation" (0x502), context: OOMesh after drawing <OOMesh 0x15e8b5f0>{"wildShips_nyoka.dat", 118 vertices, 231 faces, radius: 40.2619 m normals: per-face}
22:30:53.440 [rendering.opengl.error]: OpenGL error: "invalid operation" (0x502), context: OOMesh after drawing <OOMesh 0x7e3d378>{"wildShips_duma.dat", 42 vertices, 88 faces, radius: 87.4643 m normals: per-face}
The log is full of them and it ends with them. I currently have no idea if it is the dat file causing problems, or the underlying textures needed. For that you probably also must enable texture logging.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] WildShips OXP

Post by cim »

Kaks wrote:
Fingers crossed cim did indeed spot a logic error in the reset code, which in all likelihood would be mine...
Well, the one I thought I'd spotted wasn't real, but after sticking in a bit of extra logging, I think I found it.

Code: Select all

Index: src/Core/Scripting/OOJSTimer.m
===================================================================
--- src/Core/Scripting/OOJSTimer.m	(revision 4691)
+++ src/Core/Scripting/OOJSTimer.m	(working copy)
@@ -168,6 +168,7 @@
 	if (description == nil)
 	{
 		[self unscheduleTimer];
+		OOJSRelinquishContext(context);
 		return;
 	}
Should also apply cleanly to current trunk, since I don't think that's changed this file at all.

After applying this change, I no longer get the failure to reset the JS engine when a running timer is attached to something that becomes invalid, and the original wildShips scripting code works fine (as it should do)
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: [RELEASE] WildShips OXP

Post by Gimi »

Eric wrote:
For that you probably also must enable texture logging.
How do I enable texture logging?
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: [RELEASE] WildShips OXP

Post by Kaks »

It's in trunk & maintenance now. Thanks cim! :)

Gimi, either change the $textureDebug setting inside logcontrol.plist, or use the equivalent console command to temporarily turn that setting on! ;)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: [RELEASE] WildShips OXP

Post by Gimi »

Well, I still have the CTD as described before with the latest WildShips v1.01 and Oolite 1.77 rev 4830. I have uploaded the latest log with enabled texture logging. There are a lot of WildShips errors in there. I'm beginning to suspect my graphics drivers even though nVidia have been pretty solid for OpenGL before. So I will be doing a rollback now and see how that goes.

http://www.box.com/s/2ab3253674374954d6c8
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: [RELEASE] WildShips OXP

Post by Kaks »

The fix was for the js reset bug, a bug that was not present in windows to begin with.

Thanks for the log Gimi, hopefully we'll figure out a way to fix the CTD soon.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] WildShips OXP

Post by cim »

Gimi wrote:
Well, I still have the CTD as described before with the latest WildShips v1.01 and Oolite 1.77 rev 4830. I have uploaded the latest log with enabled texture logging. There are a lot of WildShips errors in there. I'm beginning to suspect my graphics drivers even though nVidia have been pretty solid for OpenGL before. So I will be doing a rollback now and see how that goes.

http://www.box.com/s/2ab3253674374954d6c8
I get similar CTDs on Linux with trunk and wildships, and again no graphics instability at all previously, so I doubt it's entirely a driver issue since that I haven't changed. So far narrowed it down to somewhere between r4700 and r4737; continuing searching now.
Post Reply