|IRC Nick||Time (GMT-7)||Message|
|jshanab_wcw||06:12||Good morning people. Is there a C++ logger already in the firebreath code or one that you recommend?
found "add_firebreath_library(log4cplus)" in feature list on wiki
|elthariel||06:12||iirc there's a simple stream called clog in the stl that might suit you need|
|jshanab||06:12||I am getting an exception when my plugin loads." FB::bad_variant_cast" It shows up in NpapiPluginModule::NPP_New when i debug. Suggestions?|
|jshanab||07:12||return m_params[name].convert_cast<std::string>() IS the culprit. How do i get a string of a FB::variant?|
|neilg_||07:12||Are you sure you have the parameter contained inside name passed into your plugin?
You're not checking that you have the parameter - so that could be the cause
|jshanab||07:12||OMG, right not sent. I didn't realize it would just plain crash
How do i check for existance on these FB::VariantMap values?
nevermind, just a std::map
Sorry, I wasn't looking at this window
Is this in IE?
|jshanab||07:12||FF first. It lloks like the operators like "!=" are not declared inside the FB::VariantMap|
|neilg_||07:12||I'm not sure how they could be really with them being unknown types|
|jshanab||07:12||so how do I cleanly check for a vlue m_params.find(name) != FB::Variant::end does not compile|
|neilg_||07:12||You'd normally check m_params.find(name) != m_params.end()|
|jshanab||07:12||tahnks, helps when I spell things correctly :-)|
|jshanab||07:12||"Error : a pointer to a bound function may only be used to call a function" wtf?
it gives me that on the dot between m_params and end
oh, god, please ignore that last one. More coffe is indicated
|neilg_||07:12||I know the feeling! Although sadly I avoid caffeine these days. :(|
|jshanab||07:12||I have recently rediscovered it. 30+ 12 hour days and I am new to the cold weather. (Just moved to chicago area)|
|neilg_||08:12||I moved to Boston about 2 years ago. Not quite the coldest weather I've had... but more snow than I've ever had to deal with before!|
|jshanab||08:12||here, they never mention the temperature without mentioning the equivilent wind chill temperature LOL|
|neilg_||08:12||Same here - but I can only imagine it must be windier there. I've only been to O'Hare, I've never been out of the airport to find out! lol|
|jshanab||08:12||I work in bolingbrook, a subburb and also have only been to ohare, I haven't had a chance to get into the city and see chicago yet (gotta buy a real jacket)|
|nirvdrum||09:12||taxilian: Am I on the moderation list?|
|taxilian||09:12||I think you might be
moderators list, that is
|taxilian||09:12||is that okay?|
|nirvdrum||09:12||Okay. I just wanted to make sure you didn't misconfigure something. I had a bunch of messages I didn't expect :-P|
|taxilian||09:12||hehe. yeah; I pretty much picked whichever people I thought of, trusted, and could find on the group list and made them moderators
there shouldn't be too many messages, since it should only moderate until we mark "always allow", which I do the first time they post something real
hopefully this will prevent spam in the future
|taxilian||09:12||however, I want a lot of moderators because I dont' want people's messages to not make it to the list just because I'm away from a computer|
|taxilian||09:12||so thanks for being willing to help =]|
|taxilian||09:12||I'm down to two projects and 3 math assignments to finish before finals next week. I might actually survive this semester! :-P|
|nirvdrum||09:12||Heh. Good luck.|
|taxilian||09:12||(the great thing about running an open source project is that you can whine in the chatroom and nobody kicks you out. :-P)|
|taxilian||09:12||not only that, but people pretend to care, because they might need your help sometime! I should have done this years ago… ;-)|
|nirvdrum||09:12||I care because you do.|
|taxilian||09:12||hehe. =] actually, all joking aside, I have to admit; the awesomeness of hte people in this chat room is the #1 reason that I spend as much time on FireBreath as I do
I sometimes sign in in the middle of the night just to see if anyone has ask questions that the people here at the time couldn't answer :-P
|nitrogenycs||09:12||(or were to lazy to answer ;))|
|taxilian||09:12||well, yeah ;-)
as soon as finals are over, I'll actually be able to code again…
might be able to fix some of the issues people are reporting
well, I'm off to get breakfast. be back later
|jshanab||11:12||where is the call to CreateJSAPI suppose to be. Mine is not getting called
I seea call in getRootJSAPI...
|neilg_||11:12||In your main plugin
It should have been generated underneath your constructor and destructor
|jshanab||11:12||For some reson I am loosing the shared_ptr to the API
I think it is a timeing issue with me not understanding the order of things. I crash int he onPluginReady
when onPluginReady is called, the pointer tothe api is not yet set. Cause it is inside the API at the time it calls it. :-)
It is supposed to be set in onWindowAttached, but that has notbeen called yet ?
no,no, sorry that is the window
|neilg_||11:12||I'm a little confused by what you're trying to do?|
|taxilian||11:12||jshanab: it is possible that the JSAPI will not have been created yet at that point
but, you can safely create it
so call getRootJSAPI() to get it
if it's not created, it will create it
if it is created, it returns it
|neilg_||11:12||Hey taxilian, hope school isn't kicking your behind too hard! I'm trying to hold the fort down here as much as possible. :)|
|taxilian||11:12||I appreciate it =]|
|taxilian||12:12||whew. only one project and 3 math assignments left
well, and studying for finals, I suppose… =]
|neilg_||12:12||Finals shmynals. lol|
oh, believe me… I'm starting to feel exactly that way =]
be back later
|neilg_||13:12||jshanab: Did you get your problem with the JSAPI solved?|
|jshanab||13:12||Yes!. Sorry for my absence, the net was down in the whole area for a while. Now I am chasing wild pointers and things that make the browser go hummmmm|
always fun =]
|jshanab||13:12||Now it goes deep into boost and the Invoke method and eventually dies. (need a bidirectional debugger, with an undo)|
|taxilian||13:12||wait; what is "dying"?|
|jshanab||13:12||I am crashing the browser|
|taxilian||13:12||are you using the ptr as a raw pointer anywhere instead of as a shared_ptr?
i.e. passing a MyAPI* instead of boost::shared_ptr<MyAPI>?
|jshanab||13:12||I have a shared ptr to an existing video player. the test methods work, but my play method crashes the browser|
|taxilian||13:12||hmm. where in boost is it crashing?|
|jshanab||13:12||I am a bit unclear, you know, gotta keep re-running the debugger until you dig down just deep enough|
|taxilian||13:12||can't you just go back up the stack?|
|taxilian||13:12||well, sounds fun =]
when you say "an existing video player"; is that your own object or a firebreath type object (API or Plugin)?
|jshanab||13:12||it is in MethodConverter in the Method_wrapper0, then up to bind...|
|taxilian||13:12||this occurs during a function call?|
|jshanab||13:12||it is similar tot he way the BasicMediaPlayer is architected with a windows specific player using a CPlayer,h in the top level|
|taxilian||13:12||what do you do to cause the crash?|
|jshanab||13:12||I step thru and it is in the tail end of Invoke (FB::variant FB::JSAPIAuto::Invoke) that it eventually gets to "auto_ptr not dereferenccable"|
|taxilian||13:12||is this when calling the method on JSAPI or after the method is called?
does it crash before or after your method is called?
|jshanab||13:12||I drag my test page into the browser after attaching to the firefox process. Then I call plugin().echo("fdsaasd") to make sure it is there
The I call plugin().Start() which supposedly starts the http connection to the server and starts pulling frames across the network
Oh, during :-)
|taxilian||13:12||well, the code you're describing is the code that executes to call the method
so the problem likely isn't in any of the methodconverter stuff if it's happening during the execution of your function
|jshanab||13:12||right, stepping in where I stepped over last time.|
|taxilian||13:12||set a breakpoint on the first line of your function
find out which call in your function causes the issue, then step in from there
|taxilian||13:12||it shouldn't have anything to do with methodconverter if you start that way...
stepping into a JSAPI function is, unfortunately, a little bit of a pain due to the autoconversion stuff...
|jshanab||13:12||got it, yeh, i had issues earlier with the JASPI pointer, so that is why I had it one level up before.|
|taxilian||13:12||ahh. Yeah; the most imporant thing to remember is to never pull a JSAPI object out of the shared_ptr.. always use it as a shared_ptr =]
but if the ptr is null, that'll get you
|jshanab||13:12||The problem I have is it returns from my function just fine, then returning from the API method is where it goes nuts. ironically it looks like it is trying to return something but the function returns void. Maybe needs to br FB::Variant?|
|taxilian||13:12||what is the return type of the JSAPI method?
and what are you returning?
|jshanab||13:12||void and I dont have a return|
|taxilian||13:12||hmm. then most likely it's an exception firing somehow
auto_ptr is not a type that firebreath uses
so that error would have to come from your code
|jshanab||13:12||there is a try catch block and it doesn't enter the catch|
|taxilian||13:12||does it catch anything or a specific exception type?
also, try commenting out the "meat" part of the function and see if it still happens; then add them back in one by one
|jshanab||13:12||It goes into MethodConverter after the return of the API call and the next line is return FB::variant();|
|taxilian||13:12||that should be correct|
|taxilian||13:12||void return call should return an empty variant
|jshanab||13:12||Correction. I ran it aginand it skips the return and goes on to (instance->*f)() first then returns|
|taxilian||13:12||that should actually be the function that was just called (your method)|
|jshanab||13:12||it then goes into an operator()() and I have one of those too!|
as you keep stepping back out, where does it croak?
|jshanab||13:12||let me re-run it|
|taxilian||13:12||and what is the exact error it gives you?|
|jshanab||13:12||last line a few before stopping I think: return it->second.call(args); in JSAPIAuto::Invoke args is null BTW|
|taxilian||13:12||args is null? that doesn't make sense; that's the call into your function
you must be corrupting the stack somehow, unless something else equally weird is happening
I recommend commenting out most lines in your function and verify that it works when doing essentially nothing
then add things back in a little at a time to see what breaks it
the last time I saw an issue like this it had to do wtih conflicting but very similar function prototypes (the .h wanted to give a slightly different format arg than the implementation actually expected)
|jshanab||13:12||it goes to No source Available with an error in xul.dll. then I hit go again and I get the Expression: auto_ptr not dereferencecable|
|taxilian||13:12||ok; your stack is messed up somehow, then. there is no reason you should find yourself there
you can actually get the symbols for mozilla and find the name of the function it's dying in, but...
yeah, try pulling things out and narrow down the problem that way
can args be null when my function has no args and returns void?
args will never be null
it's not a pointer
it's a vector
if it were null coming in, it would have already crashed
|jshanab||13:12||oh, sorry it is an empty vector i think|
|taxilian||13:12||ok; that is possible|
|jshanab||13:12||Never name your plugin starting with MV.. it ends up in the uninstall window right after all the darn microsoft ones, next time it is gonn be called "AAAAAAplugin"|
|jshanab||15:12||Man i am close. I am calling getHWND on the FB::PluginWindow and I get an adrres It does say "unused=???" in the debugger, can I draw on this handle?|
|taxilian||15:12||no idea; but if you're doing a windowed plugin, then it should be a good handle (as long as AttachedEvent has been called)
what was the pointer issue?
|jshanab||15:12||I see what i have forgotten. the gdistartup and shutdown. Can that go in static init and static de-init?|
|taxilian||15:12||yes, that should work
don't, whatever you do, try to put those in a static object to drive the startup and shutdown when the module loads and unloads
|jshanab||15:12||numerous pointers not yet set as I have filters, etc.|
|jshanab||15:12||Got it all pulling data off of our server and pushing images into the display buffer, just no GDI init :-)
I don't get the "static object" warning
|taxilian||15:12||some people try to make a static object that initializes GDI in the constructor
and deinitializes it in the destructor
|taxilian||15:12||the problem is that those are destructed while DllMain is running, which means that threads can't be started or stopped
so it will deadlock
darn that puts windwos specific stuff inthe plugin, gotta refactor
|jshanab||16:12||Do i get the rect from the browser?|
|jshanab||16:12||Not params, but maybe properties.|
|jshanab||17:12||wohooo! sucess. well except for ie, paramas not handled the same?|
|Bozo_||18:12||Question: How can I create a firebreath plugin that support multiple mime types? Where can I get the mime type when my plugin is embedded in a web page?|
|taxilian||19:12||Bozo_: Currently FireBreath does not support multiple MIME types
I've been meaning to add support for it, but I have not yet figured out exaclty how to go about it on IE
if you know ActiveX decently at all I'd love some help =]
|taxilian||19:12||scJohn: you around?|