Crash when AmigaGuide doesn't start with "main" node
mattrust opened this issue · comments
Describe the bug
An attempt to view an AmigaGuide file where the 1st node's name isn't "main" segfaults.
To Reproduce
Steps to reproduce the behavior:
-
Create an AmigaGuide file where the name of the 1st node isn't "main", e.g.
@database "BLAJADDA"
@node notmain "Forrest Gump"
Test
@endnode -
View it with Multiview, e.g.:
multiview test.guide
Expected behaviour
Display the content of the node.
Screenshots
n.a.
Architecture
- linux (hosted)
not yet tested:
- Amiga (including UAE, Vampire cards)
- pc (native)
- Raspberry Pi
- mingw
- darwin
- other:
CPU
- x86_64
not yet tested
- i386
- m68k
- arm
- ppc
- other:
Version
Provide the Git ID from AboutAROS (call menu Wanderer>AROS>About)
Additional context
#0 0x00000000416981c6 in GetFileLock (cl=0x41104820, obj=0x41a957e0, file=0x4168017c "main", nodetype=0x41ac027e) at /home/mazze/projects/aros-src/workbench/classes/datatypes/amigaguide/./util.c:640
#1 0x000000004168fbb5 in dtm_goto (cl=0x41104820, obj=0x41a957e0, msg=0x41ac03a0) at /home/mazze/projects/aros-src/workbench/classes/datatypes/amigaguide/./amigaguideclass.c:1362
#2 0x000000004168be7e in AmigaGuide_Dispatcher (CLASS=0x41104820, self=0x41a957e0, message=0x41ac03a0) at /home/mazze/projects/aros-linux-x86_64-dbg/bin/linux-x86_64/gen/workbench/classes/datatypes/amigaguide/amigaguide/amigaguide_start.c:386
#3 0x00000000416974be in GotoObject (cl=0x41104820, obj=0x41a957e0, ginfo=0x41680090, name=0x4167fd4c "main", line=0) at /home/mazze/projects/aros-src/workbench/classes/datatypes/amigaguide/./util.c:336
#4 0x000000004168e716 in dtm_asynclayout (cl=0x41104820, obj=0x41a957e0, msg=0x41ac05c0) at /home/mazze/projects/aros-src/workbench/classes/datatypes/amigaguide/./amigaguideclass.c:837
#5 0x000000004168be5b in AmigaGuide_Dispatcher (CLASS=0x41104820, self=0x41a957e0, message=0x41ac05c0) at /home/mazze/projects/aros-linux-x86_64-dbg/bin/linux-x86_64/gen/workbench/classes/datatypes/amigaguide/amigaguide/amigaguide_start.c:385
#6 0x000000004169999f in asyncmethodfunc (argptr_unused=0x0, argsize_unused=0, SysBase=0x41000750) at /home/mazze/projects/aros-src/workbench/classes/datatypes/amigaguide/./process.c:283
Crash happens in line:
if(data->ag_ActualObject->ago_AGNode != NULL)
Because:
/home/mazze/projects/aros-src/workbench/classes/datatypes/amigaguide/./util.c:640
(gdb) p data->ag_ActualObject
$13 = (struct AmigaGuideObject *) 0x0