Anonymous Login
2021-09-29 02:30 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001696OpenClonkEngine - C4Scriptpublic2017-12-26 14:11
Assigned ToGünther 
PrioritynormalSeveritycrashReproducibilityhave not tried
PlatformVisual C++ 2008OSWindowsOS Version 
Product Version 
Target Versiongit masterFixed in Version 
Summary0001696: Global->eval("test") crashes
DescriptionDirectExec 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.
Steps To ReproduceStart Minimal.ocs; then execute Global->eval("test") from the console input.
TagsNo tags attached.
Attached Files




Zapper (developer)

Reminder sent to: Günther

Just in case Sven didn't tell you and just assigned the bug to you (which does NOT notify afaik? And thus is not really helpful at all).


Luchs (administrator)

>An easy fix would be to always run DirectExec in the scenario context.

I think Sven did that for the new editor, so it doesn't seem to be possible to trigger this crash from the UI anymore.

I'm still only moving it from the 8.0 target because the underlying issue is probably still there...

-Issue History
Date Modified Username Field Change
2016-03-01 01:41 Sven2 New Issue
2016-03-01 01:41 Sven2 Status new => assigned
2016-03-01 01:41 Sven2 Assigned To => Günther
2016-03-01 01:44 Sven2 Status assigned => feedback
2016-03-01 01:44 Sven2 Description Updated View Revisions
2016-03-01 19:42 Zapper Note Added: 0005015
2017-08-05 13:58 Maikel Target Version => 8.0
2017-12-26 14:11 Luchs Target Version 8.0 => git master
2017-12-26 14:11 Luchs Note Added: 0005969
+Issue History