Transcendence crashing without error message.

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
Blitz
Militia Commander
Militia Commander
Posts: 342
Joined: Wed Mar 07, 2007 7:29 am

Okay, I've faced a situation in which Transcendence crashes without an error message or a debug log when using a mod.

The error occurs when the mod defines an item entity in the UNID list but does not actually give any details of the item, and this item is present on a ship in the same mod. Transcendence successfully loads the mod (i.e. it opens the intro screen), but when you try to start a new game with the ship from your mod, Transcendence crashes. The error given out is that "Transcendence has encountered an error" error which everyone hates. The error code is c0000005.

The problem here is that there is no way to pin point the error. Actually, there isn't even any way to be sure that the error is caused by a mod, since the c0000005 error is a very common error which I've encountered in many programs and due to different (and often unknown) reasons. It isn't too hard to go through each line of code and pinpoint the error if the mod is small. But what if the mod was large and you didn't know about this situation?

SO, I think it'd be better if the game checks a mod to see if this sort of error is present and if it is, give out an appropriate error message.

I'll include a small example of a mod i which this occurs.

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension 

[
	<!ENTITY scUltimateWolfen			"0xEEEEFFF0">
	<!ENTITY itDebugItem				"0xEEEEFFF1">
]>

<TranscendenceExtension UNID="0xEEEE00FF" version="0.97a">

<!-- xx-Extension; ?-Type (0-Ship 1-Base 2-Weapon 3-Launcher 4-Ammunition 5-Armor 6-Shield 7-Device 8-Enhancer 9-ROM A-Commodity B-Special C-Unique D-Other E-Extra F-Debug/Hax); x-Entity -->

	<!-- Player Ship: Ultimate Wolfen-class Gunship -->

	<ShipClass UNID="&scUltimateWolfen;"
			manufacturer=		""
			class=				"Ultimate Wolfen"
			type=				"gunship"
			score=				"240"
			techOrder=			"biomech"
			
			mass=				"100000000"
			reactorPower=		"100000"
			fuelCapacity=		"1000000000"
			cargoSpace=			"100000000"
			thrust=				"1000000000"
			maneuver=			"1"
			maxSpeed=			"40"
			FuelEfficiency=			"1000000"			
			maxArmor=			"100000"
			maxDevices=			"100"
			leavesWreck=		"20"

			>

		<Armor>
			<ArmorSection start="315" span="90" armorID="&itHierosteelPlate;" areaSet="0,2" />
			<ArmorSection start="225" span="90" armorID="&itHierosteelPlate;" areaSet="3,4" />
			<ArmorSection start="45"  span="90" armorID="&itHierosteelPlate;" areaSet="7,13" />
			<ArmorSection start="135" span="90" armorID="&itHierosteelPlate;" areaSet="1,6" />
		</Armor>

		<Devices>
			<Device deviceID="&itIM90Blaster;"/>
			<Device deviceID="&itIocrymCocoon;"/>
			<Device deviceID="&itMnemonicProcessor;"/>
			<Device deviceID="&itSmugglersCargoHold;"/>
			<Device deviceID="&itTranspaceJumpdrive;"/>
		</Devices>

		<Items>
			<Item count="1" item="&itDebugItem;"/>
		</Items>

		<AISettings
			fireRateAdj=		"1"
			fireAccuracy=		"100"
			perception=			"100"
			/>

		<Image imageID="&rsMediumShips1;" imageX="768" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>

		<DriveImages>
			<NozzleImage imageID="&rsDriveExhaust;" imageX="48" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="0" imageTicksPerFrame="0"/>
			<NozzlePos x="-41" y="-8"/>
			<NozzlePos x="-41" y="0"/>
			<NozzlePos x="-41" y="8"/>
		</DriveImages>

		<PlayerSettings
			desc=				"The Wolfen is a fast ship design for combat."
			initialClass=		"true">

			<ArmorDisplay>
				<ArmorSection name="forward"
						imageID="&rsWolfenArmor;" 
						imageX="0" imageY="0" imageWidth="52" imageHeight="15"
						destX="42" destY="19" hpX="55" hpY="18"
						nameY="8" nameBreakWidth="200" nameDestX="0" nameDestY="10" />

				<ArmorSection name="starboard"
						imageID="&rsWolfenArmor;" 
						imageX="75" imageY="0" imageWidth="23" imageHeight="69"
						destX="94" destY="34" hpX="97" hpY="60"
						nameY="30" nameBreakWidth="360" nameDestX="12" nameDestY="0" />

				<ArmorSection name="port"
						imageID="&rsWolfenArmor;" 
						imageX="52" imageY="0" imageWidth="23" imageHeight="69"
						destX="19" destY="34" hpX="13" hpY="60"
						nameY="52" nameBreakWidth="200" nameDestX="0" nameDestY="8" />

				<ArmorSection name="aft"
						imageID="&rsWolfenArmor;" 
						imageX="0" imageY="75" imageWidth="52" imageHeight="16"
						destX="42" destY="103" hpX="55" hpY="107"
						nameY="74" nameBreakWidth="360" nameDestX="12" nameDestY="0" />
			</ArmorDisplay>

			<ShieldDisplay>
				<Image imageID="&rsWolfenShields;" imageX="0" imageY="0" imageWidth="136" imageHeight="136"/>
			</ShieldDisplay>
				
			<ReactorDisplay>
				<Image imageID="&rsZubrinReactor;" 
						imageX="0" imageY="0" imageWidth="256" imageHeight="60"/>
				
				<PowerLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="60" imageWidth="202" imageHeight="14"
						destX="54" destY="9"/>
						
				<FuelLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="74" imageWidth="194" imageHeight="14"
						destX="54" destY="37"/>
						
				<FuelLowLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="88" imageWidth="194" imageHeight="14"/>
						
				<ReactorText x="62" y="22" width="154" height="14"/>
				<PowerLevelText x="62" y="0" width="154" height="9"/>
				<FuelLevelText x="62" y="51" width="154" height="9"/>
			</ReactorDisplay>
			
		</PlayerSettings>

	</ShipClass>

