Anonymous Login
2020-09-25 02:42 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001852OpenClonkEngine - C4Scriptpublic2016-11-30 12:51
ReporterFulgen 
Assigned ToSven2 
PrioritynormalSeveritycrashReproducibilityhave not tried
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001852: OpenClonk crashes when calling an undefined function
DescriptionWhen using Rn3() in c4script, OpenClonk crashes.
Tagscrash, Script
Attached Files

-Relationships
+Relationships

-Notes

~0005494

Luchs (administrator)

Can you provide the crashing script? I cannot reproduce this.

~0005495

Fulgen (reporter)

You can use any script which calls an undefined function, e.g.:
GetCursor()->SetPosition(Rn3(), Rn3());
GetCursor()->CreateContent(Hammer);
Rn3();
RemoveAl();

~0005496

Fulgen (reporter)

EDIT: Also crashes when calling undefined locals etc.: Type "/script asdf" and see.

~0005497

Luchs (administrator)

Okay, I can reproduce it now (not sure what I did last time).

The issue is (I think) that C4AulParse::Parse_DirectExec does not set func->pOrgScript which is later used in CodegenAstVisitor (as target_host) for error reporting.

~0005498

Luchs (administrator)

Sven fixed the crash here: https://github.com/openclonk/openclonk/commit/c5623aa7a214fa6d5f04df71c1052fb07e6d7ddd

If that's enough, we can close this. Isilkor?

~0005517

Isilkor (developer)

Seems to be working.
+Notes

-Issue History
Date Modified Username Field Change
2016-11-15 10:31 Fulgen New Issue
2016-11-15 10:31 Fulgen File Added: OpenClonk.log
2016-11-15 10:31 Fulgen Tag Attached: crash
2016-11-15 10:31 Fulgen Tag Attached: Script
2016-11-15 10:31 Fulgen File Added: openclonk-crash-2016-11-15-10-26-50.dmp
2016-11-15 17:28 Luchs Severity minor => crash
2016-11-15 17:28 Luchs Summary OpenClonk crashes when using Rn3() in c4script => OpenClonk crashes when calling an undefined function
2016-11-15 17:30 Luchs Note Added: 0005494
2016-11-19 10:06 Luchs Status new => feedback
2016-11-19 11:56 Fulgen Note Added: 0005495
2016-11-19 11:56 Fulgen Status feedback => new
2016-11-19 11:58 Fulgen Note Added: 0005496
2016-11-19 18:06 Luchs Note Added: 0005497
2016-11-19 18:07 Luchs Assigned To => Isilkor
2016-11-19 18:07 Luchs Status new => assigned
2016-11-20 22:14 Luchs Note Added: 0005498
2016-11-30 12:51 Isilkor Assigned To Isilkor => Sven2
2016-11-30 12:51 Isilkor Status assigned => resolved
2016-11-30 12:51 Isilkor Resolution open => fixed
2016-11-30 12:51 Isilkor Note Added: 0005517
+Issue History