GaijinPunch has asked for the wisdom of the Perl Monks concerning the following question:

NOTE: This is *PROBABLY* a CSS problem, but the change I made included a bit of Perl, and let's face it - most people here are smarter than most people on web developer forums. :)
---------------

While I've got the mind to tell people to give M$ the finger and switch to Firefox, I've got to think about people not blessed with an imagination. okay, here it goes.

My site: http://dynamic5.gamespy.com/~japangaming

There's one page in particular that I made a VERY small change to. An example of the production page is:
http://dynamic5.gamespy.com/~japangaming/game_information.cgi?system=dreamcast&base=borderdown
The updated URL would be:
http://dynamic5.gamespy.com/~japangaming/game_information_beta.cgi?system=dreamcast&base=borderdown

The only difference is the "view high res" link, below the games description. To get this, I added the following:
use Image::Size; // new module to get jpg size ( $pic_x, $pic_y, $pic_type ) = imgsize( $pic_loc ); if ( $pic_x > $pic_width ) { $large = "true"; } if ( $large eq "true" ) { print "<a href=\"$link_server/game_scan.cgi?system=$system&base=$ +base\">View High Res<br>\n"; }
The result, is that IE almost always crashing when loading this page. Firefox? Never. If not on load, then if you go to the "view high res" link, and then either click the return button on your browser, or the "return" image link on the page, it will almost definitly crash. I'll throw in a few examples of other games' URLs just in case.

I cannot for the life of me figure this out. I even stuck the module in the production version, and ran the line of code which examines the jpgs, just to make sure they were n't mucking up the works, and from what I can tell, they're not.

Any help is greatly appreciated.
Cheers,
GP

Other examples:
http://dynamic5.gamespy.com/~japangaming/game_information_beta.cgi?system=saturn&base=donpachi
http://dynamic5.gamespy.com/~japangaming/game_information_beta.cgi?system=playstation&base=dodonpachi
http://dynamic5.gamespy.com/~japangaming/game_information_beta.cgi?system=saturn&base=radiantsilvergun

Replies are listed 'Best First'.
Re: My CGI script keeps crashing IE (but not Firefox)
by Prior Nacre V (Hermit) on Sep 10, 2004 at 06:53 UTC

    The problem is you haven't closed the anchor tag:

    <a href="...">View High Res</a>

    And to save a little backslashitis, you can do this:

    print qq( <p> Text ... <a href="$link ...">View High Res</a> ... more ... </p> );

    Regards,

    PN5

Re: My CGI script keeps crashing IE (but not Firefox)
by tachyon (Chancellor) on Sep 10, 2004 at 07:18 UTC

    You are probably right, it is not a perl problem. The actual issue is a null pointer bug in mshtml.dll at offset 000cc4b4. It is reported here M$ Bug Report The suggested resolution is to update IE.

    This obviously does not solve your issue but it is unlikely to be simple. For example if I go to your page directly I will crash IE (most but not all of the time of course!). However if I save the page out of Firefox it never gives an issue and following the High Res link works to boot.

    You are basically exercising almost all features of IE with JS, CSS and ActiveX for the Flash. If you have a look at what this DLL actually contains you will see:

    [ ] MSHTML.DLL Import Ordinal Hint Function + Entry Point ------ ----------- ----------- ------------------------------------ +---- ----------- Export Ordinal Hint Function + Entry Point ------ ----------- ----------- ------------------------------------ +---- ----------- [C ] 16 (0x0010) 15 (0x000F) com_ms_osp_ospmrshl_classInit + 0x001DE439 [C ] 17 (0x0011) 16 (0x0010) com_ms_osp_ospmrshl_copyToExternal + 0x001DE720 [C ] 18 (0x0012) 17 (0x0011) com_ms_osp_ospmrshl_releaseByValExte +rnal 0x001DE7BF [C ] 19 (0x0013) 18 (0x0012) com_ms_osp_ospmrshl_toJava + 0x001DE468 [C ] 1 (0x0001) 0 (0x0000) CreateHTMLPropertyPage + 0x0019548E [C ] 2 (0x0002) 1 (0x0001) DllCanUnloadNow + 0x000C193F [C ] 3 (0x0003) 2 (0x0002) DllEnumClassObjects + 0x001923BC [C ] 4 (0x0004) 3 (0x0003) DllGetClassObject + 0x000E3508 [C ] 5 (0x0005) 4 (0x0004) DllInstall + 0x0019212C [C ] 6 (0x0006) 5 (0x0005) DllRegisterServer + 0x001922EC [C ] 7 (0x0007) 6 (0x0006) DllUnregisterServer + 0x00192384 [C ] 8 (0x0008) 7 (0x0007) MatchExactGetIDsOfNames + 0x0012302C [C ] 9 (0x0009) 8 (0x0008) PrintHTML + 0x001948D2 [C ] 10 (0x000A) 9 (0x0009) RNIGetCompatibleVersion + 0x001DE433 [C ] 11 (0x000B) 10 (0x000A) RunHTMLApplication + 0x001DB463 [CR ] 12 (0x000C) 11 (0x000B) ShowHTMLDialog + 0x001D8995 [CR ] 13 (0x000D) 12 (0x000C) ShowHTMLDialogEx + 0x001D899E [C ] 14 (0x000E) 13 (0x000D) ShowModalDialog + 0x001D8911 [CR ] 15 (0x000F) 14 (0x000E) ShowModelessHTMLDialog

    The error offset I get is between the DllGetClassObject and the DllCanUnloadNow entry points so is rather unhelpful as it does not point to an obvious cause like a function called RandomCrash(;-).

    It is probably a parsing error of some description. I suggest you run HTML Tidy over the output and correct any major defects it finds in the HTML. This may well fix the error. For example on line 17 you have <a></a> which might choke a parser that was not ready for it. Also on line 23 where you have a lot of JS calls you use all sorts of variable syntax. May be no issue but I am vaguely supicious of the JS due to RunHTMLApplication function in the errant DLL. If not good luck.

    cheers

    tachyon

Re: My CGI script keeps crashing IE (but not Firefox)
by CountZero (Bishop) on Sep 10, 2004 at 07:23 UTC
    There are more errors on your page. I suggest you run the page though FireFox and "Validate" the HTML (you do have the excellent Web Developer extension installed?).

    You will see that some other anchor tags are unclosed or wrong (such as <a/> instead of </a>.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

      Thanks to everyone for their replies. I can't believe it came down to an unclosed href (and that it would crash IE... I just assumed all text after it would show up as part of the link). And yeah, I"m sure there are other problems in the code generated. I just did a massive overhaul about 2 weeks ago, and difinitely didn't get it in a perfect state.
        that's ie for ya.