I have created a simple threading module that runs queued subroutines simultaneously. It works great standalone, but I am now integrating it with a larger system. This system has dozens of objects, each which may need to reference data from other objects. Therefore I create one context object that stores indexed references to each object. Each object created also has a reference back to the context object.

I then run the thread module, integrated with the larger system, and everything works great. The threads are created and run the queued subroutines simultaneously. However when I join the threads, I get this error:

panic: regfree data code 'ð' during global destruction.

The data code is different every time. I suspected it had to do with perl's object cleanup being messy due to my references so I wrote a cleanup routine to walk through the context, deleting all references and undeffing all objects. However even after this routine is run, one or two objects are still not destroyed (as indicated using print statements in a DESTROY routine appearing at the time of the join and not the undef executed during the cleanup) and the error above still occurs.

I have googled this to no avail. I can't be the only one hitting this problem. Any advice on the true cause of the problem, or another solution for cleaning up all my objects/references so that the threads can join without this error?


In reply to panic: regfree data code 'ð' during global destruction. error when joining threads by somekindafreak

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.