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

IRC Nick Time (GMT-7) Message
FireBreathBot 09:04 JIRA issue issue created by pentinen
JIRA issue issue updated by richard
FireBreathBot 09:04 JIRA issue issue commented by richard "Most likely a custom implementation of setInnerHTML needs to be added to the activex side of this"
mkoch 09:04 hello
taxilian 09:04 hello
reichi 09:04 hi mkoch
mkoch 09:04 i had to jump in to an other project, so my firebreath project was sort of interrupted for some time but I'm back and I have questions, if I may :)
have you ever tried to profile a plugin with xcode?
taxilian 09:04 nope
mkoch 09:04 should it be possible in theory or it's not because of the nature of the plugin process or for any other reason?
taxilian 09:04 you're talking memory or performance/
mkoch 09:04 performance
taxilian 09:04 it might be possible
likely tricky, though
probably easier if you disable out of process, which means you'll probably want to try firefox
mkoch 09:04 did you know btw that in safari there is a "New single-process window" option under the Debug menu (if you enable the debug mode?)
taxilian 09:04 I didn't know that
reichi 09:04 mkoch: do you have issues?
with performance?
(well i gues you do)
mkoch 09:04 yes and no. I'm writing a media player plugin which runs fine on my machine, but still I want to optimize it as much as possible
reichi 09:04 because from what i can say at this point is that firebreath doesn't seem to have any major performance impact in general, not even on a 400MHz mips32el device
ah ok
mkoch 09:04 (because one of it's usage will be to display several videos on the same page, so 15-20 instances of the plugin will run simultaneously)
reichi 09:04 i thought you had some performance issues with firebreath
hotel monitoring? ;)
mkoch 09:04 no, not FB itself, more like the drawing routines I made and the API calls towards ffmpeg
exam rooms actually :)
mkoch 09:04 one more general question: if a plugin's last instance is destroyed because the window/tab has been closed, then it will call the plugin's destructor. from there I try to call a done() function of my API to close it properly, but before it could clearly finish, it receives a SIGABRT
is there a way to avoid it?
taxilian 09:04 are you blocking in the destructor?
mkoch 09:04 well, I guess the lib is not blocking, but I need to check it
taxilian 09:04 basically the reason for a sigabrt would usually be that it is taking too long to shut down
mkoch 09:04 if not, can I simply place a loop in the destructor which ask's the lib if it has been unloaded?
taxilian 09:04 a loop?
how would that help?
mkoch 09:04 while(!lib_has_been_exited())usleep(100);
taxilian 09:04 that's still blocking
and that means it'll call SIGABRT
you need to terminate faster
not sleep more
mkoch 09:04 no, I mean I would put it into the FB's destructor, if the lib's done() function is non-blocking
taxilian 09:04 that makes no difference at all
it's the process
reichi 09:04 yeah just wanted to say that
non-blocking becomes literally blocking
when a process should terminate
as it can't until everything is gone
taxilian 09:04 yeah; a loop and a sleep are really not the solution you need
mkoch 09:04 i don't get it. isn't it the problem that ~plugin() returns before the lib has actually exited?
taxilian 09:04 not at all
reichi 09:04 you have a process
taxilian 09:04 the problem is that ~plugin() *hasn't* returned within the time limit that the browser expects
so it kills it
mkoch 09:04 i see
reichi 09:04 becaus it can't return before all threads are gone
(besides the main thread)
mkoch 09:04 ok, so there is no other option then to modify the lib so that it exits faster
taxilian 09:04 pretty much, yes
or find a way to shut it down earlier
mkoch 10:04 like reading the user's thoughts to find out in time when he wants to close the page :>
taxilian 10:04 brilliant!
mkoch 10:04 :D
taxilian 10:04 that would be a useful library; please consider contributing it back to FireBreath when you figure it out ;-)
reichi 10:04 hrhr
we have some great plugin
but you have to purchase a 100k neural-interface so it can shutdown properly
mkoch 10:04 actually I wouldn't mind if the browser kills my lib, the problem is that after it happens, the whole Safari hangs for like 10 seconds and usually reloads all the other pages on the other tabs
reichi 10:04 could the onClose event of the window help maybe?
taxilian 10:04 neato!
reichi 10:04 i guess that's on of the first moments where one gets a notice things will shutdown
taxilian 10:04 you could try starting the shutdown in DetachedEvent, I suppose; I don't know if that's really all that much earlier on Safari, though
mkoch 10:04 and there is also the problem that I want to do it only for the last instance...
taxilian 10:04 wait; why are you doing it with ref counting and not in StaticDeinitialize?
mkoch 10:04 otherwise I'd kill the lib under the other running plugin instances if one is closed
taxilian 10:04 you should have more time in staticdeinitialize
mkoch 10:04 i actually used that and not the destructor, just confused them
taxilian 10:04 ahh
lblissett 12:04 Hi everyone, i am interested in a way to create cross platform (IE/FF/CR/SF) extention. I was wondering if your cross platform 'plugin' can work like an extention?
taxilian 12:04 no
but a plugin can be used as part of an extension
alex___ 17:04 hi there
anybody alive?
taxilian 17:04 nope
we're all dead
alex___ 17:04 :(
glad dead people still have irc :P
taxilian 17:04 undead seems to be in vogue these days, though, so you may be okay
alex___ 17:04 hehe
I will be dead in a day too if I won't kill the bug in my plugin :(
taxilian 17:04 hehe. whats going on?
alex___ 17:04 I've read everything regarding debugging under MacOS etc
tried everytihing, all browsers
can't get any of them work under debugger (XCode)
very frustrating
taxilian 17:04 what version of xcode?
alex___ 17:04 did you try to debug Chromium and Firefox lately?
Firefox crashes
in javascript
taxilian 17:04 4.2? 4.3?
I have done some debugging in chrome recently; firefox is pretty easy usually as long as you turn off ipc mode and disable the crash reporter
logging can also be very helpful
alex___ 17:04 what's latest xcode? 4.3?
can't even tell, it's hung trying to load Chromium project :)
taxilian 17:04 4.3
and it seems to have upped the ante on making things painful
alex___ 17:04 this is it
I've also tried Chromium and Chrome Canary
taxilian 17:04 I actually use 3.x when I work on plugins usually
you can actually install them simultaneously; it's just a bit tricky
alex___ 17:04 it just hangs trying to load extension when I start it with --plugin-startup-dialog
and no dialog
taxilian 17:04 yes, that's expected on mac
alex___ 17:04 really?
taxilian 17:04 check the console to get the pid
alex___ 17:04 no pid there
taxilian 17:04 then once you attach the debugger it should let you continue
in the system console?
alex___ 17:04 oh that console
taxilian 17:04 yeah, that noe
alex___ 17:04 damn, did not know that
taxilian 17:04 it should be on the debugging plugins page; if it isn't please feel free to add it
alex___ 17:04 I will
thanks for the help
I'll try to run it, as soon as I figure out how to cancel project loading in xcode
everything is so buggy...
taxilian 17:04 I'm headed home from work now; I'll probably be online a bit later
xcode just doesn't handle large projects well anymore
xcode 3 does it much better
good luck, and perhaps talk to you more later