Re: [tcltk-perl] Code for Tcl mainloop routines
by Vadim Konovalov other posts by this author
May 21 2005 7:36AM messages near this date
Re: [tcltk-perl] Code for Tcl mainloop routines
|
RE: [tcltk-perl] Code for Tcl mainloop routines
> that's what I think happens
> dynamically when I do the following on my Linux box:
>
>
> ------------
> use Tcl; # leads libtcl8.4.so to be loaded
> use Tk; # leads misc .so files from perl-Tk to be loaded
>
> $mw = new MainWindow;
> Tk::MainLoop;
> ---------------
>
> and the result is
> Segmentation fault (core dumped)
>
>
Well, this very small code does not do segmentation fault on Windows,
and indeed does segmentation fault on Linux.
>
> When I investigated that and looked at the core file with gdb, I found that
> the segfault occurs in perl-Tk's CreateFrame just after calling
> Tcl_GetStringFromObj. This function exists in both perl-Tk (in one of its .so
> file, in Linux) and in libtcl8.4.so. Apparently, the dynamic loader chooses
> the latter whereas perl-Tk expected the former to be called. This results in
> an invalid char* pointer being returned; when it is dereferenced, the program
> crashes..
>
>
Well, thank you a lot for providing analyzis.
Actually I tried my code long time ago both on Windows and Linux, and it
did not crashed. Now I think this is due to perl/Tk version, which
probably was 800.024, that one without Unicode support.
In my opinion, this is perl/Tk's fault in a name clash.
I wonder, will static building of perlTk help to avoid segmentation fault?
I did different rebuilds of Perl, Tcl/Tk on Windows and very little on
Linux.
I succeeded statically building into perl DLL entire Tcl/Tk.
I'll try moving my previous experience to Linux and will see what
combination will work.
Best regards,
Vadim.
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Tcltk-perl mailing list
Tcltk-perl@[...].net
https://lists.sourceforge.net/lists/listinfo/tcltk-perl
|