</TranscendenceExtension>
User avatar
evilbob
Militia Captain
Militia Captain
Posts: 555
Joined: Sun Mar 05, 2006 1:23 pm

could be yer UNIDs-

Code: Select all

<!ENTITY scUltimateWolfen         "0xEEEEFFF0">
   <!ENTITY itDebugItem            "0xEEEEFFF1"> 
should be in the form

Code: Select all

   <!ENTITY scUltimateWolfen         "0xD#######">
   <!ENTITY itDebugItem            "0xD#######"> 
(where "#" is a single digit number)

Although they don't all need to be numbers, I'm sure setting them all as Es and Fs could cause a problem.
User avatar
Blitz
Militia Commander
Militia Commander
Posts: 342
Joined: Wed Mar 07, 2007 7:29 am

Evilbob,
Two things,
1.
George Moromisato on the UTF wrote:The first digit of the number is the NAMESPACE DOMAIN:

0-9 are reserved for the base game
A-C are reserved for registered extensions
D-E are for unregistered extensions
F is reserved for the future

The next three digits are the DESIGNER ID. This is an identifier that belongs to you, the designer of the extension.
So, my UNIDs are not the problem. And yes, the mod does work the way it is supposed to (i.e. transcendence loads but crashes when you start new game).
And, if you change

Code: Select all

         <Item count="1" item="&itDebugItem;"/> 
to

Code: Select all

         <!--<Item count="1" item="&itDebugItem;"/>-->
or in other words, if you disable it, the mod works perfectly.

2.
I'm not asking for a fix for the problem. I know what the problem is and I know how to fix it. What I'm asking for is a little feature implementation so that Transcendence checks the mod for errors such as this and makes life easier for us modders. That's why its in bugs and brainstorms instead of shipyards.
Man, I really need to make my posts more concise and easy to read....
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Makes sense to me.

I believe I can add some code in 0.98 that will detect that condition and output an error. I won't be able to output the actual string name, but it will say something like:

ERROR: Undefined ItemType: 0xEEEEFFF1

Or something.

Note: Obviously I can't check for all possible errors in mods that will cause crashes, but I think I can easily check this one.

Thanks for reporting.
Post Reply