Skip to content
This repository

IE7 Crash with Mootools Core 1.4.2 #2163

Closed
isfalse opened this Issue December 07, 2011 · 41 comments

8 participants

Sébastien Axinté Olmo Maldonado Matthew Gast Dave Methvin Arian Stolwijk Kai Gülzau jbgithub André Fiedler
Sébastien Axinté

Platform : Windows XP SP2, IE Version 7.0.5730.11
Tested with Mootools 1.4.2 Full Core Version without compatibility, compressed

Backward issue on IE7 with Mootools Core 1.4.2, addEvents or clones (i don’t know) cause IE7 crash when “Backward Page Button” is pressed or “Refresh Page Button” is pressed.

I have a lots of Class and functions in my scripts and it works fine with Mootools Core 1.4.1. I've search before in my scripts if some errors was in, but that issue appears when "addEvent/addEvents/cone" are called and if i use Mootools Core 1.4.2.

Thanks

Olmo Maldonado
Owner
Sébastien Axinté

Yes, try to open this url in IE7 and refresh the page. My IE7 crash.

http://jsfiddle.net/sebastienaxinte/SU349/

Olmo Maldonado
Owner

I'm having trouble reproducing. I have the same setup as you do. The only thing I can attribute to the crash is that jsfiddle has an unload problem and that you're using console.log :D.

You should enable script debugging in IE and confirm that's the reason that it crashes. I might also suggest to host the file yourself and link us.

For the moment, worksforme. I'll close and feel free to reopen.

Olmo Maldonado ibolmo closed this December 20, 2011
Matthew Gast

I put together a quick test case which I can reliably reproduce the issue on. I've hosted it on my personal site to take out jsfiddle as the culprit.

http://iamincendium.com/github-2163/mootools-1.4.1.htm
http://iamincendium.com/github-2163/mootools-1.4.2.htm

Refresh the page and nothing happens. Click the button (which has an event handler assigned to it) and then reload and IE 7 will crash on the 1.4.2 page, but not 1.4.1.

Matthew Gast

Also wanted to add that commenting out line 742 in Element.js seems to stop IE from crashing.

http://iamincendium.com/github-2163/mootools-1.4.2-working.htm

Sébastien Axinté

Hi,

I've try your example (incendium) and it works both on my config, weird...
So i also posted and example who crashed on my config. (without console.log())

This works :
http://www.apixelife.com/github/2163/mootools-core-1.4.1.html

This one doesn't :
http://www.apixelife.com/github/2163/mootools-core-1.4.2.html

Thanks

Olmo Maldonado ibolmo reopened this December 20, 2011
Olmo Maldonado
Owner

Just tried all three links, and I still can't reproduce it. I'm at my wits end. I'll leave it open and ask one of the other developers to try to reproduce. Sorry for the inconvenience.

In parallel, we're releasing 1.4.3 with a fix that -- as an educated guess -- might be related to this: https://github.com/mootools/mootools-core/pull/2176/files

If you would please try to apply that diff to your copies of 1.4.2 and see if the problem is solved or still present.

Olmo Maldonado ibolmo closed this December 20, 2011
Olmo Maldonado ibolmo reopened this December 20, 2011
Matthew Gast

Here is exactly how I was able to reproduce the crash:

1) Close all running instances of IE7
2) Open IE7 and pull up http://iamincendium.com/github-2163/mootools-1.4.2.htm immediately (I think if you pull up a page with a working version of MooTools first this will cause the issue not to happen)
3) Hit Ctrl+R to reload page
4) Click button (hello should change to world)
5) Hit Ctrl+R again
6) IE7 crashes

Applying the patch you mentioned seems to have fixed the issue (IE7 no longer crashes using the steps above on http://iamincendium.com/github-2163/mootools-1.4.2.htm).

Olmo Maldonado
Owner

Thank you for the detailed instructions. I've followed your steps, but my IE7 doesn't crash :(.

I'm glad the patch fixed it, though. I'll reference it in the PR. It's troubling, though, that I couldn't reproduce it. I wonder what's wrong with my IE. Perhaps I have a patched version.

Sébastien Axinté

@ibolmo I'm sorry but i'm new with github and i've tried to add the Element.js after calling mootools-core-1.4.2.js you mentioned above but it makes JS errors... i think i don't understand what you want me to test..maybe i can try with the mootools 1.4.3 ? but i don't know where can i download this full packed version...

@incendium Just tried your test but still works for me.

Matthew Gast

@ibolmo Thanks for the fix, glad to see I can keep MooTools up-to-date. IE seems to be pretty spotty about whether or not it likes to be buggy. I'll look forward to the day when the only version of IE I have to support is 9 and up. I can only hope I don't run into any customer issues that involve selectively installed Windows updates.

FWIW, I was able to reproduce this in a relatively fresh VirtualBox VM running a fully patched XP SP3 Pro, with IE fully patched (as of the 12/13 patch Tuesday) and all of the optional .NET updates.

@isfalse Yep, it does.

Olmo Maldonado
Owner

@isfalse just modify .uid to .uniqueNumber and 'uid' to 'uniqueNumber'. You can use the diff link I provided as guidance.

@incendium hehe always. keep sending us the bugs that you find. trying to make it a habit to release maintenance releases every 2-3 weeks.

Olmo Maldonado
Owner

I'm closing this since #2176 fixes this.

Olmo Maldonado ibolmo closed this December 20, 2011
Sébastien Axinté

@ibolmo Just changed the diff in http://www.apixelife.com/github/2163/mootools-core-1.4.2.html but still crash :(

I use VirtualBox VM running XP SP2 Version 7.0.5730.11

Dave Methvin

@isfalse, open IE and go to your crashing test page, then select Tools, Manage Add-Ons, Enable or Disable Add-Ons. Make sure "Add-ons currently loaded in Internet Explorer" is selected. What do you have there? This is my list: http://gyazo.com/5ef81e147f0f0cd5f8b24b5c9c281476

If you have other plugins there they may be causing the crash. Try disabling them one at a time.

Matthew Gast

@ibolmo It looks like using @isfalse's test page crashes my IE installation as well. Here are the steps I took to reproduce it:

1) Close all running instances of IE7
2) Open IE7 and disable all addons
3) Close all running instances of IE7
4) Open http://www.apixelife.com/github/2163/mootools-core-1.4.2.html
5) Refresh page using Ctrl+R
6) IE7 crashes

