Anonymous Login
2019-07-19 14:20 UTC

View Revisions: Issue #1696

Summary 0001696: Global->eval("test") crashes
Revision 2016-03-01 01:44 by Sven2
Description DirectExec in global context crashes. This effects several places; e.g. eval in global context (not scenario context) or custom messageboard commands.

The crash happens because the ScriptEngine is set as the owner of the temporarily created function, which results in a NULL ScriptHost in pOrgScript (and then NULL dereference trying to get pOrgScript->Engine).

An easy fix would be to always run DirectExec in the scenario context. But I think a more sensible solution would be to either have a global DirectExec host or make the ScriptEngine a ScriptHost again.

Guenther? I believe the error happens since one of your cleanup commits (Making the ScriptEngine not a ScriptHost). I don't just want to undo the change if there was a good reason for it.
Revision 2016-03-01 01:41 by Sven2
Description DirectExec in global context crashes. This effects several places; e.g. eval in global context (not scenario context) or custom messageboard commands.

The crash happens because the ScriptEngine is set as the owner of the temporarily created function, which results in a NULL ScriptHost in pOrgScript (and then NULL dereference trying to get pOrgScript->Engine).

One fix would be to always run DirectExec in the scenario context. But I think a more sensible solution would be to either have a global DirectExec host or make the ScriptEngine a ScriptHost again.

Guenther? I believe the error happens since one of your cleanup commits.