View Issue Details

IDProjectCategoryView StatusLast Update
0000112Gameplay + OpenGL[All Projects] Bugpublic2017-01-25 03:34
ReporterPlutonicOverkill 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionnot fixable 
PlatformOSWindows 10OS Version
Summary0000112: Crash on calling ACS library functions
DescriptionCalling certain functions in an ACS library causes the game to crash. This is the code I tested with, although it would probably reproducible with something similar (the while loop seems to be necessary for a crash to occur):
function bool crash(void)
{
    return (0 & 0) && !(0 & 0);
}

function void test(void) // call this function from a script
{
    while(!crash()) {
        Delay(1);
    }
}

Tested with g2.4pre-219-g4dc1d11 x64, and ACS scripts compiled with gdcc-acc v0.11.0.
Steps To ReproduceOpen the attached file "crash.pk3" in GZDoom, type "map map01" in the console and watch the game crash.
TagsACS

Relationships

Activities

PlutonicOverkill

PlutonicOverkill

2017-01-24 00:48

reporter  

crash.pk3 (2,912 bytes)
CrashReport.zip (33,389 bytes)
Graf Zahl

Graf Zahl

2017-01-24 04:47

administrator   ~0000223

Last edited: 2017-01-24 05:01

View 2 revisions

What did you compile this with?
It crashes because you used 'delay' inside a function which does not work.
Regular ACC refuses to compile the 'test' function after removing the incompatible parts of the library script.

PlutonicOverkill

PlutonicOverkill

2017-01-24 21:52

reporter   ~0000228

The scripts were compiled with gdcc-acc v0.11.0. That's interesting - I knew that delays weren't allowed inside functions, but I didn't know that they could actually crash the engine.
Graf Zahl

Graf Zahl

2017-01-25 03:33

administrator   ~0000230

Stock ACC doesn't allow this, it errors out with a message 'latent functions not allowed outside scripts' or similar. This is clearly an oversight in gdcc then and needs to be reported there. On the engine side I did what I could by erroring out and producing a meaningful message instead of a crash. When the problem is being detected it's too late trying to continue gracefully, the ACS VM's state is already trashed.

Issue History

Date Modified Username Field Change
2017-01-24 00:48 PlutonicOverkill New Issue
2017-01-24 00:48 PlutonicOverkill File Added: CrashReport.zip
2017-01-24 00:48 PlutonicOverkill File Added: crash.pk3
2017-01-24 00:48 PlutonicOverkill Tag Attached: ACS
2017-01-24 04:47 Graf Zahl Status new => feedback
2017-01-24 04:47 Graf Zahl Note Added: 0000223
2017-01-24 05:01 Graf Zahl Note Edited: 0000223 View Revisions
2017-01-24 21:52 PlutonicOverkill Note Added: 0000228
2017-01-24 21:52 PlutonicOverkill Status feedback => new
2017-01-25 03:33 Graf Zahl Note Added: 0000230
2017-01-25 03:34 Graf Zahl Status new => resolved
2017-01-25 03:34 Graf Zahl Resolution open => not fixable