<i>TclOO + coroutine + event loop = coredump</i> status still Open with 4 other changes
by
.
D 2022-08-12T21:18:48.348
J icomment I've\sjust\sfound\sa\sbug\sthat\sI\scan\sreproduce\son\s8.6.2\s(Win32)\swith\sthe\scode\sbelow.\s\s\sIt\sinvolves\s`yield`ing\sa\scoroutine\sin\sa\smethod,\sthen\sdoing\san\s`info\sframe`\sthat\sintrospects\sthe\smethod.\sI\scame\sacross\sthis\sticket\swhile\slooking\sfor\sknown\sissues,\sand\sI\sthink\sthere's\sa\schance\sit\sis\sanother\ssymptom\sof\sthe\ssame\sproblem.\r\n\r\n```tcl\r\noo::class\screate\sLogDies\s{\r\n\s\smethod\sprocess\s{args}\s{\r\n\s\s\s\sputs\s"[info\scoroutine]\sStarting"\r\n\s\s\s\sset\srandMs\s[expr\s{\s1050\s+\sint([tcl::mathfunc::rand]\s*\s1000)\s}]\r\n\s\s\s\safter\s$randMs\s[info\scoroutine]\s;\syield\r\n\s\s\s\sputs\s"[info\scoroutine]\sBack\sfrom\syield\s$randMs\sms"\r\n\s\s\s\sinfo\sframe\s0\s\r\n\s\s\s\s#or:\sapply\s{{}\s{\sinfo\sframe\s-1\s}}\r\n\s\s}\r\n}\r\n\r\nset\sobj\s[LogDies\snew]\r\ntime\s{\scoroutine\sc[incr\sctr]\s$obj\sprocess\sa1\sa2\s}\s100\r\n```\r\n\r\n-\sI\scan\sconfirm\sthat\sthe\scode\sto\sreproduce\sthis\sticket\scauses\san\sAccess\sViolation\s(0xc0000005)\sfault\son\s8.6.2\s(Win32).\r\n-\sMy\scode\sabove\sreproduces\sa\sbug\sprobabilistically,\snot\sdeterministically.\sI\ssuspect\sthere\sis\sa\smore\sconcise\sdeterministic\sreproduction\s(working\son\sit,\sand\son\stesting\swith\sa\smore\srecent\sbuild).\r\n-\sWildly\sguessing\sbased\son\sdfk's\scomment\s(2022-06-28\s12:04),\sdoesn't\sa\scoroutine\sdelete\sits\sCommand\swhile\sit\sis\srunning?\r\n-\sRe\show\sa\smethod\sstack\sframe\sis\sinvolved:\sin\smy\scase\sit\sis\sthe\sattempt\sto\sintrospect\sthe\smethod\sstack\sframe\sthat\scauses\sthe\sprocess\sto\sdie.\sI\sdon't\sget\sa\sfault\sif\sI\suse\s`apply\s{{}\s{\sapply\s{{}\s{\sinfo\sframe\s-1}}\s}}`\sor\s`info\sframe\s-1`\swithin\sthe\smethod.
J login twylite
J mimetype text/x-markdown
J username twylite
K 87271f7cd6ab29a076b36e31041a8c940c20d943
U twylite
Z 2120a68487dc0d4cc009322615c0e5e6