logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Segfault on trivial program: msg#00083

Subject: Segfault on trivial program
I am using WxPerl 0.27,  Perl v5.8.5 built for i386-linux-thread-mult on
Fedora 3.

Here is an example of a segfault and is caused by the SetSizer line. You
get the segfault when the program is terminated.
When the SetSizer line is removed, the program terminates without a
segfault.

Does anyone have any ideas why this is happening?

Thanks,

Peter

#!/usr/bin/perl
use Wx;

package MyApp;

use strict;
use vars qw(@ISA);

@ISA=qw(Wx::App);

sub OnInit {
  my ($this)  = @_;
  my ($frame)  = MyFrame->new("Minimal wxPerl app",
                              Wx::Point->new(50,50),
                              Wx::Size->new(450,350)
                             );
  $this->SetTopWindow($frame);
  $frame->Show(1);
  return 1;
}

package MyFrame;

use strict;
use vars qw(@ISA);

@ISA=qw(Wx::Frame);
use Wx qw(:everything);

sub new {
  my ($class) = shift;
  my ($title,$point,$size) = @_ ; 
  my ($this) = $class->SUPER::new(undef, -1, $title, $point, $size);

  my $tsz = Wx::BoxSizer->new( wxVERTICAL );
  my $fr = Wx::BoxSizer->new( wxHORIZONTAL ); 
  $tsz->Add( $fr, 1, wxGROW );
  $fr->Add( Wx::Button->new($this,-1,'Button 2'),0,0);
  $tsz->Add( $fr, 1, wxGROW );
 
  $this->SetAutoLayout(1);
  $this->SetSizer($tsz);
  $tsz->Fit($this);
  $tsz->SetSizeHints($this);
  
  return $this;
}

package main;
my ($app)  = MyApp->new();
$app->MainLoop();





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe