Node.lua Crash

What is a crash caused by node.lua?

  • An unexpected and abrupt shutdown of the Iguana process or service.

  • Caused by the inclusion of require 'node' or require 'stringutils' in the main, local, or shared modules of a translator instance within an iguana channel on an Iguana instance that is version 6.1.X. 

Origins of the Error

  • The problem originated from operations used to manipulate Lua node trees.

  • In Iguana 6.1, Iguana now natively contains some of the same node operations we see implemented in the Lua modules. That is, the Translator in 6.1 does not typically need to bother with node.lua, because all the useful tools are now built in. These include the most common call: node:S()

Possible Causes

  • It is highly suspected (but have not confirmed) that there may be some negative interaction between the native node implementation and the Lua override that causes the crash.

  • Implementing the require statements mentioned above can cause memory corruptions that lead to memory access violations when trying to delete and modify nodes at some point in the call stack, ultimately causing the crash.

Solutions

  • Removing the node.lua and stringutils.lua dependencies from all 6.1+ translator projects should prevent the crash from happening again

  • If crashes occur repeatedly upon startup, Iguana may need to be started in safe mode to do so as there may be channels containing the modules that are set to start automatically, re-triggering the crash upon startup.


Adapted from Marcus Walter’s article in Basecamp.

Related pages