Hello *, I work on a solaris platform and the perl 5.8.5 release. I used Tk to design a small front end. I came across a problem and I knew i had to get here. The Tk window, apparently tries to read this file called '.font.cache-1' from my home directory. This file is not present by default in UNIX though. TK creates it. So, the first time I invoke my program, i get a 'segmentation fault' and the code fails. I immediately noticed that a file named '.font.cache-1' got created in my home directory. Now, when the tk program is invoked again, all works fine. I delete this '.font.cache-1' file and invoke again, and all goes down again. Can someone help? here is a sample code which always fails. For the first time that is.
use Tk; # create first main window $mw = MainWindow->new( -title => 'Test1' ); # if I remove the following line, no "segmentation fault" occurs. # even no pack is required to get the "segm fault" $label = $mw->Label(); # Display first window Tk::update($mw); # and destroy it $mw->destroy(); # create second main window $mw1 = MainWindow->new( -title => 'Test2' ); $label1 = $mw1->Label()->pack(); # main loop MainLoop;
Any ideas? taureau

In reply to Perl Tk - .font.cache-1 file by taureau

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.