I peeked at his mootools.js file and it looks like he patched it OK. Perhaps there is some attribute that IE doesn't like and crashes when it tries to clear it?

Olmo Maldonado
Owner
Matthew Gast

I unfortunately can't share my current VM, but once I get home tonight, I'll see if I can get it to reproduce on the official IE7 Virtual PC test image.

Matthew Gast

Interestingly enough, the issue didn't pop up in the official XP IE6/7 VM until after I installed one of the .NET framework updates. Without .NET, IE7 ran great with no crashes on any of the pages that caused issues on my development setup.

@ibolmo Before I try to upload a ~4GB hard disk image to my server, could you try fully patching your Windows VM (with all of the .NET frameworks and patches) and see if you are able to reproduce the issue after the fact?

Olmo Maldonado
Owner
Sébastien Axinté

@dmethvin just tried to disables my add-ons on IE7 still crashes :x
Here a screenshot of my add-ons : http://gyazo.com/b691c1d74914d19fe120f2dab5a51336

Olmo Maldonado ibolmo reopened this December 23, 2011
Arian Stolwijk
Owner
Kai Gülzau

We have the same issue in our webapplication while doing a location.href='...' on a MooTools 1.4.2 page.

http://www.apixelife.com/github/2163/mootools-core-1.4.2.html crashes and
http://iamincendium.com/github-2163/mootools-1.4.2.htm works for me.

jbgithub

@ibolmo v1.4.2 is crashing IE7 for my web app too but v1.4.1 is not, so I compared the two.

I found that line #2944 (el._fireEvent = el.fireEvent;) is cause of the problem.

I changed the code to:

if (Browser.Element){
el._fireEvent = el.fireEvent;
}

This fixes IE7 crashing for me.

Browser.Element is used on line #2732 to determine if _fireEvent should be added to Element.prototype for IE8 & IE9.

Arian Stolwijk
Owner

So that would be this commit: 79c4efe

jbgithub

@arian Yes, line #261.

Olmo Maldonado
Owner
Arian Stolwijk
Owner

Why not use Element.implement, like any other method...

(function(fireEvent){
    Element.implement('_fireEvent', function(type, event){
        fireEvent.call(this, type, event);
    });
})(Element.prototype.fireEvent);
Olmo Maldonado
Owner
Olmo Maldonado ibolmo referenced this issue from a commit in ibolmo/mootools-core January 09, 2012
Olmo Maldonado Fixes #2163.
IE7 seems to have issues with assigning native functions as properties.
Fix is to wrap the native function with an anon. func..

PASSED: IE6-9; FFx 3-5, 8, 10; Chrome latest; Safari 5; Opera 11
6c8ddaf
Olmo Maldonado
Owner

Alright folks.

Follow these instructions if you'd like to try this fix:

git clone git://github.com/ibolmo/mootools-core.git ibolmo/mootools-core
cd ibolmo/mootools-core
git fetch origin
git checkout fix-2163-regression-ie7-crash
git submodule update --init --recursive
./build > mootools-1.4.3.js

Please update your test pages @jbgithub @kguelzau @incendium @dmethvin @isfalse

jbgithub

@ibolmo I tried the fix and it works for me. Thanks.

Olmo Maldonado
Owner

TY @jbgithub anyone else?

Olmo Maldonado ibolmo closed this issue from a commit January 09, 2012
Olmo Maldonado Fixes #2163.
IE7 seems to have issues with assigning native functions as properties.
Fix is to wrap the native function with an anon. func..

PASSED: IE6-9; FFx 3-5, 8, 10; Chrome latest; Safari 5; Opera 11
9eb56c6
Olmo Maldonado ibolmo closed this in 9eb56c6 January 09, 2012
Kai Gülzau

@ibolmo 6c8ddaf works for us. Thanks!

Arian Stolwijk
Owner

We just pushed that fix. Now we can use happily IE7 again!

Matthew Gast

Looks like it's working on my end. Tried it using both test cases that were failing for me and they both work now. Awesome job!

Olmo Maldonado
Owner
André Fiedler

I can confirm, this happens with some Windows XP + IE7 Versions. Mootools 1.4.2 crashed several IE7s of one of our clients. Reproducable on many mashines. But it worked on my virtual XP + IE7 like a charm. Switching back to Mootools 1.4.1 fixed it. IE7 didn´t crash any more.

About the crashes:

Seems like the IE7 crashed on leaving the page. Calling any page after a new IE start worked great. Going into the adress bar and typing ENTER or clicking any link on the page crashed the IE. Windows SysLog only said: iexplorer.exe crashed.

Olmo Maldonado
Owner

@SunboX did you try: #2163 (comment)

André Fiedler

No, I didn´t try it. Had to fix it quickly and haven´t access to our clients machines now. :/ Can´t reproduce this bug on my development machine. But it works now, with 1.4.1.

Olmo Maldonado
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.