IRC Log Viewer » #firebreath » 2011-06-03

IRC Nick Time (GMT-7) Message
FireBreathBot 09:06 Commit 7eddb25 on master by Eric Herrmann: "FIREBREATH-28: Fixed missing dependency in ScriptingCoreTest..."
_pq_ 09:06 i got some problem debugging a plugin inside firefox4
debugger hangs when it hits a breakpoint
on event handling code
taxilian 10:06 _pq_: what version of firebreath?
FireBreathBot 10:06 JIRA issue issue created by donaldlsmithjr
taxilian 10:06 dougma: I'm thinking that FIREBREATH-93 is related to the same event stuff we were talking about the other day
FireBreathBot 10:06 FIREBREATH-93: Summary: IE9 suppresses certain events when a DOCTYPE is present
FIREBREATH-93: Assigned To: richard
FIREBREATH-93: Priority: Major, Status: Open,
sabotaged|wk 14:06 my mac plugin is crashing when i start a full screen window, the weird part is it's crashing on seemingly overrelease of MyCALayer, which is in firebreath. WebKitPluginHost[25997:903] *** - [MyCALayer release]: message sent to deallocated instance
anyone seen anything like that before?
taxilian 14:06 what version of FireBreath are you on?
sabotaged|wk 14:06 might even be safari specific
taxilian 14:06 update to 1.5.2
should fix it
sabotaged|wk 14:06 i already merged not that long ago from head of 1.5 branch
taxilian 14:06 hmm. Well, it is possible that there is a remaining bug in there
are you 32 bit or 64 bit safari?
sabotaged|wk 14:06 64
let me try with 32-bit
doesn't seem to happen on 32-bit. but it requires a hoop to jump through to reproduce: i need to navigate away from and then back to the plugin
taxilian 14:06 could be related to this issue:
FireBreathBot 14:06 FIREBREATH-53: Summary: Should not retain CA on Safari 64-bit
FIREBREATH-53: Assigned To: richard
FIREBREATH-53: Priority: Major, Status: Closed,
sabotaged|wk 14:06 hmm
maybe i will try retaining it and see if that makes a difference
taxilian 14:06 it could be that some versions retain and some don't :-/
sabotaged|wk 14:06 yeah, after i make it retain it isn't crashing anymore for me
taxilian 14:06 what version of safari are you running?
sabotaged|wk 14:06 5.0.5
on 10.6.7
taxilian 14:06 interesting
you say it only crashes when you go full screen? browser full screen, I assume?
sabotaged|wk 14:06 no, i create a full screen calayer to draw on instead of the plugin calayer
taxilian 14:06 wait… are you possibly releasing the plugin calayer?
you shouldn't be releasing that until the plugin shuts down
if you do release it early it'll crash
sabotaged|wk 14:06 i dont release it but i dont retain it either. maybe that's my problem?
i assumed that firebreath would
taxilian 14:06 FireBreath does
but it could be that something you're doing is doing an implicit release or something
because if it only happens when you stop using it to draw in full screen, then something is wrong
sabotaged|wk 14:06 well, i put a breakpoint in dealloc and i only see it occuring at sane times, like leaving the page
dealloc of MyCALayer
taxilian 14:06 even when it crashes?
you don't see it get dealloc'd before it crashes?
sabotaged|wk 14:06 like right before it crashes? pretty sure i checked that and it doesn't, but let me double check. i'll put that release back in MyCALayer to test
taxilian 14:06 it would more or less have to
because otherwise how could it be gone when you go to call it?
sabotaged|wk 14:06 interesting. i put a NSLog in MyCALayer init method, printing the address
the crash is happening on the FIRST MyCALayer from the old instance, before i navigated away and back
that would explain why the 2nd isnt dealloc'ing
FireBreathBot 15:06 JIRA issue issue commented by jzablot "I had some crashes recently that leads me to believe that the plugin NEEDS to retain the CALayer ..."
taxilian 15:06 that doesn't make sense, though, if it only happens when you do fullscreen
sabotaged|wk 15:06 it makes sense if that's the only time that the autorelease pool is drained
taxilian 15:06 !findfile PluginWindowMacCA
FireBreathBot 15:06 Found 2 matching file(s) in the master branch. First 2 are:
taxilian 15:06 no, because we are doing a single retain
so we do a single release
unless the browser is doing a release, there is no reason that we should need to do a second one
also, your autorelease pool only affects the things you autorelease after creating it
it's bookended
unless I'm completely confused
so it would only affect your code
that does not sound like a browser bug
it sounds like your code
starakaj 15:06 so here's an awesome question
ever use fltk?
taxilian 15:06 I figured there would be, since you usually only come in when you have one ;-)
starakaj 15:06 okay
taxilian 15:06 but that was an awesome question
starakaj 15:06 I know, right?
any thoughts on windowing-framework type stuff that works in opengl?
taxilian 15:06 what are you trying to accomplish?
starakaj 15:06 menus and junk
buttons and popups and all that garbage
taxilian 15:06 my general solution to that is to just use HTML
starakaj 15:06 yes, that is an awesome solution
taxilian 15:06 but?
starakaj 15:06 buuuut.... drawing on top of the plugin?
I actually haven't tried that, is there any reason why it wouldn't work?
taxilian 15:06 so here is a question; are you actually doing anything other than just blitting bits to the screen with opengl?
yeah; you're currently using windowless mode on windows
on Mac it would work fine
starakaj 16:06 okay
taxilian 16:06 and the answer to my question?
starakaj 16:06 on mac it works and oh my life does that make everything easier
am I doing anything other than blitting.... yes, a tiny bit
taxilian 16:06 can you elaborate?
starakaj 16:06 so windows, I _think_ we're actually using windowed
yes, so for example
we've got a live video stream
taxilian 16:06 sorry, I meant windowed
if you were using windowless you'd be good
starakaj 16:06 that we rotate based on the position of an accelerometer
I see, so I need to switch to windowless
that might suck
taxilian 16:06 ahh
well, so you have a couple of possibilities
a simple rotation (I assume it's just 90, 180, or 270?) is probably not so CPU intensive that you couldn't do it with GDI
starakaj 16:06 nah
taxilian 16:06 and you could just rotate and blit and you probably wouldn't even need opengl
starakaj 16:06 it's more than a simple rotation
taxilian 16:06 okay; the other option you have then for windowless on windows is to draw to an offscreen buffer
and then blit to the hDC
I don't *think* it's possible to set up an OpenGL context using a windowless plugin
at least currently
on windows
starakaj 16:06 well that's good
because we just switched to d3d
which is to say I just switched to d3d
taxilian 16:06 oh, awesome! except, of course, that you have the same problem with d3d
starakaj 16:06 lol, so un-awesome?
taxilian 16:06 eh, just noop
same issue
draw to an offscreen, blit to he hdc
starakaj 16:06 got it
use windowless
taxilian 16:06 well, that woudl be the easiest solution, if it performs well enough for your needs
starakaj 16:06 draw to offscreen (meaning make an offscreen hDC, setup my d3d context relative to that offscreen window)
and then push those bits to the browser window
taxilian 16:06 I don't actually know d3d well
but yeah
starakaj 16:06 more or less
taxilian 16:06 sounds about right
if you do that then you can layer HTML over your plugin
starakaj 16:06 okay, that sounds do-able
I see
the reason I can't layer over my plugin with windowed mode is because it's a sub-window, right?
taxilian 16:06 I assume so
it just floats over the top of everything else
starakaj 16:06 rite
level with me
how much is the windowed -> windowless transition going to suck?
taxilian 16:06 I'm curious to know myself. please let me know how it goes ;-)
I have used a windowless plugin
starakaj 16:06 lol
that's encouraging
for some definition of encouraging
taxilian 16:06 I have code that blits a bitmap to the screen
but I have no idea how to do the d3d stuff
sabotaged|wk 16:06 don't know what's wrong with my code. i override release and autorelease for MyCALayer and don't see either being called from my code
taxilian 16:06 sabotaged|wk: I don't know either; it's either your code or the browser, though, because FireBreath doesn't seem to be releasing early from what I can see
sabotaged|wk 16:06 why does safari 32-bit behave differently? bug?
taxilian 16:06 if it were the browser, though, it shouldn't make any difference whether or not you have your fullscreen window
well, kinda
the CALayer NPAPI spec changed
32 bit seems to implement the old way, 64 bit implements the new
64 bit seems to act like Chrome
sabotaged|wk 16:06 i think the only thing my full screen thing has to do is for whatever reason it triggers the autorelease pool that has MyCALayer
taxilian 16:06 if that were the case it would crash on shutdown anyway because the autorelease pool would be triggered after the plugin went away
sabotaged|wk 16:06 i dont see release being called from an autorelease pool drain on plugin shutdown
taxilian 16:06 hmm. I don't know, then
I guess it's possible that's another browser bug
taxilian 16:06 sabotaaged|wk: can you try putting an autorelease pool around the calayer creation and see if that makes it always crash?
sabotaged|wk I mean =]
because if it is, as you postulate, related to autorelease that should make it consistent
I don't see how you could be triggering an autorelease without somehow putting your code inside the pool scope, but that would tell you for sure
EL45 16:06 Does anyone know if there is any way to return an array to javascript? I have tried returning an FB::variant as well as using a callback?
taxilian 16:06 EL45: return a FB::VariantList
EL45 16:06 Thanks taxilian
taxilian 16:06 EL45: no problem. the docs for that are on the wiki, btw
!wiki javascript
FireBreathBot 16:06 8 results found. Note: Results limited to 8
"Interacting with Javascript":
"file COMJavascriptObject.h":
"file NPJavascriptObject.h":
"file NPJavascriptObject.cpp":
"JSAPI Attributes":
"JSAPI Properties":
"JSAPI Methods":
taxilian 16:06 the first one
has a link to what types are supported
EL45 16:06 Great sorry I missed that.