Menu

#13 perl.exe crashes when popup opens

open
nobody
None
5
2005-05-19
2005-05-19
Jan Ploski
No

Reporting against SAMIE 2.0:

The popups.pl example included in the SAMIE
distribution reliably crashes the Perl interpreter on
my machine. The usual Windows message box about memory
access violation appears; the reported addresses vary,
sometimes it also says "unknown software exception".
The popups themselves appear as expected and IE keeps
running after the Perl crash.

In fact, the same happens when I run code as simple as

StartIE();
Navigate("http://localhost/test.html");
ClickLink("Popup Test", "popup");

With test.html being a file with a single A element and
target="_blank".

The crash occurs even if I comment out the handler for
WindowEvent2 in the Event routine, and regardless of
whether the "popup" parameter is passed to ClickLink or
not.

MSIE Version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
This is Windows XP with Service Pack 2 installed.
ActiveState Perl build 811.

If the problem is not reproducible in your environment,
I can help with debugging if you provide some advice
what I should try.

Discussion

  • Jan Ploski

    Jan Ploski - 2005-05-19

    Logged In: YES
    user_id=86907

    Some more information: the crash happens when
    $IEDocument->all($i)->click() is invoked in ClickLink - the
    next statement is not executed any more. I can also see the
    Event callback entered a few times after then:

    CLICKLINK: Before click()
    innertext = Popup Test
    EVENT: entering
    Event triggered: 'StatusTextChange'
    EVENT: leaving
    EVENT: entering
    Event triggered: 'NewWindow3'
    Event->NewWindow3Event->Got new Window Event Inside Event
    Subroutine
    EVENT: leaving
    EVENT: entering
    Event triggered: 'NewWindow2'
    Event->NewWindow2Event->Got new Window Event Inside Event
    Subroutine *******
    EVENT: leaving
    EVENT: entering
    Event triggered: 'CommandStateChange'
    EVENT: leaving

    (no more output from Event after that)

     
  • Jan Ploski

    Jan Ploski - 2005-05-25

    Logged In: YES
    user_id=86907

    I think I have found a simple solution to this problem: let the
    NewWindow3 event be handled the same way as NewWindow2.
    Then the NewWindow2 event is not issued and Perl does not
    crash either.

    This bug is indeed specific to SAMIE on Windows XP SP 2,
    judging by the description on:

    http://msdn.microsoft.com/workshop/browser/webbrowser/reference/events/newwindow3.asp

     

Log in to post a comment.

MongoDB Logo MongoDB