Page 1 of 1

Reference counting bug during character generation

Posted: Mon Mar 03, 2014 5:53 am
by eronarn
When 'config.settings.tome.autoassign_talents_on_birth' is false, 'game/modules/tome/dialogs/Birther.lua' loops over the table of descriptor-provided talents before calling 'apply()' to actually learn them. Talents that aren't set to 'no_unlearn_last' are set to nil in the table, and the class/generic points are added to the player.

However, 'self.actor:learnPool(talent)' gets called during this process (line 275 of a recent git checkout). When it calls 'checkPool', the pool talent is added, setting 'self.resource_pool_refs[pid][tid]' using the talent id even though it hasn't been learned yet. This extra reference increment can't be removed, so the character is stuck with the talent pool forever.

It looks pretty safe to just remove that line. It'll get called if they ever do learn that talent.