Reference counting bug during character generation

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
eronarn
Thalore
Posts: 161
Joined: Sun Jan 02, 2011 8:38 pm

Reference counting bug during character generation

#1 Post 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.

Post Reply