Invalid Page Fault With Win32::GUI Under Win98

Discussion in 'Perl Misc' started by Robert James Kaes, Jul 9, 2004.

  1. 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::Dialog();
    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 *
     
    Robert James Kaes, Jul 9, 2004
    #1
    1. Advertising

  2. Robert James Kaes

    Matt Garrish Guest

    "Robert James Kaes" <> wrote in message
    news:p...
    > 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
     
    Matt Garrish, Jul 9, 2004
    #2
    1. Advertising

  3. 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 *
     
    Robert James Kaes, Jul 15, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gordon

    Unicode Support In chinese Win98

    Gordon, Oct 22, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    350
    Gordon
    Oct 22, 2003
  2. Vanga Sasidhar
    Replies:
    1
    Views:
    439
    Bruno Sirianni
    Apr 3, 2004
  3. =?Utf-8?B?V2FzaSBSZWhtYW4=?=

    How can I run WebService on Win98 System

    =?Utf-8?B?V2FzaSBSZWhtYW4=?=, Jul 3, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    526
    MS News \(MS ILM\)
    Jul 4, 2004
  4. Reuben L.
    Replies:
    9
    Views:
    485
    William Tasso
    Nov 1, 2003
  5. Replies:
    4
    Views:
    371
    dn.perl
    Aug 4, 2011
Loading...

Share This Page