IRC Log Viewer » #firebreath » 2011-01-05

IRC Nick Time (GMT-7) Message
wolfmanfx 00:01 morning :) Yesterday i gave it up with IE and have some questions Safari and opera did not find the plugin (after i regged it with regsvr32) do the need a special install? (FF, Chrome and IE are aware that there is an plugin)
Furthermore i am interested in that thing where FF menus are all balck when i render with DX you told me i have to change some settings in DX9 device. I can remember that i had the similar issues 2 years ago when i used gtk+ to render stuff.
wolfmanfx 00:01 I think stuff is not rendering because i am not overriding WM_PAINT here
have to try late at night
*ie stuff
taxilian 01:01 I will be up in abt 8 hrs
No special reg needed
Must have plugin desc or safari no work
RJanicek 06:01 in plugin: throw FB::script_error("specific error message");
in Chrome received as: Error: Error calling method on NPObject.
Any ideas how to get the specific error message in Chrome?
iaincollins 07:01 Hmm don't think that should happen, should show as a JS exception
Do you have try/catch block in the JavaScript calling that method on the plug-in? (appreciate I am assuming you are calling a method on the plug-in from JS)
RJanicek 07:01 I tried with and without a try/catch in the JS it is catching the exception it's just not my specific one with my specific message.
The exception that is caught in JS is : name=Error message=Error calling method on NPObject.
using: firebreath-dev-1.4-nightly-66
iaincollins 07:01 oh, not tried 1.4.x yet
exception handling working in fine in Chrome in 1.3, sounds like a bug there :/ am sure the guys will want to know
RJanicek 07:01 ok, I will test with FBTestPlugin and file a report.
jtojanen 08:01 Taxilian, morning!
To access <object> from within ActiveX; http://pastebin.com/svMKeKAx
But it won't work before you change REGMAP_ENTRY("THREADING", "Single") to Apartment
COM ThreadingModel=Single is a speed killer; everything is marshalled and unmarshalled between MSHTML and the FB plugin.
ActiveX should always be ThreadingModel=Apartment
elthariel 08:01 Happy nu year to all FB guys
taxilian 09:01 and to you as well!
jtojanen: Really? awesome! I will try that
so threading should be Apartment everywhere?
jtojanen 09:01 Threading=Apartment when you have ActiveX, but never Single (threaded)
taxilian 09:01 out of curiosity, why is that? I assumed that single would work since we were marshalling everything for communication with the browser to the main thread ourselves
since we have to do that for NPAPI, it keeps things consistant
jtojanen 09:01 Apartment also uses Windows messaging to serialize calling but it is shared by all COM STA components in this case ActiveX
taxilian 09:01 okay; should I use CComSingleThreadModel or CComMultiThreadModel with CComObjectRootEx?
jtojanen 09:01 Not necessary
taxilian 09:01 AFAIK, I have to pick one or the other… =]
so should I do Single, since it involved fewer locks?
jtojanen 09:01 use CComSingleThreadModel
taxilian 09:01 okay, so I have that correct, then
jtojanen 09:01 MultiThread means atomic increments/decrements
and actual locking
no fake locks as with SingleThread
taxilian 09:01 which in our case isn't a big deal, since everything is happening on the main thread anyway
jtojanen 09:01 true
And you use Windows messaging to post processing
taxilian 09:01 right
so all I need to do is change the registry entry?
jtojanen 09:01 yes for testing
but you need to change FBControl.h also
for permant solution
taxilian 09:01 well, yeah, that's what I meant =]
something that simple it's easier to change it the right way and then reg it again =]
jtojanen 09:01 The code that I posted works in "SetClientSite" and in "Load" methods
taxilian 09:01 right, because it needs the client site set already
this is fantastic!
I've been trying to figure this out for a long time
jtojanen 09:01 Try again with "Single"
taxilian 09:01 I haven't gotten it working yet; I'm still working on adding things in; I'm just excited =]
I should have a working example in a few minutes, though
jtojanen 09:01 GetExtendedControl returns your FBControl
its COM marshalling issue
taxilian 09:01 huh; that's interestin
I wonder if Single vs Multi is also the reason that accessing the DOM hasn't been working in WinXP 64 bit
jtojanen 09:01 Might be but I'm using Windows 7 64 bit without problems
taxilian 09:01 never seen the prob on anything but xp 64
vista and 7 64 work fine
we've just ignored it since almost nobody uses xp 64
and it works!
thank you so much, jtojanen
now I have some experiments to run… =]
jtojanen 09:01 okey
taxilian 09:01 wondering if I can use this instead of Load to get the param values
jtojanen 09:01 no but you can combine these
taxilian 09:01 because then we wouldn't have to know the names ahead of time and it could work the same way that Firefox does
oh?
jtojanen 09:01 IPropertyBag for <param> and IHTMLObject for attributes
taxilian 09:01 can I not use the DOM to enumerate attributes?
jtojanen 09:01 might work haven't tested
taxilian 09:01 enumerate params, I mean
yeah, that's what I want to try
it would be really nice to not have to define which params you support
in firefox it just gives us an array of all of them
so people keep getting confused why their params are accessible on firefox and not on IE… because they didn't put them in the list of params to look for
and AFAIK (maybe you know different?) you can't enumerate items in a propertybag, only request them by name
jtojanen 09:01 * look that problem *
taxilian 09:01 hmm. having changed to Apartment, I now get a _com_error at memory location … when I call Invoke on an IDispatch object...
hmm. SophosBHO.dll is all over the stack trace, which doesn't have any of my symbols visible
weird
… and it's not the main thread. does Apartment make it run the ActiveX control from another thread?
jtojanen 09:01 To load <params> without knowing their names use IPropertyBag2 which from IPropertyBag using QueryInterface
taxilian 09:01 lol. seriously? all this time? I never even thought to look for that...
I'm glad you came along :-P
jtojanen 09:01 ActiveX control depends on browser, are you using IE8?
taxilian 09:01 yes
jtojanen 09:01 SophosBHO is browser helper object; why it's calling you?
taxilian 09:01 that's what I can't figure out… that's the stack trace, but it doesn't show me in it
maybe VS was just being weird
jtojanen 09:01 Could it be trying to block object creation?
or to filter if its safe?
taxilian 09:01 let me try this again and get a fresh trace
this is just… weird
huh; when I did continue everything recovered fine
maybe my exception breakpoints are just weird
jtojanen 09:01 Catching exception that you are not suppose to catch :)
taxilian 09:01 huh
yeah, it was set to break on all C++ exceptions… no idea why
must have had VS die on me weird last time I used that so it didn't save it when I turned it off
VS settings are sometimes a bit unreliable as to what gets saved and what doesn't
jtojanen 09:01 I think you see this because now you are living in the same apartment with UI
taxilian 09:01 false alarm =]
now I just need to implement all these wonderful things you've taught me =]
or rather the features that they allow
this is awesome… we'll not only be able to get reference to our DOM element on all browsers but also won't have to specify the params we want to support
jtojanen 10:01 that is true
taxilian 10:01 Can you tell I'm excited about this? =] I get excited about strange things sometimes, I guess :-P it just makes me happy any time I can remove "one more thing" about FireBreath that isn't quite optimial
jtojanen 10:01 I will now go home but I have another fix regarding UAC and ActiveX registration; later
taxilian 10:01 okay; I look forward to it
thanks
taxilian 10:01 I'm deciding that there is no such thing as a change that doesn't lead to finding things that need minor refactoring...
nirvdrum 12:01 That is not your decision to make!
taxilian 12:01 lol
wolfmanfx 12:01 i switched to dev branch
now ff crashes (which it did not before)
taxilian 13:01 what is the crash?
wolfmanfx 13:01 mom i posting it to nopaste.info
http://nopaste.info/fa736d8110.html
it renders the stuff
and then it crashes
taxilian 13:01 gee, this is useful...
hmm
wolfmanfx 13:01 i assume not at all :)
taxilian 13:01 you assume correctly =]
I don't know what would cause something like this; I guess you could load the mozilla symbols to get more useful info
but I dont' know if it would help or not
which thread is that?
wolfmanfx 13:01 wait i am starting it again but in the meantime i have to say that rendering in a timer suxs
great in safari the complete browser is not useable
so mention you did also some 3d stuff
did you use a thread?
taxilian 13:01 well, I didn't actually do 3d stuff, but I used d3d. yes, I used a thread
wolfmanfx 13:01 have some sort of an example lying around? i do not know what i have to take care of
taxilian 13:01 I don't, I'm afraid; mainly, though, you have to do all your dx stuff in the same thread
so if you initiialize the dx context on a given thread, do all drawing on that thread as well
wolfmanfx 13:01 thats clear but are any problems when i draw from different thread to hwnd?
taxilian 13:01 no
you can even draw from a different process to the hwnd
wolfmanfx 13:01 i think i have to try never did it :)
taxilian 13:01 actually some game devs do it that way, to reduce the amount of weirdness coming from living in another process; they spawn another process and hand off the hwnd
wolfmanfx 13:01 so it crash in the main thread
mm
that sounds good
does it also work on the mac
taxilian 13:01 not certain, TBH
I'm not real fantastic at mac gui stuff
wolfmanfx 13:01 the funny thing is that it only crash in ff
chrome is really useable
and ie8 shows now a label where rendering should be
with the text ATL 10.00
since i switched to the new firebreath
before it showed nothing
taxilian 13:01 hmm; that seems a little weird; let me poke around a bit
wolfmanfx 13:01 it would be nice if any of the gamedevs could give a helping hand with the process spawing task
are the around in irc
taxilian 13:01 trying to remember who here does game stuff; neilg_, was that you?
not sure if anyone here has done it that way, I've just seen it done that way
neilg_ 13:01 Guilty!
wolfmanfx 13:01 hi neilg_
can you give me some tips
how you do things with firebreath
neilg_ 13:01 I haven't even started using FireBreath on the mac yet, I admit that the way NPAPI is implemented on the mac seems bizarre - specifically only rendering when you get the paint events
wolfmanfx 13:01 atm i am on windows :)
taxilian 13:01 that's standard windowless rendering behavior
neilg_ 13:01 Oh, from my quick read I thought you were on the mac. I apologise!
wolfmanfx 13:01 atm i am trying to get the rendering stable and responsive
neilg_ 13:01 So the way we do things is to cast the PluginWindow to a PluginWindowWin and from that we get the window handle (HWND). Using that along with knowing the height and width of the window we then render using either OpenGL or D3D
wolfmanfx 13:01 but in safari the complete browser get locked up (but it renders)
neilg_ 13:01 That's a very high-level description of what we do
I haven't tried it in Safari but that sounds strange given Chrome definitely works for us (and also uses Webkit)
taxilian 13:01 are you doing your rendering on the main thread w/ timers or a secondary thread?
wolfmanfx 13:01 yeah rendering works here but i render in a timer
and my question what do you use for your main loop
taxilian 13:01 I meant that question for neilg_ =]
neilg_ 13:01 Well, that's somewhat complicated because the FireBreath plugin loads another DLL which in turn loads another DLL that has the main loop inside of it. But basically we don't use timers at all
We have a secondary thread to process the game logic and rendering
wolfmanfx 13:01 ok so you are fine a second thread
and do not spawn a new process
neilg_ 13:01 Right, though I'd imagine spawning a new process would work in a very similar way given window handles are system-wide
I'm not sure what timers you're using but we're not using any at all
taxilian 13:01 he's using a timer for his render loop
wolfmanfx 13:01 i am using a windows timer
taxilian 13:01 to tell it to draw
wolfmanfx 13:01 where i run one iteration of the main loop
but this suxs
taxilian 13:01 yeah, that's probably more intensive than you want to do on the main thread
so I'd at the least move it to another thread
wolfmanfx 13:01 you injected me now the process idea
:D
i have to try
taxilian 13:01 hehe. okay; good luck =]
wolfmanfx 13:01 btw do you know anything about ie9 thing?
taxilian 13:01 feel free to contribute back some sort of example
not a lot, no
wolfmanfx 13:01 k not so urgent
yeah when something works
i will give it back
neilg_ 13:01 Sorry for disappearing, I was helping solve a Qt issue :)
I think launching another process is 100% the way to go anyway. It makes a lot of sense to me (plus it makes the risk of crashing the browser process much lower)
wolfmanfx 14:01 so i tried the thread thing now (before the process thing)
it solves the ff crash
and do menus are not black anymore with dx
renderer
also all issuse with safari gone away
i am happy :)
taxilian 14:01 hehe. good =]
wolfmanfx 14:01 and ie8 also working juhuu
but opera does not the plugin at all
is there a way to check if opera detected the plugin at all
neilg_ 14:01 Cool, glad to hear it!
taxilian 14:01 opera has always been an enigma to me
so I don't know
neilg_ 14:01 Well, apart from Opera... ;) I can't remember whether the about:plugins URL works or not
wolfmanfx 14:01 :)
yep that works
my plugins is not listed
so i know why it is not working :D
sabotaged|wk 14:01 anyone tried using boost filesystem3 with firebreath?
taxilian 14:01 no; it should be possible, if I remember, but you have to set a cmake option
or use system boost
looks like set(BOOST_FILESYSTEM_V3 On) is what should do it
before you add_boost_library(filesystem)
but I haven't actually tried it
sabotaged|wk 14:01 was that added recently? i guess i need to use a newer version of firebreath
taxilian 14:01 1.3, I think
what version are you using?
sabotaged|wk 14:01 i forget
1.3.1 i think
taxilian 14:01 should be there, then
sabotaged|wk 14:01 ah yes there it goes
sweet!
taxilian 14:01 you should still totally upgrade to 1.4, though
and tell me if anything breaks :-P
sabotaged|wk 14:01 yeah i will soon
taxilian 14:01 awesome. there are some really neat improvements to JSAPI and FB::variant in 1.4
I'm excited about them
sabotaged|wk 14:01 i'll have to check the changelog
taxilian 14:01 I'll have to write it… :-/
that I'm not excited about :-P
it's very long
sabotaged|wk 14:01 oh
ill upgrade anyways, whatever
taxilian 14:01 I think that's my least favorite part of doing a release
I hate writing the changelog
one new features today that I'm about to commit: we no longer have to specify which param tags we can use
it will just load whatever is there
jshanab_wcw2 15:01 taxilian, I was wondering if you could answer a question about plugins on IE, the activeX and cab file side of things.
taxilian 15:01 *disclaimer*: I hate cab files. I don't use them, nor know much about how to use them
sure, I'd love to answer any questions you have
(note there was no guarantee of accuracy in that statement)
jshanab_wcw2 15:01 I have a working plugin that we can't yet rebuild, provided to us by a previous developer. it works when run from our domain. When I copy the cab file to an internal server, ie goes nuts and trys to download it again, but even if it did, it will not work.
Hate for cab files is a looong line here.
That is why I am writing the replacement, but I need to get a box out TODAY for the interim.
taxilian 15:01 hmm. I don't know what would cause that; do you have to install it with a CAB file/
?
jshanab_wcw2 15:01 Is ter a way around it?
taxilian 15:01 yeah, install it with something else
an MSI for example
or write another installer for it
jshanab_wcw2 15:01 We are trying that, but if you had to use the existing cab because it is the only item that works?
taxilian 15:01 what do you mean by "it is the only item that works"? The cab most likely just calls DllRegisterServer on the DLL
so replacing that shouldn't be hard
jshanab_wcw2 15:01 It seems , and I am out of my element here, that windows and ie use the domain name and CLSID to determine if the cab file is installed and then point to the installed directory. So when people connect to our site the first time they get the cab and it installs and everything works. When i move that cab file to another server, in this case a local machine, the registry check fails and it trys to download. Manytimes this is an infinite loop creati
ng CONFLICT folders, but never does the plugin work
Maybe there is something special about a plugin to allow it to work from multiple sites
taxilian 15:01 yeah, I can see that; however, that still doesn't address the option of just using another installer. Is there a reason you can't just do that?
the CAB file may enable it for a specific domain
do you have the .inf file from the CAB?
and/or the selfreg code for the dll?
jshanab_wcw2 15:01 yes we do
taxilian 15:01 if you want to pastebin me the relevant snippets I can look at it
so are you just not willing to consider an alternative to a CAB file, then?
I need to head to class now; jshanab_wcw2: I'll probably be online during class, but of limited use. I'll be back online this evening
jshanab_wcw2 15:01 I just have a cab file with compiled code. What we compile just won't install. We have an email in to the guy who wrote it, and he is on his second week tryiny to reproduce it!
ok, thanks
taxilian 15:01 I'd have to look at it :-/ I have no idea from what you've said. there are domain-specific registry entries that may be getting added, but without trying it I couldn't say
I would really recommend ditching the cab file for an .exe or .msi, but that's me
bbl
FB_GitHubBot 15:01 FireBreath: master Richard Bateman * af12d3d (24 files in 6 dirs): Removed the reliance on user-supplied param names, ... - http://bit.ly/dZDNxy
jtojanen 15:01 Taxilian, the other problem that I had is with http://support.microsoft.com/kb/935200
I already wrote a patch to it http://pastebin.com/EDY3rXxq
Note that there is toggle switch for "OaEnablePerUserTLibRegistration" to disable it like there is for :RegOverridePredefKey
But as FbPerUserRegistration is used (or not) inside regsvr32 or someother installer, it does not cause any bad side effects
I meant that "there is no toggle switch" :)
Taxilian, I will get some sleep; I will check logs for your comments
VictorAbrash 17:01 I've compiled the example plugin that comes with Firebreath (on Windows), registered it with regsvr32, and it works with Firefox, Chrome, and Safari. In IE8, scripting works but I don't receive events back from the plugin. Does the default FBControl.htm work with IE? I'm using the dev branch.
Guest246 18:01 Hello guys
I have a question on installing firebreath on windows
nirvdrum 18:01 Guest246: What's the question.
Guest88591 19:01 got disconnecte earlier. I have question on windows
i am installing firebreath on windows. i have visual srtdio2010 and I get an error when i issue firebreath\prep2010.cmd projects build
an error windows pops up saying MSBuild.exe has stopped working
console logs says that C compiler for Visual studio 10 - broken
i have build other projects with this VS on my PC earlier without any problems. I am not sure what the problem could be
could anyone help or give pointers as in what could be the issue? nirvdrum?
nirvdrum 19:01 Not sure. I use VS 2010, but haven't had that problem.
You have cmake installed?
Guest88591 19:01 yes
i have that installed
is ur pc 32bit or 64bit. would that matter?
jshanab_ 19:01 I am using VS2010 on Win7 64 but building 32bit. I haven't had that particular problem, but 2010 has a lot of bugs. It has a new database system and it gets confused. I have had to delete teh build directory and make sure it is completely stopped and the restart it more than once. I do run it as administrator, it was the only way to let it do some copying in preperation for packaging.
Guest88591 19:01 let me run as admin and see if that helps.
taxilian 20:01 brb
and I'm back, but everyone with questions seems to have left...
jtojanen: your fix looks good to me, I will apply it