Page 6 of 16
Re: [RELEASE] WildShips OXP
Posted: Wed Apr 04, 2012 9:25 pm
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.
Re: [RELEASE] WildShips OXP
Posted: Wed Apr 04, 2012 9:32 pm
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...
Re: [RELEASE] WildShips OXP
Posted: Wed Apr 04, 2012 9:32 pm
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.
Re: [RELEASE] WildShips OXP
Posted: Wed Apr 04, 2012 9:42 pm
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.
Re: [RELEASE] WildShips OXP
Posted: Wed Apr 04, 2012 9:53 pm
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".
Re: [RELEASE] WildShips OXP
Posted: Wed Apr 04, 2012 11:12 pm
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.
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 3:13 am
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.
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 6:29 am
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!).
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 7:22 am
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.
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 7:45 am
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)
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 8:16 am
by Gimi
Eric wrote: For that you probably also must enable texture logging.
How do I enable texture logging?
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 8:25 am
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!
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 9:08 am
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
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 9:19 am
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.
Re: [RELEASE] WildShips OXP
Posted: Thu Apr 05, 2012 9:36 am
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.