IRC Log Viewer » #firebreath » 2010-12-20

IRC Nick Time (GMT-7) Message
iaincollins 06:12 hmm had a strange issue on 1.3.0 (not had time to upgrade yet)
only on NPAPI browsers on Windows, and only in some very odd circumstances
for some reason invoking Microsofts GetIpNetTable() [to get a copy of the local ARP table] was causing a browser crash on NPAPI browsers on Windows, but only on some network device configurations
what's odd it it wasn't throwing expections, just crashing completely anytime it was invoked on those systems, yet working fine in MSIE
have worked around it for now, just found it curious
(will try a debug build on an impacted system see if I can more info as to why)
iaincollins 09:12 it might be just under 2 months late, Windows only and we are only using a fraction of it's functionality...
but finally the plug-in is live :)
Now, to finish the Mac version and to make a web page capeable of interacting with the other actually vaguely interesting functionality...
taxilian 09:12 iaincollins: did you figure out your crash?
amackera 09:12 congrats iaincollins :D
taxilian 09:12 iaincollins: something like that could very possibly be a DEP violation; mozilla turns on DEP checking by default whereas IE does not
anyway, I gotta run; did not sleep well last night (not a big fan of hotels) and now I gotta get to Facebook offices =]
iaincollins 09:12 taxilian: interesting, will look into that! (no, not figured out why calling GetIpNetTable() does it yet)!) have fun :)
amackera: thanks :)
taxilian 09:12 iaincollins: if you search, there is a way to turn off DEP checking system wide (I don't remember what it is, but I bet you could find it), so you could try turning it off and see if the crash goes away
you have to restart your system after turning it off
hmm; it would only affect vista and later if that were the problem, though
iaincollins 09:12 <- URL (only really useful to customers with one of our DSL routers, or a model that's the same as one of the ones we ship, but the ClickOnce bootstrapped install is pretty neato to check out :)
taxilian 09:12 windows XP doesn't have DEP cehcking
iaincollins 09:12 oh yeah we don't see it on XP
taxilian 09:12 that's very likely what it is, then
iaincollins 09:12 ty :)
taxilian 09:12 DEP == Data Execution Prevention; it generally means that somewhere you have a bad pointer.
good luck
iaincollins 09:12 that I can imagine *ahem*
taxilian 09:12 and congrats; if it's live, please feel free to put a link on the FireBreath page somewhere; I'd *really* like to see more indications on that page that people are actually using FireBreath :-P
iaincollins 09:12 laters
amackera 09:12 ttyl!
iaincollins 09:12 I know the premise probably seems a bit silly to us (to show details for your local wireless network) but the whole "/selfhelp/" thing has been a big deal here
amackera 09:12 iaincollins: I am such a moron, I've been looking at this page for a few minutes, poking and refreshing before I realized you said it's windows only :P
i'm on a mac
iaincollins 09:12 think I've said that here before, but apparently a really significant amount of people call the support lines askign what it is
haha no not at all!
we chose to not mention it at all and just display a link for the manual process on Mac / Linux :)
amackera 09:12 Definitely the right choice
iaincollins 09:12 I had to do extra development on the Windows version as I had problems linking libcurl in with Firebreath in Visual Studio :(
amackera 09:12 balls :( what sort of problems?
iaincollins 09:12 my options seemed to be to roll libcurl into a seperate DLL or to use WinHTTP (ended up doing the latter, just because it was quicker, and abstracted the HTTP get / post functions)
amackera 09:12 Fair enough
iaincollins 09:12 really weird, don't have the details to mind but it was maybe to do with encoding I think and what type of DLL was being built
threading options spring to mind
amackera 09:12 Oh man, I remember messing with linker options for threading / dll / whatever
iaincollins 09:12 it was all fine as a win32 console app, which I was using to invoke my libs outside of a browser (in early concept testing in particular)
libcurl is great on unix, but even building against simple win32 apps required a bit more work (I think a bunch of different linker options)
amackera 09:12 That's really lame :(
iaincollins 09:12 so I didn't have time to finish the mac port because of that :( everything else is agnostic though so just need to finish the libcurl on the mac site
I'd like a better solution, WinHttp is a bit handy in some cases though, because of stuff like the auto-detection for proxy settings (handy for those with AV / corporate firewalls for doing other HTTP related things)
so am tempted to maybe leave it in for the Windows version
iaincollins 10:12 anackera: :-)
err -n +m
amackera 10:12 My computer is dying :(
iaincollins 10:12 there is a ClickOnce Run/Don't Run prompt there that isn't shown (as it was already installed on that system, and once you've click yes once, it's not shown again)
amackera 10:12 wow!
that installer is awesome!
iaincollins 10:12 ty :) thanks to Firebreath was able to just focus on the other stuff like that
(rather than the hard work of actually writing a plug-in :)
amackera 10:12 Hehe, indeed
iaincollins 10:12 will publish that over the holidays I hope
for systems without ClickOnce (which is any MSIE system with .NET, and FF with .NET 3.5 installed) the user has to run the downloaded .exe (so slightly less automagical), but the page updates the same way
amackera 10:12 Is your exe made with wix?
iaincollins 10:12 and is just installing the MSI as taxilian prodded me to :) so the upgrades / downgrades are all nicely handled (so I'm glad he did)
amackera 10:12 Hmm... Maybe I should revamp our plugin's instalelr
iaincollins 10:12 the ClickOnce app calls a setup.exe (win32 app) which downloads + runs the MSI (from an HTTPS URL)
oops got to run (vendor is taking us out for beer, don't want to miss the boat :)
amackera 10:12 haha, nice :D ttyl!
iaincollins 10:12 will write up + contrib what I've done :) bye!
amackera 10:12 grats again on deploying :)
iaincollins 10:12 thanks :)
Chanman 11:12 Would anyone know the proper way to get access to an iframe using FB? I was trying getDOMDocument()->getElementById("iframe1")->getInnerHTML() but that didn't work. I looked around on the documentation on as well, but I'm probably not looking in the right spot.
taxilian 11:12 Chanman: is the iframe pointing to the same domain as your page?
Chanman 11:12 no. I thought NPAPI wasn't subject to same origin policy.
taxilian 11:12 it is if you go through the DOM
Chanman 11:12 Otherwise I could do it through Javascript, right?
Oh, I'm an idiot.
taxilian 11:12 if you're going through the DOM it's the same thing :-/
Chanman 11:12 So let me rephrase the question. How would I not go through the DOM and go through browser methods instead?
taxilian 11:12 You could potentially use EvaluateJavascript to store the info you need in a window variable
and then use getDOMWindow()->getProperty
not certain if that would work or not, but worth trying
Chanman 11:12 EvaluateJavascript would still use the DOM, right
taxilian 11:12 at least not on IE, but let me look at how it is implemented on ff
Chanman 11:12
taxilian 11:12 that works =] I really like this doxygen integration… the person who did it should get a medal. :-P
Chanman 11:12 I'm writing test automation plugins, so that's why it won't be same-domain.
taxilian 11:12 hmm. yes, this does use the DOM, but since it's using Evaluate it might still be different
I'm really not sure :-/
Chanman 11:12 How does it work? I'm looking at the function prototype, and it looks like it executes directly on the browser host.
Aren't there browser methods to get control of the iframe? (Sort of like the IHTMLWindow stuff in IE/ActiveX)
taxilian 11:12 Chanman: this->Evaluate is basically calling NPN_Evaluate(m_instance, obj, string, npvar)
NPAPI doesn't have anything like that
it is also possible that you can get what you want through the DOM from NPAPI, but you have to do it a different way
sometimes properties you think there would be (like innerHTML) aren't actually there
so you might have to do iframe.document or something
Chanman 11:12 Could it be constructed? In ActiveX typically you get an IHTMLElement to the iframe then you queryInterface for IHTMLDocument2.
taxilian 11:12 no, there is nothing like that in NPAPI
try getting different child elements, see which ones show up
you could also try it with a page on the same domain; that would tell you for sure if it's the same-origin policy or something else that is fouling you up
Chanman 11:12 well definitely if I go through the DOM I know it's a same-origin policy problem.
taxilian 11:12 no, you don't
Chanman 11:12 the code I had posted earlier
taxilian 11:12 we theorize that it is
but since we are coming from NPAPI, it might not be
you only know if you can do two tests, one which works and one which doesn't
I would really recommend trying it before we make that assumption; the more I think about it the less certain I am
Chanman 11:12 it's been a long night.. I think I might have tried both and one had worked, but honestly I can't remember
it'll definitely be one to try
taxilian 11:12 please let me know; that's the sort of thing that will come up again =]
Chanman 11:12 It's got to be possible because IE gives access to the actual COM pointers controlling the code
and think about it, plugins like GreaseMonkey for Firefox can break same-origin all teh time
taxilian 11:12 GreaseMonkey is not a plugin
completely different rules apply
it wouldn't suprise me at all if innerhtml isn't a property you can get on an iframe
Chanman 11:12 you think it could be specific to innerHTML but methods like getElementById would still work?
taxilian 11:12 sometimes the properties accessible from npapi aren't the same as from javascript
no; getElementById gives you the iframe
but maybe the iframe from npapi doesn't have a innerhtml property
Chanman 11:12 no, I meant getElementById within the iframe itself, getting a child element of that iframe
taxilian 11:12 maybe you need to do iframe.document or something
hmm; that's possible, I guess; I don't know
probably not
Chanman 11:12 damnit, I was hoping NPAPI would be the superset of access.. not a subset
taxilian 11:12 you'd probably need to get the window object from the iframe
it should be, but that doesn't mean it's the same
FB_GitHubBot 11:12 FireBreath: master Anson MacKeracher * 8fcd106 (1 files in 1 dirs): Refactoring for clarity (minimal)
FireBreath: master Anson MacKeracher * a17b46f (1 files in 1 dirs): Fix build errors on mac
FireBreath: master commits d1d0f03...a17b46f -
taxilian 11:12 amackera: not a clue why that would be needed
but since it ignores the whole line, it shouldn't be a problem to change it to a single @
amackera 11:12 I tested with a fresh fbgen and it builds properly
with one @
taxilian 11:12 fbgen actually probably does strip out @, though; I think @ is the "special char"
so @@ == @ after fbgen
@@@@ would == @@
either way is good to me, though
amackera 11:12 That makes sense then
taxilian 11:12 brb
amackera 11:12 k
taxilian 12:12 back
so amackera, when are you doing the ie windowless support? ;-)
amackera 12:12 i know i know i know :( i meant to get it done this weekend
I am able to work on plugin stuff all week though, so I will make time for it this week
taxilian 12:12 hehe. as much as anything I'm just giving you crap =] (though of course I'd love to see it done =])
taxilian 12:12 gotta admit… facebook employees have a pretty nice work area
30" LCD monitor on every desk, free cafeteria....
wish I worked here all the time =]
(but don't wish I lived in CA)
amackera 12:12 that sounds awesome :D
it's -15 celsius outside here today... there's about a foot and a half of snow on the ground
taxilian 12:12 nice
aparently it started snowing right after I left Utah
but it's not really sticking much
too warm on the ground
taxilian 13:12 have to admit; it's interesting to me to use FireBreath and periodically find things that I consider bugs, but nobody has reported… and I have to assume that they just expected that was how it was supposed to work =]
kalev 13:12 that makes me glad you use Firebreath :-)
taxilian 13:12 lol
me too =]
learned some weird things about firefox plugin handling this weekend; you could actually convince firefox that your plugin was something other than an <object> tag
I haven't yet figured anything even remotely useful that you can do wtih that information, however
I would give a lot to know what DISPID_SECURITYCTX is/does
other than that it equals −5511 =]
amackera 14:12 does that mean you could convince ffox your plugin was an <img> or a <p> or something?
taxilian 14:12 aparently
amackera 14:12 heh, weird
taxilian 14:12 I haven't experimented a ton with it
so I'm not 100% certain on that
but it's definitely weird
basically you can return different values in response to localName (default "object") and nodeType (default 1)
taxilian 14:12 crap… I hate it when I find something that I thought I did months ago, and yet it seems to not be done....
amackera 14:12 i hear that
taxilian 14:12 didn't Georg write some cool utility that would wrap a c++ function and return a JSAPI object that would call it when InvokeDefault was called?
amackera 14:12 Whoa really?
What's damn cool
taxilian 14:12 grr. I can't find it =] I'm pretty sure it's in here somewhere…. :-P
and yes, yes it is
taxilian 14:12 found it; JSCallback. it won't register an arbitrary function, but it will register any JSAPI function
taxilian 15:12 I'm considering a major change in how JSAPI works behind the scenes; how many of you guys can test on dev over the next few weeks if I do?
amackera 15:12 i can
taxilian 15:12 this could be a really cool change =]
I might just eliminate actual methods entirely from firefox! Isn't that exciting? =] (and you won't even notice)
amackera 15:12 That sounds funky and awesome :D
What do you mean element methods from firefox?
taxilian 15:12 I actually mean "eliminate", not "element"
element methods are okay :-P
hehe. I mean that instead of the browser calling Invoke it will call getProperty, get a function object, and then call InvokeDefault on that function object
behind the scenes (in JSAPI) it will pretty much look the same
amackera 15:12 Cool !
What sorts of advantages does that bring do you think?
taxilian 15:12 well, for one it makes the whole "dynamic property" thing work a lot better
for another, it makes it so that on IE you can do if (plugin().echo) alert("asdf"); and have it work
amackera 15:12 ahh nice
taxilian 15:12 also properties could be set on a function object
though I think I'd need to come up with a reasonable convention for such things
amackera 15:12 Man debugging plugins in mac os is still a pain
taxilian 15:12 hehe. yes, it is. firefox is a lot easier if you turn off mozilla crash handler
amackera 15:12 I can't seem to get it to work with FFox beta 4
Have you had any luck with that?
taxilian 15:12 haven't tried
I would try turning off crash handler, though
amackera 15:12 Mk
alright i'll give that a shot
I'll just load up the friendly FB docs and find out how :D
Nope, FFox complains about: Previous frame inner to this frame (gdb could not unwind past this frame)
It's not blocking me, but it's annoying as hell
taxilian 15:12 huh
it's probably due to the whole OOPP thing
but I haven't a clue how you're supposed to debug that
amackera 16:12 What's the protocol for pushing changes to dev?
Should I do all my commits through pull requests? or just merge them?
taxilian 16:12 ideally you should push the changes to your fork and have someone else review them
then if you're confident that pushing won't make me want to hurt you go ahead
if it's really minor, go ahead and push but then try to have someone review it
amackera 16:12 Alright
taxilian 16:12 amackera: if you say that works, I believe you =] go ahead and pushi t
amackera 16:12 okay
Can I approve my own pull requests?
ah nvm
You close them, then merge them?
taxilian 16:12 hehe. pull requests have to be applied manually for the most part
amackera 16:12 ahhh crap!
taxilian 16:12 ?
amackera 16:12 haha, there's a "what to do to merge this" thing that goes away after you close it
taxilian 16:12 that's okay
here is an easier way
make sure you've pulled the latest from fb master
then push your master to fb
you know how to use remotes?
amackera 16:12 yep
taxilian 16:12 the other way is really only needed if you are cherry-picking the pull
FB_GitHubBot 16:12 FireBreath: master Anson MacKeracher * 5c11354 (1 files in 1 dirs): Fixes to InvalidatingCoreAnimation ... -
amackera 16:12 Cool :D
taxilian 16:12 see? nothing to it =]
amackera 16:12 I'm finally getting to update my plugin to FB 1.3.2
taxilian 16:12 lol. you know there are no breaking changes between 1.3.0 and 1.3.2, right? =]
and there are some pretty significant memory leaks fixes, particularly on Mac (darn mac developer)
amackera 16:12 That guy, such an amateur :P
Hey actually I have a question for you
taxilian 16:12 okay
(the funny thing, btw, is that I still feel like an amateur in all this stuff, and people come in here thinking I'm some kind of expert)
amackera 16:12 I'm not sure if it was you or Georg who refactored some of the PluginWindowMac* stuff, but there a thing where we create a struct called Impl, and initialize it in the initializer list for the constructor
taxilian 16:12 that was Georg, but I'm familiar with it
amackera 16:12 What's the logic behind that move? I'm not sure I understand it
taxilian 16:12 the logic is that it is much easier to add parameters to a structure without breaking anything than it is to add or change an additional parameter on a function
so the goal is to prevent breaking changes
amackera 16:12 ahhh i see
That makes a lot of sense :)
taxilian 16:12 we thought so =]
amackera 16:12 brb i've got to reboot this machine
taxilian 16:12 ok
sponge- 17:12 hey folks, had an npapi general question about chrome if anyone might know. chrome defers the NPP_Destroy call until the plugin has been inactive for a few minutes, does the plugin get any event when the window is actually closed/navigated away from?
taxilian 17:12 yes and no
are you using windowed or windowless?
sponge- 17:12 windowed
taxilian 17:12 then you can probably subclass the window and catch the WM_DESTROY windows event
I've never seen it take "a few minutes" to call NPP_Destroy, though
so while you're here, though, I have to ask (obligatory question, you understand =]) Why use npapi directly instead of FireBreath?
sponge- 17:12 the plugin persists in the chrome task manager for a while after the page is gone. flash does something similar, it sticks around until its been idle for a while
taxilian 17:12 strange; never seen that
sponge- 17:12 haha, its an existing project. its actually for quake live, if you're familiar with it
trying to see if theres a quick win to fix the one real bug stopping proper chrome support
taxilian 17:12 yeah, I've played with it before
I'd watch for WM_DESTROY if it were me
how do you do it in IE?
or do you support IE?
sponge- 17:12 we use activex for ie, iirc. (my trade is more on the web side of the whole plugin process heh)
taxilian 17:12 right; but in activex, how do you decide when to shut down?
you might be able to use the same method
(this is why FireBreath allows activex and npapi plugins to use the same codebase) =]
sponge- 17:12 hm looking around for the ie stuff. fwiw, its a chrome (and apparently opera now as of opera 11, though i have even less details on that) issue. firefox and safari are supported properly
(i'll definitely bring up firebreath just to get it on people's minds if there's future use for it though!)
taxilian 17:12 is it the graphics context you're shutting down at that point? what is is that happens on NPP_Destroy that causes the issue?
sponge- 17:12 NPP_Destroy does the disconnect from the XMPP network, and releases some stuff internally, as we don't/can't allow mulitple instances of the plugin to run concurrently
i did find something on the chrome issue tracker talking about the npp_destroy behavior, trying to see if i can find it
taxilian 17:12 hmm. yeah, that could be a challenge. The best way is probably to watch when the window goes away; that could have some side effects, but you can probably work around them
that's the only way I can think of
is this an open source project?
sponge- 17:12
afraid not
taxilian 17:12 too bad =] ahh, well.
sponge- 17:12 i have a feeling it won't be too bad of a fix, just trying to learn more about the situation and save someone some time heh
taxilian 17:12 that bug is different
NP_Shutdown and NPP_Shutdown are completely different calls
sponge- 17:12 ahh yes, my bad
alright well i think i've got a little bit to look into on this, much appreciated on the help!
taxilian 17:12 good luck!
amackera 17:12 Sweet, Firebreath 1.3.2 up and running :)
taxilian 17:12 wasnt' that easy? =]
at this point, you almost ought to just go straight to dev
get us some more testing =]
amackera 17:12 Yeah, actually that's what I did :P
taxilian 17:12 hehe. that'll work
that's not 1.3.2, then
amackera 17:12 1.3.2ish
taxilian 17:12 that's 1.4 pre-beta
I hate to disagree, but there is a heck of a lot in there that isn't in 1.3.2 =]
amackera 17:12 fair enough, hehe
taxilian 17:12 this may be the largest single release yet, though I wasn't planning to do that
other than 1.0, of course. that was pretty big
lots of breaking changes in 1.0
grr. I really need to refactor ActiveX stuff so that most of it can go into a library
amackera 17:12 Is there any documentation currently about logging in FB?
taxilian 17:12 nope
amackera 17:12 mk
taxilian 17:12 it's really not finished is the problem :-/
amackera 17:12 what's left to be done?
taxilian 17:12 deciding if how we have it is how it should really be, for one
and formalizing configuration
amackera 17:12 Alright, I'm about to dive into windowless support for active x
brb to reboot to windoze
taxilian 17:12 =]
taxilian 18:12 aparently we haven't supported having a default function on IE either
doesn't seem like there would be this much stuff to fix in FB
amackera 18:12 the magical cmake is working!
it's downloading boost :P
taxilian 18:12 lol
cool, huh? =]
amackera 18:12 very cool :D and useful!
taxilian 18:12 for just in case you forget
amackera 18:12 also, thank you so very much for the README.txt files!
taxilian 18:12 … and now I'm back up to 3 laptops. :-/ like I can carry three laptops everywhere… or even want to carry two. one pc, one mac from work and still have my personal
hehe. forgot about those… I should probably update them
or of course you're welcome to =]
FB_GitHubBot 19:12 FireBreath: master Richard Bateman * 347da02 (11 files in 5 dirs): - Added support for calling default method on ActiveX browsers ...
FireBreath: master Richard Bateman * 263dada (2 files in 2 dirs): Merge branch 'master' of /cygdrive/z/rbateman/code/firebreath-dev
FireBreath: master commits 5c11354...263dada -
amackera 19:12 man i have no idea what's going on with activex
taxilian 19:12 lol
the changes you need will be in FBControl.h
amackera 19:12 what's this?
taxilian 19:12 trying to send you a couple pages; is it working?
amackera 19:12 ack no, :(
it cancels right away
pidgin is perhaps not the greatest irc client
taxilian 19:12 hmm. how better to send you the file, I wonder?
amackera 19:12 email?
taxilian 19:12 address?
[email protected]?
amackera 19:12 sure
taxilian 19:12 I think I just sent it to your gmail
i also seem to be missing a page :-/
amackera 19:12 ok
taxilian 19:12 but that might help
hopefully there was nothing important on the page
if there was, I can't send it to you until Thursday at the soonest
amackera 19:12 it's there :)
taxilian 19:12 hope it helps
the activex stuff is kinda black magic
amackera 19:12 thanks man, it's already helping
FB_GitHubBot 21:12 FireBreath: master Dan Weatherford * e3107b0 (3 files in 2 dirs): Firebreath core build fixes for Mac -