Giter Club home page Giter Club logo

Comments (22)

lojjic avatar lojjic commented on June 20, 2024

The crash only happens with Prototype 1.6.1.0. Downgrading to 1.6.0.* makes the crashing stop.

Also, IE7 is fine with either version.

from pie.

jamsi avatar jamsi commented on June 20, 2024

Downgrading doesn't seem like a good fix to me =\

from pie.

lojjic avatar lojjic commented on June 20, 2024

Yeah, I'm not saying it's a fix, just wanted to mention it here for informational/debugging purposes.

from pie.

ecunningham avatar ecunningham commented on June 20, 2024

Any word on if or when this issue might be fixed. I would love to use this solution for an upcoming site launch but I use prototype 1.6.1 and downgrading is not an option.

from pie.

lojjic avatar lojjic commented on June 20, 2024

Unfortunately I've got no clue how to proceed working around this. It appears that Prototype 1.6.1 causes the crash when used with similar HTC-based products, so getting it fixed in Prototype itself is probably our best bet.

I see someone has already opened a ticket in Prototype's tracker about crashing with curved-corner.htc -- perhaps you could inquire there and add a note that the same happens with PIE.

from pie.

ecunningham avatar ecunningham commented on June 20, 2024

Thank you

from pie.

savetheclocktower avatar savetheclocktower commented on June 20, 2024

I'm Andrew Dupont, one of the co-maintainers of Prototype.

From what I gather about this bug, neither PIE nor Prototype appears to be at fault. The bug has been reported with Prototype and other HTCs (like the popular PNG fix), and with PIE and MooTools 1.3. It seems to be a specific sort of conflict between HTCs and augmenting DOM node host objects (the constructors for specific node types, like HTMLDivElement). The latter has been present in other browsers for years, but was a new feature to IE8.

So, in other words, it's IE's fault, but it has implications for both Prototype and HTCs like PIE.

from pie.

lojjic avatar lojjic commented on June 20, 2024

Thanks for the info, Andrew. I had figured as much. shakes fist at IE

So, that said, do you have any ideas how to proceed getting around this? I'm happy to help trying code changes or whatnot, but since it's a crash is there even a way to get good debugging info to trace the exact code triggering the crash?

I'd hate for the answer to be to not use PIE with Prototype or MooTools.

from pie.

savetheclocktower avatar savetheclocktower commented on June 20, 2024

Right, and neither do we want that to be the answer, since HTCs are a useful (if arcane) tool in many web developers' toolboxes.

One commenter on our bug says he's in the middle of a deep dive into this issue. I might end up doing my own as well. I'm perfectly willing to change our code to work around the problem, as long as I can do so without losing our ability to define methods directly on DOM nodes' prototypes (since that feature makes Prototype far more performant on IE8 than otherwise). If not, I should at least be able to create an "opt-in" workaround.

from pie.

lojjic avatar lojjic commented on June 20, 2024

Excellent, thanks. I'll keep an eye on your ticket for progress. Please let me know if there's anything you need me to do from my end to help out.

The ticket:
https://prototype.lighthouseapp.com/projects/8886/tickets/1107-ie8-fatal-crash-when-prototypejs-is-loaded-with-rounded-cornershtc

from pie.

bghouse avatar bghouse commented on June 20, 2024

Has anyone found a fix for this yet? I have a photo gallery that needs prototype and I'm having the same crashing problem on IE8

from pie.

lojjic avatar lojjic commented on June 20, 2024

From the Prototype bug report it doesn't look like there's a fix yet.

from pie.

savetheclocktower avatar savetheclocktower commented on June 20, 2024

So this recent StackOverflow comment explains the problem. I have no way of knowing whether this is true, but it sounds convincing.

The suggested fix appears sound. It's ugly — it requires modifying the Prototype source code — but if I understand the flaw correctly, there's no way around that.

lojjic, does the testcase still crash IE8 on your machine? I can't get it to do so in my XP virtual machine. If it's still a crasher for you, hopefully we can figure out a way to detect whether the fix has been applied — even something ugly like a version string sniff — so that I can tell those versions of IE8 not to try to extend the prototypes of DOM nodes.

from pie.

lojjic avatar lojjic commented on June 20, 2024

Yeah the testcase still elicits the crash for me, even after updating it to use the more recent Prototype 1.7.0.0 version. I'm using a XP VM with IE8 as well, but I haven't applied updates to it in a while so that makes sense if it has indeed been fixed by a recent Windows update.

from pie.

savetheclocktower avatar savetheclocktower commented on June 20, 2024

My version of IE8 is 8.0.6001.18702. What's yours?

from pie.

lojjic avatar lojjic commented on June 20, 2024

The same.

from pie.

savetheclocktower avatar savetheclocktower commented on June 20, 2024

HOW INFURIATING

I don't suppose there's any fool-proof way to detect the use of PIE on a page, is there? I can fix this by preventing IE8 from extending DOM prototypes across the board, but I really don't want to do that.

from pie.

lojjic avatar lojjic commented on June 20, 2024

Indeed it is! :/

The closest you could get is to test for the presence of the window.PIE object, but I'm not sure you could reliably use that as an indicator due to the way HTC files load in and get initialized asynchronously. There's no guarantee the object will have been initialized by the time Prototype's feature detection gets executed.

I should point out that PIE now ships with a standalone JavaScript version which can be used instead of the HTC: http://css3pie.com/documentation/pie-js/ -- using this instead of the HTC, while less convenient, does avoid the crash. So this issue is somewhat less severe than when this ticket was created since there is at least another option.

from pie.

savetheclocktower avatar savetheclocktower commented on June 20, 2024

HAHAHA DISREGARD THAT (I can reproduce it now)

Researching a workaround. If I can't find one, "use PIE.js" will be the official way to resolve this godforsaken issue.

from pie.

savetheclocktower avatar savetheclocktower commented on June 20, 2024

Here's an even-more-basic testcase, one which demonstrates that the problem is far deeper than either of our libraries. Simply trying to read a property within an HTC produces a crash if a node's prototype has been augmented.

If I wrap the code that adds HTMLDivElement.prototype.foo in a setTimeout, or defer its execution some other way, everything works fine. But that's not feasible for Prototype because the methods need to be there by the time the next script is evaluated.

I'll keep thinking about it, but I'm damn near out of ideas.

from pie.

brandonramirez avatar brandonramirez commented on June 20, 2024

I cannot recreate this. According to a stackoverflow article, a Windows Update fixed this issue by fixing IE itself.

I have tried prototype 1.6.1 and prototype 1.7.0, both with PIE.htc included, and no crash.

from pie.

emkamal avatar emkamal commented on June 20, 2024

I have the latest windows update. but it still crashed...
I've also tried using IETester, crashed too
I've also tried IE8 browser mode on IE9, the same crash appear

so, does "use pie.js" still the official way of doing this or is there any other new solution?

from pie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.