This is a minimized test case.

```
gpac -threads=-1 -i pl.m3u @#audio enc:c=aac @ -o out/a.mpd:stl:segdur=1.5:cues=cues.xml --template='$Type$_$Number$'
```

with pl.m3u:

```
avgen:dur=0.5:sr=48000:ch=2
avgen:dur=24:sr=48000:ch=2
```

and cues.xml:
```
<?xml version="1.0" encoding="UTF-8"?>
<DASHCues xmlns="urn:gpac:dash:schema:cues:2018">
<Stream id="1" timescale="1000">
<Cue cts="2000"/>
<Cue cts="3500"/>
<Cue cts="5000"/>
<Cue cts="6500"/>
<Cue cts="8000"/>
<Cue cts="9500"/>
<Cue cts="11000"/>
<Cue cts="12500"/>
<Cue cts="14000"/>
<Cue cts="15500"/>
<Cue cts="17000"/>
<Cue cts="18500"/>
<Cue cts="20000"/>
<Cue cts="21500"/>
<Cue cts="23000"/>
</Stream>
</DASHCues>
```

Sometimes it runs, sometimes it gets stuck (seemingly all the time if I put ```:strict_cues```), sometimes it asserts:
```
gpac: quickjs/quickjs.c:2005: JS_FreeRuntime: Assertion `list_empty(&rt->gc_obj_list)' failed.
Abandon
```

Am I doing anything wrong?
quickjs random assert or stuck in loop (or success)
This is a GitHub Issue
repo:gpac
owner:gpac
Title : quickjs random assert or stuck in loop (or success)
Issue date:

--- start body ---
This is a minimized test case.

```
gpac -threads=-1 -i pl.m3u @#audio enc:c=aac @ -o out/a.mpd:stl:segdur=1.5:cues=cues.xml --template='$Type$_$Number$'
```

with pl.m3u:

```
avgen:dur=0.5:sr=48000:ch=2
avgen:dur=24:sr=48000:ch=2
```

and cues.xml:
```
<?xml version="1.0" encoding="UTF-8"?>
<DASHCues xmlns="urn:gpac:dash:schema:cues:2018">
<Stream id="1" timescale="1000">
<Cue cts="2000"/>
<Cue cts="3500"/>
<Cue cts="5000"/>
<Cue cts="6500"/>
<Cue cts="8000"/>
<Cue cts="9500"/>
<Cue cts="11000"/>
<Cue cts="12500"/>
<Cue cts="14000"/>
<Cue cts="15500"/>
<Cue cts="17000"/>
<Cue cts="18500"/>
<Cue cts="20000"/>
<Cue cts="21500"/>
<Cue cts="23000"/>
</Stream>
</DASHCues>
```

Sometimes it runs, sometimes it gets stuck (seemingly all the time if I put ```:strict_cues```), sometimes it asserts:
```
gpac: quickjs/quickjs.c:2005: JS_FreeRuntime: Assertion `list_empty(&rt->gc_obj_list)' failed.
Abandon
```

Am I doing anything wrong?
--- end body ---
