IRC Log Viewer » #firebreath » 2012-02-15

IRC Nick Time (GMT-7) Message
taxilian 00:02 FireBreathBot: tell jogi you can't send arbitrary structures to javascript; you can create a FB::VariantMap and send it back with "nodes" and "coords" info with VariantLists in them, if you want, but you wouldn't create a struct for that. Read the interacting with javascript pages and look in the FBTestPlugin example project for instructions and examples of using a FB::VariantMap
FireBreathBot 00:02 taxilian: I'll pass that on when jogi is around.
chrisd_ 02:02 I'm having a problem with chrome noticing the installation of a second firebreath plugin until I restart chrome.
If I do regsvr32 on plugin 1, chrome notices that plugin, but when I do regsvr32 on plugin2, chrome doesn't detect plugin2 until I restart chrome.
prem_ 02:02 visit the tips and tricks section of this website
there is code given something like navigator. something..
chrisd_ 02:02 Conversely, if I register plugin2 first, chrome notices that, but not plugin1. Very strange, and seemingly not a problem with other non fb plugins.
I wondered if it had anything to do with FireBreath giving the same APPID to all firebreath plugins?
prem_ 02:02 navigator.plugins.refresh(true);
chrisd_ 02:02 ok, will try that, but seems to be a fb specific problem to me.. thanks.
chrisd_ 03:02 ok, tried that... it worked! thankyou.... but I still wonder why I don't get the same problem when registering non fb plugins.
Jogi 04:02 Hi. I am looking to create an openGL application that reads from a 3D datafile and renders graphics on a canvas. I am looking to develop this for all major browsers. Can someone please advise me on how I could go about in using firebreath to do the same? I have the file parser ready and written in C++. I stores the visualization data in an object. I want to know how i can proceed in visualizing this data in the browser. Thanks in adv
FireBreathBot 04:02 Jogi: 07:10Z <taxilian> tell Jogi you can't send arbitrary structures to javascript; you can create a FB::VariantMap and send it back with "nodes" and "coords" info with VariantLists in them, if you want, but you wouldn't create a struct for that. Read the interacting with javascript pages and look in the FBTestPlugin example project for instructions and examples of using a FB::VariantMap
Jogi 04:02 Thanks taxilian. I think i want to change my approach towards this problem and not use WebGl at all (due to efficiency reasons. My data is very large). Instead create something like a flash player using openGL. Can you please tell me how I can go about.?
kun 06:02 hey guys what script do I have to run or which changes have to be done when I rename the firebreath folder or move the folder to another location
taxilian 09:02 FireBreathBot: tell kun after moving the firebreath directory (or the project dir, or whatever) just delete the build dir and rerun the prep script (not fbgen, just the prep script)
FireBreathBot 09:02 taxilian: I'll pass that on when kun is around.
taxilian 09:02 FireBreathBot: tell jogi you'll have to create an opengl context and draw to it; there is an example of doing so in windows on the wiki and on Mac in BasicMediaPlayer
FireBreathBot 09:02 taxilian: I'll pass that on when jogi is around.
shenberg 20:02 Hey, anyone here? I'm facing a really serious memory leak
and I replicated it very easily using a fresh git clone and the example plugin
taxilian 21:02 shenburg: whats up?
dougma 21:02 in my experience it was easy to leak plugin instances when manipulating the dom... but i don;t currently have any internal firebreath memory leaks.
but that's possibly too if you hold a strong pointer when perhaps you should have a weak...
finding those cycles takes some diagramming. :)
shenberg 21:02 Ok, I cloned firebreath-dev to a new directory
and then proceeded to modify FBTestPluginAPI in the following ways:
I added an attribute called "crap" by doing registerAttribute("crap", "", false); in the constructor for FBTestPluginAPI
and I added a method, which looks like this: void setCrap(const FB::variant& val) { setAttribute("crap", val); }
and registerMethod("setCrap", make_method(this, &FBTestPluginAPI::setCrap)); inside the c'tor
now, I can leak memory on demand in javascript
for example, I took the test page, waited for the tests to finish
and then wrote roughly the following into the javascript console:
var p = plugin(); for (var i = 0; i < 100000; i++) {p.setCrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");}
taxilian 21:02 hmm. perhaps we are leaking in the variant, then
shenberg 21:02 Not perhaps. I'm 100% sure. It's a leak on assign
only in visual studio
well, not 100% sure
but this is a replication of a bug that's been haunting me for a while
assigning a variant seems to leak on MSVC. Couldn't figure out why, though
I did notice that using .assign() explicitly doesn't leak in MSVC (I'm using 2010)
taxilian 21:02 hmm. using an assignment should implicitly do a .assign, though...
shenberg 21:02 Also, a semi-related issue I hit on is that in mac, using .assign() caused a crash. I had a line of code which does MyJSAPI.m_variant.assign(make_variant(std::wstring(10000,'a'))); which works on windows and crashes on mac
taxilian 21:02 I think perhaps it's time to revisit variant
shenberg 21:02 That's what I thought too
taxilian 21:02 I just need to find time :-/
dougma 21:02 wow, variant.h is well hairy
taxilian 21:02 there is an updated version of the variant I started with
that is one option
another option would be to use boost::any
dougma 21:02 lne 389
line 389
"avoid deallocating and reuse memory"
what if the type is an object which manages memory? like a std::string?
shenberg: remove that table == x_table test and test again?
shenberg 21:02 on it
changed it to if (false), still leaking
dougma 22:02 I'll try stepping through to work out what's up.
taxilian 22:02
this is where it came from
it was updated last year "to fix some really n asty bugs and to simplify the code"
you could potentially update the variant class iwth that
and it might fix the bugs
I added convert_cast
and related
the rest is mostly from this class
shenberg 22:02 Hmm, I'll look into it tomorrow - I'm finishing up a release with my current ugly work-arounds and I want to leave before midnight :)
dougma 22:02 "nasty bug" fixes sound promising. :)
shenberg 22:02 Also, what sort of mentions are you expecting in the EULA?
dougma 22:02 it's bsd, so
oh wait, it's dual licensed
shenberg 22:02 BSD is the one I want, naturally (mostly because of the curse words in the code :)
hmm, I'm going to start working on this now, seeing as I'm blocking on the EULA-writer for finalizing the installer anyway...
dougma 22:02 shenberg: variant.h line 342 is another smelly one
the code goes this way on assignments after the first one
and you go into the strange move function where it invokes the destructor and then the assignment operator! scary
taxilian 22:02 !findfile variant.h
FireBreathBot 22:02 Found 1 matching file(s) in the master branch. First 1 are:
taxilian 22:02 dougma: variant.h line 342 is a comment….
blank line, actually
are you talking about the destructor?
anyway, I'm open to changing the class; I've thought about it before, but didn't want to take the time absent a concrete reason
it will take a bit of work to make the conversion code work is all
dougma 22:02 i seem to be out of sync... i meant line 354
taxilian 22:02 ahh. yeah
there is a big long stackoverflow argument about this stuff somewhere
there were some conceivable ways that this could be a problem, but we've never been able to actually make it happen before
anyway, I gotta get my family home; g'night all
dougma 22:02 i'm trying to write a test to provoke it
will look into what it will take to use boost::any
shenberg 23:02 okay, testing installers is boring, so I finished compiling the code with the updated variant. Now here's to hoping nothing breaks horribly