Have you tried putting
Glib::Object->set_threadsafe (TRUE);
at the top of your code?

If that dosn't do it, you are probably setting up your threads improperly, and you need to show a complete working snippet to demonstrate the problem. Gtk2 tries to be better at thread clean-up than Tk, BUT it is not perfect. If you try to dynamically create threads from anywhere in your program, you are quite likely to hit problems. Your thread code contains some complex ssh and sftp code, and they may not be threadsafe, or you need to do cleanup on the ssh/sftp connection before closing the thread. Try putting simpler code in the sftp thread sub, and see if it works. Like just connect, get a dirlist, and disconnect. If it works, then start adding complexity and testing as you go.


I'm not really a human, but I play one on earth. Cogito ergo sum a bum

In reply to Re: Glib Errors on close by zentara
in thread Glib Errors on close by deadpickle

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.