ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcltk-perl
tcltk-perl
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved