IRC Log Viewer » #firebreath » 2012-05-04

IRC Nick Time (GMT-7) Message
jshanab_wcw 09:05 I am getting the assertion about weakHost.expired() and for the life of me cannot see where I went wrong. Any tricks to debugging this?
reichi 09:05 well
you most probably hold a reference to the BrowserHost within one of the objects to actually publish via javascript
but you don't have control over the lifecycle of those objects
the browser manages when they're to be destroyed
which can be even after your plugin disappeared
I recently ran into that issue, too
jshanab_wcw 09:05 But I cannot see anywhere where I may of done this. What did you find that did it?
I use getRootJSAPI() all over in the plugin
reichi 09:05 well
i would at first have a look at things i am passing through using javascript
chances are good you'll find your problem there
jshanab_wcw 09:05 I don't get it. nothing gets passed through javascript, it is all calls to the api
reichi 09:05 well you can be sure
the assertion is right
you do have a reference to the browserhost left
while they should all be gone
jshanab_wcw 09:05 Maybe I am not clear on what is the browserhost.. iis it the m_host pointer passed into the plugin used to create the JSAPI?
reichi 09:05 yes
you may not pass that around
that will most likely get you into trouble
jshanab_wcw 09:05 And I do not. But I do pass a shared pointer to my plugin to some member classes
reichi 09:05 same problem
the plugin hold the m_host
if your classes hold the plugin
jshanab_wcw 09:05 I have done that for months, it is the other way. child classes of the plugin are passed a pointer to the plugin as a parent so it can communicate back. so they should be destructed before the plugin is
Valo 13:05 if a page embedded with firebreath plugin is opened in two tabs, each of them uses different instance rite?
taxilian 13:05 a different instance, yes
but the same memory space
so anything static or global will be shared
Valo 13:05 i see
is there any way to workarpund with it?
taxilian 13:05 with what?
Valo 13:05 i'm using static value but i dint want it to be shared =p
taxilian 13:05 you could create another process and set up IPC between them, I suppose
but otherwise no
Valo 13:05 hurmm maybe i need to think of another way to hold value then =)
taxilian 13:05 good thinking
Valo 13:05 write/read on file maybe =)
thanks for the clarification
taxilian 13:05 why exactly can't you just put it on your plugin class?
well, I'm off to lunch. good luck
it sounds to me like you're probably complicating something too much, though.
*gone*
Guest97410 14:05 Hi can any tell me why im getting this error?
ScriptingCore.lib(JSArray.obj) : error LNK2001: unresolved external symbol "protected: void __thiscall FB::JSArray::RegisterMethods(void)"
im trying to use JSArray class
taxilian 14:05 because the symbol RegisterMethods does not exist, aparently
!find JSArray.cpp
FireBreathBot 14:05 Could not find any tags matching JSArray.cpp
taxilian 14:05 !findfile JSArray.cpp
FireBreathBot 14:05 Found 1 matching file(s) in the master branch. First 1 are:
{u'error_message': u'Invalid Captcha'} (file "/home/richard/phenny/os_projectbot/shorten.py", line 28, in shorten)
taxilian 14:05 d'oh. I should fix that one of these days...
Guest97410/joel: I'm confused; what are you using JSArray for?
RegisterMethods is not, aparently, implemented; I don't know why. JSArray doesn't seem to work, mostly because nobody actually needs it as a general rule of thumb
Guest97410 14:05 sure, im trying to modify an array passed from JS
like in this example
http://www.firebreath.org/display/documentation/class+FB+JSArray#_details
taxilian 14:05 you don't do that with JSArray
hmm
I see
I don't think that class was ever finished
Guest97410 14:05 im open to other suggestions
taxilian 14:05 just use the JSObject methods directly
Guest97410 14:05 can you give the sytax for doing that?
taxilian 14:05 what do you want to do?
Guest97410 14:05 populate the array strings
taxilian 14:05 it's just a JSAPI-derived class
so to add items to the array, simply use:
arr->Invoke("push", FB::variant_list_of("Some string"));
it's a javascript object, so you can use the same methods (push, pop, shift, unshift, etc) that you would from javascript
see http://www.firebreath.org/display/documentation/class+FB+JSAPI
Guest97410 14:05 great, that makes sense
thanks! loet me give that a shot
taxilian 14:05 could you add a jira ticket to remind me to take care of JSArray? We should really either remove it or fix it
frankly I'd forgotten it was there
Guest97410 14:05 haha
sure i can do that
taxilian 14:05 well, I gotta run
take care
good luck
Guest97410 15:05 that worked great
thanks
FireBreathBot 15:05 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-175 issue created by joel
jshanab_wcw 15:05 I have managed to create a problem where when my plugin exits it crashes. Either when I exit the browser or even just change page or reload the page. I have been commenting out things and working for days trying to get this stable again. (it happened right after I added sound and FF updated.) It is ok on XP, only crashes on win7 It is driving me crazy
I step thru destruction and long after the plugin has destroyed when it hits the last XUL in the stack, it crashes. What are the XUL stack entries?
taxilian 15:05 jshanab_wcw: have you tried attaching a debugger to catch the crash?
reichi 15:05 taxilian: thx for merging
taxilian 15:05 sorry I'm so slow at getting to things lately =]
reichi 15:05 slow?
you merged within a day
taxilian 15:05 well, I think I got to yours quickly
reichi 15:05 ;)
taxilian 15:05 there is another that has been there quite awhile =]
git pull request
FireBreathBot 15:05 4 open pull requests:
{u'error_message': u'Invalid Captcha'} (file "/home/richard/phenny/os_projectbot/shorten.py", line 28, in shorten)
taxilian 15:05 grr
jshanab_wcw 15:05 Yes. And the crash is after the plugin destructor is called
taxilian 15:05 gotta fix that
reichi 15:05 yeah
there's another one about unsolicted streams
to actually allow handling them
taxilian 15:05 yeah; I haven't had time to really review it yet
reichi 15:05 but it didn't serve my purpose ;)
taxilian 15:05 but it's integral enough that I don't want to just accept it without really looking it over
reichi 15:05 that's true
i did actually merge it
and the event's worked
but you cannot cancel an unsolicited stream easily
and i actually wanted to do exactly that ;)
taxilian 15:05 hehe. I'll review it with that in mind, then =]
reichi 15:05 maybe i did something wrong
but i felt it's wrong to catch an event
for data you actually don't want
taxilian 15:05 i agree
reichi 15:05 if you actually have the choice to stop it right before it starts
but it was amazing to see how fast RAM fades if you have a 50MBit connection ;)
and a 1h Video
jshanab_wcw 15:05 taxilian. here is what a stack trace looks like as I just begin the close of the browser http://pastebin.com/1fXgE6s9
taxilian 15:05 jshanab_wcw: I assume that your MVSArchivePlayer is the plugin class? or is it something else?
and what is the actual crash message?
!findfile JSArray.cpp
FireBreathBot 15:05 Found 1 matching file(s) in the master branch. First 1 are:
src/ScriptingCore/JSArray.cpp http://tinyurl.com/7o7b8fu
taxilian 15:05 there we go. all fixed
jshanab_wcw 15:05 taxilian. And here is at where it throws access violation. Just after the last bracket in the plugin dtor.
MVSArchivePlaer is the plugin
http://pastebin.com/17CEZYTs
taxilian 15:05 jshanab_wcw: load the symbols for the microsoft DLLs; it may give you more useful info
if you resolve those symbols then you can figure out what it is actually doing
jshanab_wcw 15:05 Good Idea, i had that setup once.
taxilian 15:05 in vs2010 you can just right click on the line and click load symbols
jshanab_wcw 15:05 But when it hits the access violation there is nothing left to click on. It has removed the last XUL off the stack and is sitting on the number with paran after it. I think this is trying to access a function in an unloaded dll, a guess but if I view assembly it is all empty memory
However, I just noticed it is saying that that is in the function MVSArchivePlayer::StaticDeinitialize(void) It was on that closeing brace that it crashed
taxilian 16:05 sometimes you cna't see what is actually on the stack because it hasn't resolved enough symbols
resolve the symbols anytime the top of the stack (or elsewhere) is some address with () on it
the 69830910() at the top means you don't actually know where the stack is
FireBreathBot 16:05 UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 14: ordinal not in range(128) (file "/home/richard/phenny/bot.py", line 186, in call)
taxilian 16:05 heh. convenient
jshanab_wcw 16:05 So far the last 3 lines of code i can see are in NP_Shutdown where it deletes the module. Then it is in XUL and I have not found the symbols for that.
taxilian. I got a more descriptive back trace. This is just before the access violation
taxilian. Oh my. on exit of firefoxe's wmain. So it is a heap corruption problem?. I should also mention i am only loading the plugin then closeing the browser. Not actually running all the video guts
It is interesting that Firefox12 is compiled with and using MSVCR80 and not MSVCR100
jshanab_wcw 16:05 Could loading a plugin built with VS2010 from a browser built with VS2008 cause a problem?
taxilian 16:05 no
jshanab_wcw 16:05 whew.
taxilian 16:05 the only time that would be a problem is if you were allocating memory with one CRT and releasing it with another
that's one reason for NPN_MemAlloc and NPN_MemFree
allows you to allocate and free memory that the browser manages
jshanab_wcw 16:05 It does act like I have managed to do that. Allocate with one an de-allocate with another. I do have a lot of libraries but they have been fine for months.
taxilian 16:05 well, unless you've overridden something at a low level of FireBreath it isn't a problem between the browser and such
jshanab_wcw 16:05 I am getting frazzled. I hate these kind of bugs.
taxilian 16:05 yep
they are most annoying
jshanab_wcw 16:05 Funny thing is it works great in XP
taxilian 16:05 :-? dunno.
hmm
jshanab_wcw 16:05 Set aside list HEAP seems less sensitive than Low Frag Heap
taxilian 16:05 might be a DEP violation
jshanab_wcw 16:05 DEP?
Does this announcement affect FB at all http://weblogs.mozillazine.org/asa/archives/2012/01/end_of_firefox_win2k.html
taxilian 17:05 nope; firebreath never supported windows 2000 to start out
DEP is Data Execution Protection
new in Vista
jshanab_wcw 17:05 Data Execution Prevention. Trying to run code from a section of memory tagged as data
taxilian 17:05 enabled by default in Firefox but not IE
right
not present on XP
jshanab_wcw 17:05 Probably time to get the linux build done. Then maybe I can get a different perspective on the issue
taxilian 17:05 does it crash on Ie?
IE?
jshanab_wcw 17:05 I do have two other Questions. How do we handle the use of libraries in FB for the various platforms. and how do we name it or handle the different mime type on different OS's
(Waiting on a build to try it in IE, As soon as you mention it is off by default I went oh, oh,...)
Ok in IE!
Well, Not really. It crashed on 2nd try
But not the next 5 tries, hummm
taxilian 17:05 why would you have a different mimetype on different OS's?
libraries you just put the target_link_library statement in platformDef.cmake
and use the correct library for the correct platform
jshanab_wcw 17:05 Sorry, not thinking clearly mime type stays the same.
I was playing with QT and noticed the cmake hade things like win32: -L ... and LIN: -L ... to allw them to have seperate paths.
I have just done so much win spefic i guess I will need to really dig into that
taxilian 17:05 it's really not bad
if you write it correctly
jshanab_wcw 17:05 I have tried to go with all cross platform stuff. I almost don't need sepearte win and lin folders for the video display
taxilian 17:05 nice
jshanab_wcw 17:05 And then there is mac....
jshanab_lin 19:05 I had to do a bunch for windows specific stuff to achieve a signed plugin. I think that was for IE only but the install method was an msi made with the wiz installer. What are the Mac and Linux equivilents? rpm? .deb? tar?