Not sure if Firebreath issue or Chrome issue

65 views
Skip to first unread message

Utkarsh Khokhar

unread,
May 9, 2013, 9:52:45 AM5/9/13
to firebre...@googlegroups.com
Hi,

There is a weird issue happening with one particular OSX machine's Chrome, in our small setup.
Chrome is failing to load the plugin completely i.e. NPP_new is followed up by an NPP_destroy immediately.
Failure is because of not being able to get the NPDrawingModel/NPEventModel (both are getting returned as NONE) from within the respective plugin handling code for Mac.
Cutting through all the debugging done and reaching the final point, plugin hits the following condition inside PluginWindowMac.mm (initPluginWindowMac_CA method)
         "if (supports(host, NPNVsupportsCoreAnimationBool) && set(host, NPPVpluginDrawingModel, (void*)NPDrawingModelCoreAnimation))"

supports method basically spells to NPNFuncs.getvalue and set method corresponds to NPNFuncs.setvalue
The first part of the condition itself fails i.e. NPNFuncs.getvalue method returns FALSE for "NPBool value" passed from within the supports method.
Although impertinent, but with a slight hack to check for what NPNFuncs.setvalue does, it returns an error code of 1 (NPERR_GENERIC_ERROR).

To reiterate, all this is happening only one particular OSX machine (10.7.4 i5 Macbook pro) only so far. We tried with same Chrome version (26.0.1410.65) across different Mac machines, but only this one fails as pointed out above.

I am not sure if there is some check in Firebreath that needs to make this call failsafe or Chrome is being a pain or it's neither of the 2 but just that I failed to understand some aspect of this.

Looking forward to some help from you folks.

thanks and regards,
Utkarsh

Richard Bateman

unread,
May 9, 2013, 1:15:55 PM5/9/13
to firebre...@googlegroups.com

This is most likely because you don't have any valid drawing models set in your PluginConfig.cmake file.

Richard

--
 
---
You received this message because you are subscribed to the Google Groups "firebreath-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebreath-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Utkarsh Khokhar

unread,
May 9, 2013, 8:41:26 PM5/9/13
to firebre...@googlegroups.com
I am not sure if I understood you correctly Richard. Are you talking about the entries given below? :

// This is how I currently use it
set(FBMAC_USE_QUICKDRAW 0)
set(FBMAC_USE_CARBON 0)
set(FBMAC_USE_COCOA 1)
set(FBMAC_USE_COREGRAPHICS 0)
set(FBMAC_USE_COREANIMATION 1)
set(FBMAC_USE_INVALIDATINGCOREANIMATION 0)

Just to reiterate that plugins built using same PluginConfig.cmake are working properly on mostly all other OSX machines'Chrome, but only on this particular machine it doesn't work. I am afraid that there might be more out there which can give this issue.

Thanks

Neil Griffiths

unread,
May 9, 2013, 8:53:15 PM5/9/13
to firebre...@googlegroups.com
You may want to use FBMAC_USE_INVALIDATINGCOREANIMATION. Given that's a drawing mode being championed by Google, that may be part of the problem!

Also, what version of OS X is the Mac that doesn't work using compared to the other Macs?

Richard Bateman

unread,
May 9, 2013, 10:44:19 PM5/9/13
to firebre...@googlegroups.com

Try turning on InvalidatingCoreAnimation; you shouldn't be using pure CA with anything but Safari.

Richard

May 9, 2013, в 18:41, Utkarsh Khokhar <utkarsh...@gmail.com> написал(а):

Utkarsh Khokhar

unread,
May 9, 2013, 11:35:55 PM5/9/13
to firebre...@googlegroups.com
Thanks for the suggestion guys.
Since you both suggested the same thing, probabilities are high of this getting solved that way.
So just to be clear,  I will "set(FBMAC_USE_INVALIDATINGCOREANIMATION 1)" in my PluginConfig.cmake and check if that solves my problem.

@Neil: I am facing this issue on OSX 10.7.4 ; Chrome 26.0.1410.65
thanks

Utkarsh Khokhar

unread,
May 10, 2013, 2:45:53 AM5/10/13
to firebre...@googlegroups.com
Ok, this is a bummer.
I set both CA and ICA, and still I didn't get a drawing model from the browser.
Then out of curiosity I set all the drawing models in pluginconfig and saw that this particular chrome is returning a drawing model for CoreGraphics, which is not what we expected.
Do you guys think that this can be expected of Chrome? Still some hole in my grasp of the problem?

thanks

Utkarsh Khokhar

unread,
May 10, 2013, 3:15:56 AM5/10/13
to firebre...@googlegroups.com
So just to update on the current roadblock, I am getting CocoaEvent/CoreGraphics from this particular OSX/Chrome combination.
Even though I add the support inside my OpenGL code to expect CoreGraphics (lolwut) and it does, but NPP_Destroy gets invoked immediately.
I guess, firebreath doesn't like this particular event/drawingmodel combo and hence it destroys the plugin(s). Understandable if that's the case!
I am surprised that while all browsers have moved forward to CA and ICA and more, why would I get only CG from this particular setup?
This now looks to me to be a bigger problem than before guys.
Help please!

thanks

Richard Bateman

unread,
May 10, 2013, 4:10:36 PM5/10/13
to firebre...@googlegroups.com

You have configured FireBreath to not allow CoreGraphics; when that's the only drawing model available, but you've configured it to ignore it, it fails to negotiate a drawing model and the plugin is destroyed.

If you want CoreGraphics to be allowed you'll have to turn on coregraphics in your pluginconfig.cmake file and reprep and rebuild

Richard

May 10, 2013, в 01:15, Utkarsh Khokhar <utkarsh...@gmail.com> написал(а):

Utkarsh Khokhar

unread,
May 10, 2013, 8:33:50 PM5/10/13
to firebre...@googlegroups.com
I have actually enabled ICA, CA and CG in pluginconfig.cmake now. Rendering with CG might be something that solely lies in my area now.
However, I am not able to understand that how come this OSX/Chrome combination is returning CG, when it should have been ICA or atleast CA?
Is it possible for Chrome to do that in normal circumstances or there is a specific scenario which might be getting triggered on this machine?

thanks

Richard Bateman

unread,
May 10, 2013, 8:37:03 PM5/10/13
to firebre...@googlegroups.com
I don't know about chrome returning that combo, tho it is valid. Did you rerun the prep script after updating the PluginConfig file? Did you try deleting the build dir and rerunning it to be safe?

Sent from my iPhone

Utkarsh Khokhar

unread,
May 10, 2013, 11:08:58 PM5/10/13
to firebre...@googlegroups.com
Yes Richard. I generally run builds such that prep command gets called by default before building the slns or xcodeprojs.
However, I didn't try a clean build as you mentioned. I will give it s hot too.
But since you have confirmed the main point that I should expect a CG from Chrome, then that settles it.
Currently my OpenGL code is negotiating only ICA/CA and I need to use CG in there for enabling rendering with this model.
I tried after your earlier suggestion also, and I can see that my plugin loads now but doesn't render anything because of above.
Thanks for all the help, ball is in my court now!

Richard Bateman

unread,
May 10, 2013, 11:54:02 PM5/10/13
to firebre...@googlegroups.com

Well, I don't know of any reason why Chrome wouldn't be able to give you a ICA model on a 10.7 box; AFAIK that should work. If you tell it that CG is a valid option, though, it could quite possibly give you that.  I really don't have any idea why ICA wouldn't be avail, however.  That's a bit disturbing.

Richard
Reply all
Reply to author
Forward
0 new messages