Trunk 1.74.0.2926 Misjump causes crash

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

Moderators: winston, another_commander, Getafix

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

Post by Eric Walch »

I did a bit further testing. When using

Code: Select all

"griff_normalmapped_thargoid_organic_fixed_fresnel_colour" = 
	{
	like_ship = "thargoid";
	//missile_role = "griff_organic_thargon";	
	missile_role = "thargon";	
everything is okay. Than I defined a minimal like_ship copy

Code: Select all

"griff_normalmapped_tharglet_organic_fixed_fresnel_color" = 
	{
	like_ship = "tharglet";
	roles = "griff_organic_thargon tharglet thargon";	
	};		
and changed the missile role to this ship. It gives a crash during mother creation.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

also i think any ship with a scan class of "CLASS_THARGOID" and a missile role other than "thargon" causes the crash, i've been changing the scan class of the griff thargoids to "CLASS_POLICE" and it's been working ok.
edit: oops, sorry eric, i didn't see your post on the previous page
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Griff wrote:
also i think any ship with a scan class of "CLASS_THARGOID" and a missile role other than "thargon" causes the crash, i've been changing the scan class of the griff thargoids to "CLASS_POLICE" and it's been working ok.
edit: oops, sorry eric, i didn't see your post on the previous page
It is definitely the equipment that causes the crash. Now, when a ship that uses missiles, is added, and the missiles are not defined as equipment, Oolite will crash. I tested it by adding your custom targlet to the equipment list and the crash stopped.

That means there must be more oxp's causing crashes. I know at least one other oxp with custom targlets.
User avatar
ADCK
---- E L I T E ----
---- E L I T E ----
Posts: 771
Joined: Thu Dec 24, 2009 12:30 am
Location: Sydney
Contact:

Post by ADCK »

So just changing the shader-thargoids missile role to "thargon" and the shader-thargons role to "thargon" should fix this?
It will mean non-shader thargoids will launch shader thargons and vice-versa, but i don't mind that, on my copy this happens already anyway with all my personal customisations.
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

Post by Kaks »

Problems, problems!

I'll have a look and see what I can do to stop the crashes. To still have all NPC missiles treated as equipment, we'll have to find a way to define the new tharglets as 'thargoid only' missile equipment. Hmm, some thinking required...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Kaks wrote:
Problems, problems!

I'll have a look and see what I can do to stop the crashes. To still have all NPC missiles treated as equipment, we'll have to find a way to define the new tharglets as 'thargoid only' missile equipment...
It is not only tharglets but a special missile-role could also be used for other npc only missiles. Until now there was no reason to define them as equipment as equipment was only needed for the player.

I just updated my behemothSpacewar.oxp to v 1.2.3. That had also special tharglets that I now also have defined as equipment.

And I made a quick look in Missiles&Bombs. There is nothing that could cause problems. I did find a "role = rmb-thargoid-warhead missile(0)" This one is not defined as equipment but has a missile role for used by npc ships. Only the probability is set as zero. A bit of a contradiction as it should not contain the missile in the first place. But i know there are also similar definitions with "missile(0.001)" There the author also did not want the missile but defined it anyway but with a very low probability.

I don't think there will be many oxp's using nps-only missiles so make a definition in equipment obligatory seems okay for future. The code should only detect old stuff and do nothing (or select plain missiles) instead of crashing.
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

Post by Kaks »

I fixed the problem in trunk now, and it doesn't crash anymore (well, it was actually stuck in an infinite loop, not crashing - same difference as far as the player was concerned).

The root cause of that problem was that now all items that can be launched by an NPC ship need to be defined as equipment too. In the case of NPC only equipment, missiles & mines need to end with _MISSILE" & _MINE" respectively. In addition to those, Thargoids can now equip and launch any equipment that ends with "thargon".

If running trunk, the log will now show a warning that it doesn't find an equipment.plist entry for "griff_organic_thargon" and will use the standard 'thargon' as missile_role instead.

To mark NPC equipment as NPC only, you need to set its TL to 100 (ie permanently out of reach)

The equipment.plist entry for Griff's new thargons would need to look like this

Code: Select all

	( /* NPC only, because of its TL. */
		100, 100000, "Organic Thargon",
		"griff_organic_thargon",
		"Alien drone ship, all shiny and stuff."
	),

As it now says in the log, if the entry isn't there the Thargoid will load its bay with the standard 'thargon' instead. Which in this particular case was already overridden to point at the organic thargon anyway!

PS: Eric, in the case of other NPCs, most times it should load the normal spread of missiles if the missile_role is not a piece of equipment. In case there's some really weird stuff going on, it just won't load any missiles.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Thanks for the bug-fix Kaks!, I've updated oolite to trunk revision 2943 and it's all working great, i'm copying your example equipment.plist into the griff_thargoids oxp and i'll have them updated and uploaded a bit later today.
I kept making mistakes adapting the equipment.plist example for the more UFO like thargoids and i noticed Oolite helpfully substituting thargons for the missile_role when my oxp was faulty so the safety-net code stuff is working great!

I think the missile_load_time setting might be fun to play around with, the UFO-style griff_thargoids have their colour schemes fixed to red, blue, yellow and gold so i might make the red ones drop all their thargoids quicker than the other types so they're more of an 'Oh No!' moment when you meet them :)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Griff wrote:
I think the missile_load_time setting might be fun to play around with, the UFO-style griff_thargoids have their colour schemes fixed to red, blue, yellow and gold so i might make the red ones drop all their thargoids quicker than the other types so they're more of an 'Oh No!' moment when you meet them :)
Isn't it great when people actually use the new features we're putting in? Sounds like a very neat idea, Griff.
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

Post by Kaks »

And good to hear it now works as planned! If we keep this up, when 1.74 is released we might not have too many bugs, even! :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

:D I hadn't updated my trunk install of Oolite for ages and the new stuff you've added in is really cool, the lighting tweak on the title screen is really nice, so thanks Eric for providing the new virtual lightbulb or whatever you did.
Well, i've updated the 2 individual griff thargoid oxp's over on my box account so they take advantage of the lovely new stuff in trunk (and they also work perfectly fine in the Current Oolite test release too - v1.74)
I haven't sorted out the files for Dizzys all-in-1 oxp yet, i'll probably do that when' dancing on ice' is on ITV this evening, searching through thousands of lines of a shipdata.plist file looking for sytax errors seems a reasonable alternative to watching that :D
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

another_commander wrote:
Griff wrote:
I think the missile_load_time setting might be fun to play around with, the UFO-style griff_thargoids have their colour schemes fixed to red, blue, yellow and gold so i might make the red ones drop all their thargoids quicker than the other types so they're more of an 'Oh No!' moment when you meet them :)
Isn't it great when people actually use the new features we're putting in? Sounds like a very neat idea, Griff.
Sounds like you're merging Second Wave OXP into yours ;)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Kaks wrote:
The root cause of that problem was that now all items that can be launched by an NPC ship need to be defined as equipment too. In the case of NPC only equipment, missiles & mines need to end with _MISSILE" & _MINE" respectively. In addition to those, Thargoids can now equip and launch any equipment that ends with "thereon".
Hrm. I’m not happy with introducing new requirements that break things that worked with 1.65. (Some of the shipdata changes nominally do, but the old ways actually still work despite error messages.) It would be better if this resulted in an unbuyable OOEquipmentType being synthesised instead.
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

Post by Kaks »

I wasn't aware anybody had made non-equipment NPC missiles for 1.65, but if that's the case, sure: I'll get the synthesised OOEquipmentType code in there, with one log warning per non-existent equipment type.

Not likely to get the time to do it this weekend, though! :P
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply