divyang4481 / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

A JSAPI method with FB::VariantMap as a parameter hangs IE6 #132

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a method to the API class that has a "const FB::VarantMap &" parameter.
2. Call this method from IE6.
3. IE6 will hang.

What is the expected output? What do you see instead?
Method should execute normally. It is never being called.

What version of FireBreath are you using? On what operating system and
browsers?
firebreath-1.4b2.7z
WinXP 32-bit
IE6

What version of your compiler or IDE are you using?
VS Express 2008

Please provide any additional information below.
This worked in 1.3.2, because I used it extensively. The method works as  
expected in Firefox and Iron/Chrome on the same computer.

I have amended the FBControl example to reproduce this error and attached it to 
this issue.

Original issue reported on code.google.com by Steven.K...@gmail.com on 25 Jan 2011 at 5:07

Attachments:

GoogleCodeExporter commented 8 years ago
I will have to set up a new VM to test this; it may be a couple of days.  In 
the mean time if you could tell me where it's hanging that would help.

Original comment by richarda...@gmail.com on 25 Jan 2011 at 5:27

GoogleCodeExporter commented 8 years ago
just to make sure, could you get the latest (download from the firebreath.org 
downloads page the 1.4 link) and see if this problem still exists? I have fixed 
a few race conditions since 1.4b2 and may have already fixed this.

Original comment by richarda...@gmail.com on 25 Jan 2011 at 6:05

GoogleCodeExporter commented 8 years ago
Okay, I've done some digging and I think I know the cause, though it's not 
specific to IE6.  I have released FireBreath-1.4b3 which should have this issue 
fixed.  If the issue persists please let me know.

Original comment by taxilian on 26 Jan 2011 at 4:38

GoogleCodeExporter commented 8 years ago
Thanks for the update. I've just built with FireBreath-1.4b3, but the problem 
is still there, exactly as before.

Original comment by Steven.K...@gmail.com on 26 Jan 2011 at 9:25

GoogleCodeExporter commented 8 years ago
hmm.  I cannot reproduce this on XP w/ vs2010 on IE6.

Can you attach a debugger and see if you can get a stack trace on the two 
threads that are deadlocking?

Original comment by richarda...@gmail.com on 26 Jan 2011 at 7:40

GoogleCodeExporter commented 8 years ago
I've tracked down the problem. Nothing as glamorous as a deadlock, I'm afraid. 
Simply some mistyped logic.

Check out IDispatchAPI::getMemberNames(). There is a loop there that iterates 
through the dispatch methods. If it receives a dispid < 0, it continues, but it 
should break. The code was simply getting stuck in this while loop.

I've confirmed this by looking at the logic in 1.3.2, which exits the loop when 
it encounters a dispid < 0.

Interesting that you weren't able to reproduce, though.

Original comment by Steven.K...@gmail.com on 28 Jan 2011 at 12:11

GoogleCodeExporter commented 8 years ago
That is interesting; I remember that code now, it was recently refactored by 
someone who knows ATL and COM a lot better than me, so I assumed he knew 
something I didn't =] It is interesting that the problem doesn't occur for me.  
I have the flu right now, so I don't know if I'll get this fixed today, but 
I'll definitely get a fix in there for you.

Thanks so much for taking the time to track this down! 

Original comment by richarda...@gmail.com on 28 Jan 2011 at 4:12

GoogleCodeExporter commented 8 years ago
OK, I think I have this fixed now. I definitely see the problem and I'll have 
to give jtojanen a hard time for missing it ;-) However, since I can't 
reproduce it it's difficult for me to be certain I fixed it correctly.  Could 
you test and let me know?

On the bright side, the old way was wrong... the new way was nearly right. Now 
it is completely right =]

http://bit.ly/dZbTv0 for the commit log

Original comment by richarda...@gmail.com on 29 Jan 2011 at 1:56

GoogleCodeExporter commented 8 years ago
I've tried running my project against firebreath-beta-1.4-nightly103 and it's 
all working fine. Many thanks.

Original comment by Steven.K...@gmail.com on 3 Feb 2011 at 3:30

GoogleCodeExporter commented 8 years ago
great!

Original comment by richarda...@gmail.com on 3 Feb 2011 at 3:52