<i>likely race condition with package require in several threads causing error</i> status still Open with 3 other changes
by
.
D 2025-07-17T19:33:38.261
J icomment The\smagicsplat\sdistro\sdoesn't\suse\sthe\s//zipfs\sand\sit\scan\salso\sfail.\r\n\r\nNote:\sI\scan\sget\sthe\sfailure\swith\sother\spackages,\snot\sjust\smath.\sI\stried\sto\ssee\sif\sthe\sother\spackages\swith\serrors\shad\ssomething\sin\scommon\swith\sthe\smath\spackage,\sbut\swas\sunable\sto\sfind\sa\scorrelation.\sI\sam\sjust\susing\spackage\smath\sin\smy\sposted\scode\ssince\sthat\sseems\sto\sfail\smore\soften.\r\n\r\nIf\sI\schange\sthe\scode\sto\sdo,\r\n\r\ncatch\s{package\srequire\smath}\r\ncatch\s{package\srequire\smath}\r\ncatch\s{package\srequire\smath}\r\npackage\srequire\smath\r\n\r\nthen\sthe\serror\srate\sis\slowered,\sbut\sif\sI\sincrease\sthe\snumber\sof\sthreads,\sfrom\ssay\s3,\sto\s25,\sthe\serror\srate\sis\sincreased.\r\n\r\nThe\saccess\sviolation\sonly\shappens\swith\sthe\stclkit\sfrom\sbawt.\sSince\sI\sdon't\sbuild\sthat,\sI\sdon't\sknow\show\sto\sget\ssymbols\sfor\sit.\sWhat\sI\sdo\ssee\sis\sby\susing\svisual\sstudio\s2022\sto\sinspect\sthe\scrash\sdump\sfile\sthat\swindows\screates.\r\n\r\nIn\sorder\sto\soutput\sa\stk\smessagebox,\sI\salso\sdo\sa\spackage\srequire\sTk\s(after\san\serror\son\spackage\smath),\sand\son\soccasion\sin\sthe\stclkit\sversion,\sthis\swould\sget\san\serror\ssaying\ssomething\slike,\spermission\serror.\sI\sattribute\sthat\sto\ssome\ssort\sof\stiming\swhere\sin\sa\stclkit,\sthe\stk\sdll\shas\sto\sbe\swritten\sout\sto\sthe\stemp\sdirectory,\sand\sis\spossibly\snot\sfully\swritten\s(or\sclosed)\sby\sone\sthread,\swhile\sthe\sother\sthread\sis\strying\sto\sdo\sthe\ssame\sthing.\sTo\smitigate\sthat,\sso\sI\scan\sget\sthe\smessage\sout,\sI\sdo\sthe\ssame\sthing,\r\n\r\ncatch\s{package\srequire\sTk);\spackage\srequire\sTk\r\n\r\nSince\sit\smostly\sworks,\sit\sseems\sunlikely\sthat\sthe\sfile\sencoding\sis\san\sissue.\sThe\sfile\smath.tcl\sis\son\sdisk\s.../lib/tcllib2.0/math.tcl\swith\sthe\smagicsplat\sdistro,\sand\smy\stext\seditor\ssays\sit\sis\swindows\s1252\sencoding;\sit\scan\stell\sme\sif\sit\sis\sBOM\sencoding\sand\salso\sif\sthere\swere\sany\scharacters\sthat\sare\snot\sstandard\sascii.\r\n\r\nThe\sreason\sI\suse\smagicsplat\sand\sbawt\sis\sthat\sI\sdon't\sknow\show\sto\sget\sall\sthe\spackages\son\sa\sself\sbuilt\stcl/tk\sfrom\ssource\son\slinux.\sThere\sI\shave\sin\sthe\spast\sbuilt\stcl/tk\swith\ssymbols\sand\srun\susing\sgdb.\r\n\r\nIn\smy\stest\scode,\sI\sdo\sa\spackage\srequire\smath\sat\sthe\stop\sof\sthe\smain\sscript\sthinking\sif\sit\swas\sloaded\sthere,\sit\smight\sthen\swork\sinside\sthe\sthreads,\sbut\sthat\sdidn't\sstop\sthe\sfailures.
J login anonymous
J mimetype text/plain
K 61c01e0edb08a9ed905aefdf17ce113da303c77b
U anonymous
Z 418b17c6ca99368aaead7a907f0a7633