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

IRC Nick Time (GMT-7) Message
saiaman 06:03 hello everyone
dade 07:03 hi
i'm a NPAPI developer, if that is even a title
dade__ 07:03 is there anyone ?
http://www.firebreath.org/display/documentation/Mac+Plugins
since there is no "using coregraphics" section
i'd like to know how to get infos about that
bbl
johnd 08:03 I've been playing some more with IE-plugin detection, based on fb_installer.js. I noted that as expected a plugin C++ object gets created when creating an ActiveXObject. But it doesn't get deleted until I refresh or navigate to another page.
And, it's also causing the browser to crash, my auto-generated plugin-destructor is crashing... in m_host->freeRetainedObjects(); I get an assertion in the shared_ptr code: T * operator-> () const // never throws { BOOST_ASSERT(px != 0); return px; }
johnd 09:03 So essentially m_host is null... but what this stuff is for I do not know.
taxilian 09:03 johnd: well, you could just add a if (m_host) before the m_host->freeRetainedObjects, but you should be getting a host even when created as a scripting only object
as to when it gets deleted, that depends on the browser; it shouldn't normally wait 'til browser shutdonw, though
strange
what version of FireBreath are you using?
johnd 09:03 Also, even though the plugin is created, getting plugin.version doesn't trigger the version-property method... in fact I don't even think my plugin-API class is getting instanced
as for version, where do I check?
I know it's a 1.4 pre-RC froma couple of weeks back
taxilian 09:03 did you get it from git?
johnd 09:03 I tried explicitly deleting the JS plugin object but it didn't make any difference.
Nope, I got the 'official' version off the site at the time
the one it recommended
taxilian 09:03 okay; there should be a version file that says what the last commit was
in the root
anyway, though, try updating to the latest; there have been quite a few bugfixes, and some relate to what you're doing
johnd 09:03 1.4b1 it would seem. I'll update though. It does look like somehow the plugin object isn't creating fully, in some way
taxilian 09:03 johnd: are you John Dexter from the mailing list?
johnd 09:03 yep
taxilian 09:03 just trying to connect people in my mind =] I have a hard time keeping track of people sometimes. there are getting to be a lot... ;-) (this is not a bad thing)
johnd 09:03 I like you use the same nick on StackOverflow, I keep finding your answers/comments when I look at plugin questions
taxilian 09:03 heh. yeah, I'm not the most knowledgable in the world about plugins, but I'm one of the most vocal
stuartmorgan, Georg (gf on stackoverflow), and I between the three of us practically answer every npapi question on there and most in other places
though Georg's been quiet the last few months; he's got a killer school schedule, so hasn't been helping much anymore
johnd 09:03 I never placed you - are you a student or a professional developer or some combination?
with open-source you never know, people can be 15 or 50
taxilian 09:03 some bizarre combination, I suppose you could say
I'm 28 as of 3 days ago, so right in the middle of that ;-)
I am still finishing my B.S. degree, but I've been developing profesionally for about 11 years
I kinda dropped out for awhile and then came back to finish
so I'm currently in my last semester finishing a C.S. degree and contracting part-time for a couple of companies doing plugin stuff
johnd 09:03 question... I've got the rc2 version now. I have my projects in a separate dir based on the source-control guide, do I have to re-run fbgen.py or just the prep script?
happy birthday :)
taxilian 09:03 just the prep script
thanks =]
fbgen is just a code generation tool
just makes it easier to get started is all
johnd 09:03 checking if(m_host) is no good anyway... PluginCore::~PluginCore() calls m_host->shutdown();
taxilian 09:03 ahh
guess that's true
the reason for that is that if m_host isn't good, not much of anything works
johnd 09:03 I put my new rc2 FB in a different dir rather than overwriting my beta version, prep script doesn't seem to like this.
CMake Error: The source "C:/programming/firebreath1.4rc2/CMakeLists.txt" does no t match the source "C:/programming/firebreath1.4b3/CMakeLists.txt" used to gener ate cache. Re-run cmake with a different source directory.
taxilian 09:03 yeah; delete your build dir
johnd 09:03 is there a quick fix?
ok
hmm, prep is giving boost errors. Do I have to get those manually? I got it all set up in the past then prompty forgot everything!
CMake Error at cmake/common.cmake:97 (add_subdirectory): add_subdirectory given source "C:/programming/firebreath1.4rc2/src/3rdParty/boost/libs/thread" which is not an existing directory. Call Stack (most recent call first): CMakeLists.txt:41 (add_boost_library)
taxilian 09:03 are you trying to use system boost?
johnd 09:03 I don't reemmber, my FB was originally set up following the video tuts
I see in my src/3rd/party there isa boost dir with some files, but no libs
in my old version, libs are there too
taxilian 09:03 that's odd; try deleting the contents of the boost dir and then run the prep script again
it should download the boost files
johnd 09:03 worked. must have been a download glitch or something
taxilian 09:03 huh
johnd 09:03 well, with rc2 things seem much better. The JSAPI object is created, m_host isn't null at destruction, etc.
still the plugin wasn't being destroyed immediately which I would prefer, any idea if this can be froced?
if frocing isn't an option, perhaps forcing :)
taxilian 09:03 unfortunately, that's in the hands of the browser; if it's not releasing them immediately, I don't know of any way to froc or force it
johnd 10:03 guess it doesn't really matter as long as my plugin ctor doesn't do much.
dan2 10:03 morning
taxilian 10:03 morning
kalev: are you around by chance?
or Lta?
if either of you get back, I was hoping you guys could look at http://code.google.com/p/firebreath/issues/detail?id=157 and see if you have any thoughts, since it's a linux drawing issue
johnd 10:03 Richard I have an updated fb_installer.js for your approval... no big changes just fixes and tweaks, tested with multiple plugins and so on
taxilian 10:03 cool. could you submit an issue and attach it?
that way I won't forget
johnd 10:03 sure, got a link? Or do you mean the mail-list?
taxilian 10:03 go to firebreath.org
top left of the main page there is a "FireBreath Issues" link
johnd 10:03 oh, I see it
I'll add it as feature request unless you prefer otherwise?
taxilian 10:03 doesn't matter to me
if there is an issue I won't forget about it is all =]
bbl
johnd 10:03 ok, #160. Thanks for your help as always.
taxilian 10:03 NoAntzWk: Rock on! I will look at this right away
btw, if anyone is on windows, "Git Extensions" is a fantastic git GUI for windows
just wish I could put the POST stuff in 1.4
but RC2 is probably a little late... =]
johnd: now if you really wanted to go the extra mile, a wiki page on how to use the detection script would be amazing
amackera 10:03 taxilian: I just found a bug in the cocoa event handling stuff in FB
taxilian 10:03 in 1.5?
amackera 10:03 1.4
the mouse drag event sends incorrect y coordinat
taxilian 10:03 oh. less concerned, but okay; fix it and put it in 1.4 =]
amackera 10:03 sure thing :)
haha
taxilian 11:03 NoAntzWk: even added test! nice. that makes my job so much easier
FB_GitHubBot 11:03 FireBreath: master Richard Bateman * ac6819f (10 files in 3 dirs): Added first tentative for GET/POST on streams ...
FireBreath: master NoAntzWk * 08c66c6 (8 files in 4 dirs): Fix postdata constantness. ...
FireBreath: master NoAntzWk * e393bdf (3 files in 1 dirs): Added basic test for getURL and postURL in FBTestPlugin example. ...
FireBreath: master commits d708bc3...e393bdf - http://bit.ly/fMHjYJ
taxilian 11:03 and we now have POST support for streams in 1.
FB_GitHubBot 11:03 FireBreath: firebreath-1.4 Anson MacKeracher * 7484dbf (1 files in 1 dirs): Mac OS X Cocoa drag events now send proper y coord - http://bit.ly/hRx56F
taxilian 11:03 1.5
1.5 probably won't be a drawn-out release like 1.4
it's pretty straightforward
johnd: do you mind if I put your name on the commit for the new fb_installer.js?
johnd 11:03 not at all
use jdexter if you get the choice?
taxilian 11:03 ahh, a little too late
FB_GitHubBot 11:03 FireBreath: firebreath-1.4 John Dexter * 05d4a11 (1 files in 1 dirs): Updated fb_installer.js to a usable state - http://bit.ly/hCtqEP
taxilian 11:03 I can change it if you really want
johnd 11:03 no worries
taxilian 11:03 ok
since it's not something anyone depends on, I even put it in 1.4
and I will add a few minor improvements of my own
that you may find useful
as a thank-you =]
johnd 11:03 will that come in the 1.4 final? When is this due?
FB_GitHubBot 11:03 FireBreath: master Richard Bateman * 38557aa (1 files in 1 dirs): Updated fb_installer.js to a usable state - http://bit.ly/hpGE5W
taxilian 11:03 hmm. that one the author didn't get brought in
weird
1.4 is due pretty much as soon as I fix the last issue that has been reported
which I think is the linux attachedevent thing
FB_GitHubBot 11:03 FireBreath: master Richard Bateman * e10fc24 (1 files in 1 dirs): Attempt to fix issue #152 - http://bit.ly/ebnXWR
FireBreath: firebreath-1.4 Richard Bateman * 053f17c (1 files in 1 dirs): Attempt to fix issue #152 - http://bit.ly/hZh7UA
neilg_ 12:03 Quick question - something I can't find on the wiki. On the mac, CMake produces the .plugin bundle. I need to copy some dylibs into the bundle. How would I go about doing that with CMake?
FB_GitHubBot 12:03 FireBreath: master Richard Bateman * f692c09 (1 files in 1 dirs): added additional tools to fb_installer.js - http://bit.ly/h7ZGEm
neilg_ 13:03 Also, the plugin(s) work fine on the mac in both Safari and Firefox - but not even slightly in Chrome. Anything obvious I should look at?
amackera 13:03 neilg_: what's the problem? crash?
neilg_ 13:03 No, it just doesn't work. I place the object into the DOM but I can't get to the property in the plugin object
The same code works fine for all browsers on Windows along with Safari and Firefox on the Mac
amackera 13:03 have you restarted chrome?
neilg_ 13:03 I can see the plugin(s) in about:plugins in Chrome
Yep
amackera 13:03 hmm
neilg_ 13:03 First thing I tried :)
amackera 13:03 haha
i can't think of a reason why it would not work in chrome, but would in safari
or at least not an obvious reason
time to break out the debugger i'm afraid :(
neilg_ 14:03 Yup, I guess so! Damn. :)
Okay, weird. It knows that the properties and methods exist on the object so the plugin is loading - it just returns undefined for everything
Wait, no, that's just not true
It doesn't know they exist at all.
I was mistaken
How am I meant to launch Chrome with the --plugin-startup-dialog argument?
I would assume "open /Applications/Google\ Chrome.app/ --args --plugin-startup-dialog"
That doesn't work thoug
*though
amackera 14:03 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --plugin-startup-dialog
Then when you start your plugin instance you can attach the xcode debugger
I am not sure if it works properly though.. i could never get it to print the pid of the plugin sandbox
i ended up just opening one tab in chrome
then i saw some rendering debug info in bash about which pid is the renderer, and didn't attach to that pid
in other words i just guessed the right chrome instance to attach to :S
neilg_ 14:03 Yeah, it's not working for me either. Guess I just have to guess!
neilg_ 14:03 Doesn't work with Chromium either (the plugin nor the arguments) so at least it's consistent
But if I can't debug this, I don't know how to track down what's going wrong inside FB
:(
taxilian 14:03 well, you could try logging something to a file
or even causing a crash intentionally =]
if it doesn't crash, it didn't hit that part of hte code....
neilg_ 14:03 That's true. It doesn't even hit my code (I already log initialization to stderr) so it looks like it's something in FB
I can try that
taxilian 14:03 it may redirect stderr
neilg_ 14:03 That's possible. But that would make me cry...
:)
Yup, it doesn't even get to my plugin - I put an int 3 in the StaticInitialize()
Crashes Firefox and Safari but does nothing in Chrome
taxilian 14:03 okay; deeper problem, then
strange
I recommend you curse and yell at it for a few minutes
neilg_ 14:03 Well, technically it gets the "Plug-in Failure" on Safari but...
taxilian 14:03 and see if that helps
neilg_ 14:03 I already cursed it out, it doesn't seem to have changed its ways :(
taxilian 14:03 but did you yell?
sometimes cursing alone isn't sufficient
neilg_ 14:03 I might have to go outside in order to do that. :)
taxilian 14:03 then the computer can't hear you and it's not effective
neilg_ 14:03 Chrome is just not playing ball! lol
jellosea 14:03 hey, when i'm trying to use prepmake.sh to use the system boost libraries i keep getting CMake Error at src/NpapiCore/CMakeLists.txt:109 (export):
export given target "/usr/lib/libboost_thread-mt.so" which is not built by
this project.
taxilian 14:03 jellosea: what is the exact command you're using with prepmake.sh?
ooh… actually, I think I know what would cause that. your'e on 1.5, right?
neilg_ 14:03 Yup
jellosea 14:03 ./prepmake.sh -DWITH_SYSTEM_BOOST=1
taxilian 14:03 wait, didn't someone else fix that and was supposed to send me a patch?
jshanab_wcw or neilg_ or someone?
FB_GitHubBot 14:03 FireBreath: firebreath-1.4 Richard Bateman * 8f24792 (1 files in 1 dirs): Removed .dll from PluginConfig where it didn't belong - http://bit.ly/hRbniG
neilg_ 14:03 jellosea: You need to set BOOST_ROOT don't you?
taxilian 14:03 neilg_: not if it's in a standard location
jellosea 14:03 I did set it, but it didn't make a difference
right..
taxilian 14:03 his issue is actually a bug in 1.5
I can fix it, but it'll take me a few minutes
I don't use system boost, so sometimes forget to have it tested
jellosea 14:03 I think the built in boost is causing a problem with another library that i'm trying to use, libtorrent
so that's why i'm trying to use the system boost
is the bug there in earlier versions?
taxilian 14:03 fair enough
no, 1.4 works
but I can have this fixed in a few minutes
if you don't mind waiting a bit
jellosea 14:03 oh sure :)
taxilian 14:03 (literally a few minutes, not meaning "tomorrow", or "next week")
jellosea 14:03 haha okay :)
neilg_ 14:03 I have a patch for boost in 1.5
taxilian 14:03 neilg_: yeah, I was thinking someone did
why haven't you given it to me yet?
neilg_ 14:03 If that's the patch you're meaning :)
taxilian 14:03 yes
that was it
neilg_ 14:03 Because I suck
taxilian 14:03 the one you said you'd send me
see, jellosea, it's actually neilg_'s fault it doesn't work, not mine
jellosea 14:03 haha
taxilian 14:03 neilg_: how quickly can you send it to me? =]
neilg_ 14:03 It normally is! :)
Very... if you tell me how I'm meant to do it. I've not created patches using git before
taxilian 14:03 are you using git?
neilg_ 14:03 Yup
taxilian 14:03 do git status and see what has changed
then for each file that should be in the patch, do "git add <file>"
you can do directories and get all changes in the dir as well
if I'm talking too simple for you, let me know
basically you want to create a commit with the changes needed in it
then you could either push it to a fork or use format-patch, whichever you want to learn how to do today
neilg_ 14:03 So I've added the files, I don't mind whether I fork or format-patch. Though if I fork I suspect I need a login on github so...
taxilian 14:03 okay, we'll do format-patch
git status to make sure they are all in the "files to be committed" stage
(called the staging area)
then git commit -m "message..."
but first you may want to set your username and such
if you haven't already
so your name is on the commit
$ git config --global user.name "Tekkub"
$ git config --global user.email "[email protected]"
crash course "really quick how does git work" page worth reading: http://progit.org/book/ch1-3.html
neilg_ 14:03 Done!
taxilian 14:03 okay; you committed?
then just do git format-patch HEAD^ (which means make a patch for each revision starting the one before HEAD)
neilg_ 15:03 Done
taxilian 15:03 it should have created a .patch file
nirvdrum 15:03 If you guys wouldn't mind upvoting my buddy on an HN piece, it'd be appreciated: http://news.ycombinator.com/item?id=2281202
neilg_ 15:03 Aha! Yes it did!
I need to sit down and read through progit
Where would you like me to mail that?
taxilian 15:03 [email protected] works
nirvdrum: done
nirvdrum 15:03 Thanks dude.
jellosea 15:03 hey taxilian is it commited yet?
taxilian 15:03 we should submit something to hn when we release 1.4
jellosea 15:03 i tried git pull but it says up-to-date
taxilian 15:03 jellosea: hang on, neil is sending it to me
jellosea 15:03 oh kk
taxilian 15:03 neilg_: another maybe easier option would be to submit it in an issue either on github or gcode
you really need to set up a github accoutn, though, dude =]
neilg_ 15:03 Mailed!
taxilian 15:03 got it
looking through now
neilg_ 15:03 I think I have one - but not set up on that machine
Cool. Hopefully it's not a complete disaster ;)
taxilian 15:03 ${Boost_LIBRARIES} is pointless if you're not using WITH_SYSTEM_BOOST
well, no, maybe I reuse it
but it should be in the target_link_libraries either way
(just noting, I'll fix these things)
it's the export statement that needs to not have it
neilg_ 15:03 Hmm. That would make lots of sense. :)
taxilian 15:03 err, why exactly did you disable the ActiveX unit tests?
and the scriptingcore tests?
FB_GitHubBot 15:03 FireBreath: master neilg * 8efb630 (4 files in 4 dirs): Fixed supporting external boost libraries in 1.5 - http://bit.ly/hHK2Jt
taxilian 15:03 jellosea: try that
let me know if it works
jellosea 15:03 sure
seems to have worked, thanks!
taxilian 15:03 awesome
thank neilg_; it was his patch
of course, he tried to disable all of our unit tests at the same time… still not sure why, but maybe he just hates us
gotta reboot into windows; be back soon
jellosea 15:03 make[2]: *** No rule to make target `/usr/lib/libboost_thread-mt.so', needed by `bin/istream/npistream.so'. Stop.
neilg_ 15:03 Oh, sorry. I had more than one fix going at the same time. :(
jellosea 15:03 neilg_: i'm getting this error when i try and make
neilg_ 15:03 The unit test was crashing on the mac so I disabled it
Have you deleted your build directory and regenerated it?
I find I have to do that most times the CMake files change
jellosea 15:03 oh okay, i'll do that
nice, it works, thanks!
neilg_ 15:03 Cool, glad to hear it!
taxilian 15:03 so neilg_: why exactly did you find it neccesary to disable the unit tests?
neilg_ 15:03 Because they were crashing on the mac
taxilian 15:03 don't disable them! fix them!
if they're crashing then something is wrong :-P
neilg_ 15:03 Yes - and I normally would. But deadlines loom. :(
Though you are right, it's probably a very false economy to ignore them
taxilian 15:03 well, if those deadlines hit and you're done but it turns out there is a crash that you thought only affected the unit tests, dont' blame me :-P
it may very possibly have been something unrelated to normal plugin use, but I wouldn't take chances, if it were me
they don't crash when not using system boost, incidently
at least not for me
neilg_ 15:03 That's actually why they crashed, I just remembered
Because they're dependent on the dynamic libraries that aren't in those directories
taxilian 15:03 ahh
wait
the boost libs?
or what?
neilg_ 15:03 Yes, the boost libs
taxilian 15:03 hmm. that really needs to be fixed, then
neilg_ 15:03 Because the boost dynamic libraries aren't in my path, the unit tests were failing because it was looking for them
taxilian 15:03 ahh; you're linking to them dynamically
I try to avoid dynamic links with plugins
we'll have to find a way to solve that, then
neilg_ 15:03 I should have reported it rather than just removing the unit tests
taxilian 15:03 but disabling unit tests is not the way =]
yes
neilg_ 15:03 But I'm glad you questioned me
Because that reminded me why I did it in the first place!
taxilian 15:03 just please be more careful and don't try to push something like that into the trunk again =]
neilg_ 15:03 I am sorry, I forgot that I'd even made that change. There were other changes I made sure not to push ;)
taxilian 15:03 hehe. oh, good
anything I should know about?
I'm not angry or anything -- I still appreciate the patch -- just when it comes to putting things in the codebase I have to be choosy =]
neilg_ 15:03 And you're absolutely right to be choosy! :)
No, I've just made changes so that important preprocessor macros are defined
There's a system level bug on OS X 10.6 with basic_string
And if you don't define _GLIBCXX_FULLY_DYNAMIC_STRING=1 then you tend to get a lot of debug spew about memory errors because libc was just compiled incorrectly. Or it was compiled correctly and the system config.h doesn't have that define. :)
Oh - the problem I was having with the plugin in Chrome seems to be an issue with Chrome and hidden objects. The plugin works fine with stable builds of Chrome but fails in beta builds
taxilian 16:03 neilg_: interesting. I generally never completely hide my plugin; too many weird issues. instead I make it 1x1
neilg_ 16:03 We did that on IE but found it still created a big space for it. The only way we could stop that was to hide the plugin object
There appears to be more to it than that because the plugin still doesn't work in Chrome 10 - but it does at least initialize it now
stuartmorgan 16:03 taxilian: unfortunately, some plugins, on at least some platforms, crash when given a 0x0 size
which is why browsers do weird things with 0x0 plugins
taxilian 16:03 stuartmorgan: that's why I make them 1x1
neilg_: works on all platforms, all browsers
neilg_: the trick to sizing plugins, though, is to make them 100%x100%
and then put them in a div that is sized 1x1
taxilian 16:03 stuartmorgan: any idea what the difference between the old npapi-headers proj and the new npapi-sdk?
stuartmorgan 16:03 Yes, Josh wants to put sample plugin projects there, and maybe some utility code
taxilian 16:03 fair enough
stuartmorgan 16:03 So the old name didn't really make sense
taxilian 16:03 makes sense
no change in the headers, though?
stuartmorgan 16:03 Nope
taxilian 16:03 ok
stuartmorgan 16:03 Well, there's a bug that was fixed
taxilian 16:03 the const?
stuartmorgan 16:03 Yep
taxilian 16:03 I'll have to remember to pull that in, then
stuartmorgan 16:03 There should be a fix soon for the last filed issue; uintptr_t I tihnk
taxilian 16:03 okay; mainly just want to have the best headers for 1.4
I really need to find time to look at that linux AttachedEvent issue
problem is I don't often develop on linux these days
pnapieralski 21:03 Does Firebreath allow me to return a typed array to the web page? I'm hoping to return a Float32Array that could be passed to a WebGL call.
taxilian 21:03 well
you can return an array
and you can put double values in it
so if that counts as a typed array, then yes
I'm pretty sure that's the closest thing javascript has to a Float32Array, so it's probably adequate
pnapieralski 21:03 Unfortunately it doesn't =(. I guess there is a huge difference between typed arrays (which are incredibly recent) and regular javascript arrays.
taxilian 21:03 perhaps; I have never heard of a typed javascript array
however, if you can create it with javascript, you should be able to do it with FireBreath
though it's possible you might have to inject a small javascript function into the page to do it
pnapieralski 21:03 Oh?
taxilian 21:03 you can call javascript functions from FireBreath
for example, the way we get a javascript array is by calling window.Array()
pnapieralski 21:03 Oh, a comparison of typed arrays vs regular js arrays http://weblog.bocoup.com/javascript-typed-arrays
Oh right right! Let me play with this for a bit.
Danke.
taxilian 21:03 Bitte
so you can't call "new Float32Array" with NPAPI any way I've found
you can use evaluate, but FireBreath doesn't support return values from evaluate because IE doesn't
however, you could use evaluate to set window.newFloat32Array = function(size) { return new Float32Array(size); }
and then get that function and call it to create new arrays
pnapieralski 21:03 Excellent. I'll try that approach. For my purposes, I'm not too worried about it working in IE :p
My test browsers are limited to Firefox 4.0 beta and Chrome until WebGL starts to take off :o
taxilian 21:03 hehe
understandable
but you understand why I can't put features in FireBreath that don't work elsewhere =]