Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Invalid Page Fault With Win32::GUI Under Win98

Reply
Thread Tools

Invalid Page Fault With Win32::GUI Under Win98

 
 
Robert James Kaes
Guest
Posts: n/a
 
      07-09-2004
Hi All,
I'm trying to experiment with Win32::GUI using ActiveState Perl 5.8.4
(build 810) under Windows 98. I'm trying to follow the examples in the
Win32::GUI tutorial, but the first example in the tutorial is failing.

use Win32::GUI;
use strict;
use warnings;

my $main = Win32::GUI::Window->new(-name => "Main", -width => 110, -height => 100);

# This line is failing
$main->AddLabel(-text => "Hello, world");
$main->Show();

Win32::GUI:ialog();
exit;

# terminate the message loop when the window is closed
sub Main_Terminate { -1 }

The AddLabel line is causing an illegal operation error with the
following message:

PERL caused an invalid page fault in
module MSVCRT.DLL at 0167:78002fc5.

I installed Win32::GUI using the PPM system. If I removed the AddLabel
line, the script runs and displays the empty window.

Has any one else experienced a problem like this? Is this a known
problem, with a known work-around? Does Win32::GUI just not work under
Windows 98? Thanks for any help you can provide.
-- Robert

--
Robert James Kaes --- Flarenet Inc. --- (519) 426-3782
http://www.flarenet.com/consulting/
* Putting the Service Back in Internet Service Provider *

 
Reply With Quote
 
 
 
 
Matt Garrish
Guest
Posts: n/a
 
      07-09-2004

"Robert James Kaes" <(E-Mail Removed)> wrote in message
news(E-Mail Removed).. .
> Hi All,
> I'm trying to experiment with Win32::GUI using ActiveState Perl 5.8.4
> (build 810) under Windows 98. I'm trying to follow the examples in the
> Win32::GUI tutorial, but the first example in the tutorial is failing.
>
> use Win32::GUI;
> use strict;
> use warnings;
>
> my $main = Win32::GUI::Window->new(-name => "Main", -width =>

110, -height => 100);
>
> # This line is failing
> $main->AddLabel(-text => "Hello, world");



Please don't post to two groups and set the followup to only one; it's
really not a nice thing to do. You'll catch people (like me) unaware at
times and making me post another message is almost enough to get you
ignored.


You forgot to give the control a name:

$main->AddLabel(-text => "Hello, world",
-name => 'myLabel');

Should work when you make that correction.

Matt



 
Reply With Quote
 
 
 
 
Robert James Kaes
Guest
Posts: n/a
 
      07-15-2004
On Fri, 09 Jul 2004 18:21:37 -0400, Matt Garrish wrote:
> Please don't post to two groups and set the followup to only one; it's
> really not a nice thing to do. You'll catch people (like me) unaware at
> times and making me post another message is almost enough to get you
> ignored.


Sorry about that. My bad.

> You forgot to give the control a name:
>
> $main->AddLabel(-text => "Hello, world",
> -name => 'myLabel');
>
> Should work when you make that correction.


Yes, that fixed the problem. The Win32::GUI tutorials should probably be
fixed to mention this fact. Also, it turns out I was using an older
version of Win32::GUI that contained this bug. Newer Win32::GUI packages
contain a bug fix to prevent the crashing even if the "-name" field is not
present.

Thanks for you help.
-- Robert

--
Robert James Kaes --- Flarenet Inc. --- (519) 426-3782
http://www.flarenet.com/consulting/
* Putting the Service Back in Internet Service Provider *

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Win98 vs Win98 SE - Bobb - Computer Information 12 12-14-2006 10:46 PM
Re: Win98 vs Win98 SE - Bobb - Computer Information 2 12-06-2006 06:52 PM
Windows 98 SE RPCSS.EXE Invalid Page Fault =?Utf-8?B?TGluemk=?= Microsoft Certification 3 05-20-2005 08:24 PM
Stack fault and page fault help S.Flournoy Computer Support 2 04-17-2004 04:23 PM
win98/xp dual boot- how to remove win98 Roger Marriott NZ Computing 1 11-17-2003 08:53 PM



Advertisments