1.6 Beta 5

Debug code in Beta 5 seems to imply that this is a problem updating an item:

06/23/2015 13:25:36	Exception in setq; arg = (result (divide (multiply (subtract (min (max fromMin x) fromMax) fromMin) toRange) (subtract fromMax fromMin)))
06/23/2015 13:25:36	Exception in multiply; arg = (1 94 50)
06/23/2015 13:25:36	Exception in multiply; arg = (1 137 50)
06/23/2015 13:25:36	Exception in divide; arg = ((multiply 100 damageHP) maxHP)
06/23/2015 13:25:36	Exception in add; arg = (254 50)
06/23/2015 13:25:36	OnDamage [Troglav-class frigate wreck]: Division by zero [((multiply (min 25 damageAdj) 9 totalExplosives) (add maxHP 50))] ### (divide (multiply (min 25 damageAdj) 9 totalExplosives) (add maxHP 50)) ###
06/23/2015 13:25:36	All downloads complete.
06/23/2015 13:25:36	Exception in itmGetCharges; arg = ((-754377728 1 115 44 0 "\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff" "\0\0\0\0\0\0\0\0" 0))
06/23/2015 13:25:36	Item d3091c00 Event [Lithium-class fighter]: Exception in itmGetCharges; arg = ((-754377728 1 115 44 0 "\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff" "\0\0\0\0\0\0\0\0" 0)) [((-754377728 1 115 44 0 "\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff" "\0\0\0\0\0\0\0\0" 0))] ### (itmGetCharges gItem) ###
06/23/2015 13:25:36	Exception in itmGetCharges; arg = ((-754377728 1 115 47 0 "\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff" "\0\0\0\0\0\0\0\0" 0))
06/23/2015 13:25:36	Item d3091c00 Event [Lithium-class fighter]: Exception in itmGetCharges; arg = ((-754377728 1 115 47 0 "\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff" "\0\0\0\0\0\0\0\0" 0)) [((-754377728 1 115 47 0 "\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff" "\0\0\0\0\0\0\0\0" 0))] ### (itmGetCharges gItem) ###
06/23/2015 13:25:36	Exception in multiply; arg = (1 94 50)
06/23/2015 13:25:36	Exception in multiply; arg = (1 137 50)
06/23/2015 13:25:36	Exception in divide; arg = ((multiply 100 damageHP) maxHP)
06/23/2015 13:25:36	Exception in add; arg = (254 50)
06/23/2015 13:25:36	OnDamage [Troglav-class frigate wreck]: Division by zero [((multiply (min 25 damageAdj) 9 totalExplosives) (add maxHP 50))] ### (divide (multiply (min 25 damageAdj) 9 totalExplosives) (add maxHP 50)) ###
06/23/2015 13:25:36	Loading news.
06/23/2015 13:25:36	Exception in power; arg = ((7 18) (50 100))
06/23/2015 13:25:36	Exception in itmGetMass; arg = ((8454306 -16777122))
06/23/2015 13:25:36	Exception in itmGetMass; arg = ((8454305 -16777079))
06/23/2015 13:25:37	Exception in max; arg = (1 0)
06/23/2015 13:25:37	OnDamage [Troglav-class frigate wreck]: Exception in max; arg = (1 0) [(1 0)] ### (max 1 (divide totalExplosives 100)) ###
06/23/2015 13:25:37	Crash in CItemEventDispatcher::FireUpdateEventsFull
06/23/2015 13:25:37	Unable to continue due to program error.

program state: OnAnimate
program state: updating object
obj class: CShip
obj name: Lithium-class fighter
obj pointer: 13083798
m_pDocked: none
m_pExitGate: none
IOrderModule
m_Objs[0]: 13082a58 Komodo-class Battleship (CShip)
m_Objs[1]: none
CAttackOrder
m_State: 0
m_iCountdown: -1
game state: intro

See:

1.6 Beta 4

All of these start out with an exception in:

06/12/2015 03:22:47	Exception in eq; arg = ((itmGetCategory itm) 4)
06/12/2015 03:22:47	Overlay OnUpdate: Exception in eq; arg = ((itmGetCategory itm) 4) [((itmGetCategory itm) 4)] ### (eq (itmGetCategory itm) 4) ### []: Exception in eq; arg = ((itmGetCategory itm) 4) [((itmGetCategory itm) 4)] ### (eq (itmGetCategory itm) 4) ###

It's almost as if this crash somehow screws up CodeChain.

This could also be due to some bug in item events (since there seem to be a lot of them).

See:

george moromisato 21 Jun 2015:

Added some debug code in 1.6 Beta 5.

george moromisato 2 Jul 2015:

Posted a plea for help on the forums: https://forums.kronosaur.com/viewtopic.php?f=5&t=7238

solargalaxy 2 Jul 2015:

Sorry. The Lithium fighter is from a mod that I'm working on, it uses a pseudo-ammo weapon that's really charges as I wanted the faction to use a common ammo (specifically a fuel cell similar to Longzhu spheres) in all of their weapons.
It uses some clunky code for auto-reloading. I don't remember why I didn't just use the Qianlong Archcannon's code. I think it had something to do with not understanding how the Longzhu's dockscreen works. When I have some time, I'll try experimenting with just using a modified version of the Longzhu sphere's dockscreen.
The Komodo is from a very old copy of TSB that I have since I'm not in the current alpha.

Its weapon is below (Sorry I don't know how to format it)
<ItemType UNID="&itUnionIonPulseRifle;"
name= "ion pulse rifle"
level= "7"
value= "50000"
mass= "5000"
frequency= "common"
attributes= "MajorItem; Military; Union; energyWeapon"
charges = "25"

description= "Ion pulse rifles allows the Union to project firepower far from home. They use special power cells; each one charges 25 shots."
>

<Image imageID="&rsItems7;" imageX="0" imageY="96" imageWidth="96" imageHeight="96"/>

<Weapon
type= "beam"

damage= "ion:8d7; armor:7; WMD3"
fireRate= "12"
lifetime= "40"
powerUse= "40"

effect= "&efIonPulseBeam;"
hitEffect= "&efIonPulseHit;"
sound= "&snLaserCannon;"
charges= "true"
>
</Weapon>

<Events>
<OnUpdate>
(block Nil
;If we have less than 25 charges in the weapon and a powercell in our cargo, we recharge 25 charges
(if (and (ls (itmGetCharges gItem) 25)
(objGetItems gSource "f +PowerCell;"))
(block Nil
(objRemoveItem gSource (itmCreate &itPowerCell; 1))
(shpRechargeItem gSource gItem 25)
)
)
)
</OnUpdate>
</Events>
</ItemType>

george moromisato 11 Jul 2015:

I've made two fixes in 1.6 RC 2 that should take care of these bugs:

  1. I added a semaphore in the Intro screen so that loading a new extension doesn't conflict with the TLisp engine in use by the Intro.
  2. I fixed a bad error path in shpInstallDevice which corrupted the TLisp engine.