Side navigation
#9033 closed bug (fixed)
Opened April 30, 2011 05:49PM UTC
Closed September 22, 2011 02:54PM UTC
Last modified March 09, 2012 02:54AM UTC
try{ } finally{ } error in IE8
Reported by: | azaozz <azaozz@gmail.com> | Owned by: | jaubourg |
---|---|---|---|
Priority: | blocker | Milestone: | 1.7 |
Component: | deferred | Version: | 1.5.2 |
Keywords: | Cc: | jaubourg | |
Blocked by: | Blocking: |
Description
Related #8478. Was trying to reopen it but that seems impossible.
Still seeing this in 1.5.2. On loading IE8 complains about missing catch statement on line 978 (in the try{ } finally{ }
at line 973).
Ironically the other try{ } finally{ }
(line 4493) has a catch(pseudoError){ }
that avoids this in IE. Of course adding catch(pseudoError){ }
on line 977 fixes the error.
If this is indeed invalid perhaps it should be removed from the other place too (line 4493). However this IE error seems triggered by quite a few scripts/plugins and I would suggest adding a catch(pseudoError){ }
on line 978 and counting that as just another IE quirk that needs a minimal workaround.
Attachments (0)
Change History (31)
Changed April 30, 2011 06:13PM UTC by comment:1
component: | unfiled → deferred |
---|---|
owner: | → azaozz <azaozz@gmail.com> |
priority: | undecided → low |
status: | new → pending |
Changed April 30, 2011 06:13PM UTC by comment:2
cc: | → jaubourg |
---|
Changed April 30, 2011 06:21PM UTC by comment:3
status: | pending → new |
---|
Forgot to mention, the exact IE error is:
Exception thrown and not caught
Changed April 30, 2011 06:37PM UTC by comment:4
Replying to [comment:1 timmywil]:
>...but a test case to confirm would be helpful.
Of course. If I can make the time this weekend I'll try to put a reduced test case on jsFiddle.
However there is a point about the difference in the two try{} finally{}
statements currently in use. If one needs catch(pseudoError){}
to avoid errors in IE, chances are the other would need that too, at least for consistency's sake.
Changed May 02, 2011 01:45AM UTC by comment:5
status: | new → pending |
---|
Changed May 17, 2011 01:37PM UTC by comment:7
Bug mentioned already here
http://webbugtrack.blogspot.com/2007/11/bug-184-catch-to-try-catch-finally-in.html
I get it in IE8 on XP in jQuery 1.6.1 unless I add a catch here:
// resolve with given context and args resolveWith: function( context, args ) { if ( !cancelled && !fired && !firing ) { // make sure args are available (#8421) args = args || []; firing = 1; try { while( callbacks[ 0 ] ) { callbacks.shift().apply( context, args ); } } catch(e) {} finally { fired = [ context, args ]; firing = 0; } } return this; },
Changed May 17, 2011 01:39PM UTC by comment:8
Missed the message:
Unexpected call to method or property access. Line: 5569 Char: 5 Code: 0 URI: http://code.jquery.com/jquery-1.6.1.js
Changed May 24, 2011 11:16AM UTC by comment:9
does this still need a test case to move from pending?
Changed May 31, 2011 12:17PM UTC by comment:10
Hi, Please see : http://jsfiddle.net/r7MgY/6330/
Changed June 04, 2011 02:03PM UTC by comment:11
Please, fix the bug. Please, notice that it is not a feature request.
Changed June 05, 2011 05:24PM UTC by comment:12
#9517 is a duplicate of this ticket.
Changed June 08, 2011 12:57AM UTC by comment:13
resolution: | → fixed |
---|---|
status: | pending → closed |
Add catch block to try/finally in deferred. Fixes #9033. Test case needed.
Changeset: 0a80be67f4fe968d99777564a02aeddbde1fbf35
Changed June 08, 2011 02:57PM UTC by comment:14
Revert "Add catch block to try/finally in deferred. Fixes #9033. Test case needed." Line of exception was lost when debugging.
This reverts commit 0a80be67f4fe968d99777564a02aeddbde1fbf35.
Changeset: 39a2f29c29fdb296bb178b3c55d805ea0dc2f0ce
Changed July 01, 2011 02:11PM UTC by comment:15
milestone: | 1.next → 1.7 |
---|---|
resolution: | fixed |
status: | closed → reopened |
Fix was reverted, but I hear jaubourg has a fix for this when $.Callbacks is introduced in 1.7.
Changed July 01, 2011 02:11PM UTC by comment:16
status: | reopened → open |
---|
Changed July 01, 2011 02:11PM UTC by comment:17
#9718 is a duplicate of this ticket.
Changed July 12, 2011 03:38PM UTC by comment:18
owner: | azaozz <azaozz@gmail.com> → jaubourg |
---|---|
status: | open → assigned |
Changed July 15, 2011 07:27PM UTC by comment:19
Looked at this further. The try{} finally{}
seems to be triggered only on script parse errors. For example I had a stray comma at the end of an object definition (as you probably know FF and WebKit silently ignore these but IE throws an error on loading the script).
In that terms I'm not sure if the whole try{} finally{}
is needed there as it may let unparsable scripts to go unnoticed. On the other hand jQuery silences most JS errors, so why not these...
Changed July 21, 2011 10:41AM UTC by comment:20
#9878 is a duplicate of this ticket.
Changed August 07, 2011 12:49PM UTC by comment:21
#9993 is a duplicate of this ticket.
Changed August 29, 2011 07:41PM UTC by comment:22
#10030 is a duplicate of this ticket.
Changed August 29, 2011 07:41PM UTC by comment:23
#10162 is a duplicate of this ticket.
Changed September 01, 2011 05:35PM UTC by comment:24
#10181 is a duplicate of this ticket.
Changed September 01, 2011 05:35PM UTC by comment:25
priority: | low → blocker |
---|
Changed September 22, 2011 02:54PM UTC by comment:26
resolution: | → fixed |
---|---|
status: | assigned → closed |
There is no try/finally block in the new $.Callbacks code. Deferred objects are "locked" if and when an exception occurs in a callback.
Related commit: https://github.com/jquery/jquery/commit/4092e3d2754e3847cd3159edb23184d4cfd4cf03
Changed September 27, 2011 03:57PM UTC by comment:27
#10348 is a duplicate of this ticket.
Changed October 05, 2011 03:55PM UTC by comment:28
#10428 is a duplicate of this ticket.
Changed October 19, 2011 05:59PM UTC by comment:29
#10508 is a duplicate of this ticket.
Changed January 19, 2012 02:45PM UTC by comment:30
#11193 is a duplicate of this ticket.
Changed January 20, 2012 01:01PM UTC by comment:31
#11197 is a duplicate of this ticket.
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket.
Additionally, test against the
jQuery (edge)
version to ensure the issue still exists.I don't doubt this is a problem. I've seen many times where adding a dummy catch is necessary to avoid IE errors, but a test case to confirm would be helpful. L#57 of current deferred.js.