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

IRC Nick Time (GMT-7) Message
rashmi 03:08 i have a question
FireBreathBot 03:08 rashmi: 29 Jul 19:06Z <taxilian> tell rashmi you can't pass an actual array of strings back, but you can make a FB::VariantList list; (which is a vector), call list.push_back("some string") a bunch of times, and then return list
rashmi 03:08 i have a function void OnFrameData(long dLength, char * fdata);
and its implementation in d main cpp file as
void npkPointAPI::OnFrameData(long dLength, char * fdata) { fire_FrameData(dLength,fdata); }
where fire_FrameData is an event which is declared as FB_JSAPI_EVENT(FrameData,2,(long,char *));
when i compile the code
it gives me error like 'error C2665: 'FB::variant_detail::conversion::convert_variant' : none of the 5 overloads could convert all the argument types e:\firebreath-1.5.2\firebreath-1.5.2\src\scriptingcore\variant.h'
hw do i handle this
?
why is the type casting failing?
does firebreath not support char * ?
?
rashmi 03:08 ?
hw do i type cast in this case?
dougma 04:08 char* is useless
make a std::string out od it
*of
rashmi 05:08 ok
thanks
suji123 06:08 hi. i m new to xcode and firebreath. i m trying to create a plugin for audio that uses external static libraries. But it produces link error. I have added the libraries in the mac folder and also set path at projectDef.cmake. But still get link errors. Please help me.
someone-noone 06:08 you should add libraries into target_link_libraries in projectDef.cmake
you shouldn't put them into Mac folder
suji123: and also you should run ./prepmac.sh each time you made changes in projectDef.cmake
suji123 06:08 i have added those in target_link_libraries. since i put those in mac folder i set the path to it. also done ./prepmac.sh
i can show what i wrote
set (LIBRARY_PATH ${FireBreath_SOURCE_DIR}/projects/TecAudio/mac) target_link_libraries(${PLUGIN_NAME} debug "${LIBRARY_PATH}/libspeex.a") target_link_libraries(${PLUGIN_NAME} optimized "${LIBRARY_PATH}/libspeex.a") set (LIBRARY_PATH ${FireBreath_SOURCE_DIR}/projects/TecAudio/mac) target_link_libraries(${PLUGIN_NAME} debug "${LIBRARY_PATH}/lib_speex.a") target_link_libraries(${PLUGIN_NAME} optimized "${LIBRARY_PATH}/lib_speex
someone-noone 06:08 pb your projectDef.cmake
put it on pastebin
it's unreadable :)
suji123 06:08 ok
http://pastebin.com/9DBSEiBU
someone-noone 06:08 not sure, that you may use target_link_library more than once per file
also which link error are you receiving?
suji123 06:08 methods in the static libs used
for example it says "AudioUnitReset", referenced from StopStream in libportaudio.a(pa_mac_core.o)
also it links correctly 2 libs. Only problem with libportaudio.a
someone-noone 06:08 then problem is there
suji123 06:08 is there any restrictions regarding the number of libraries that can be linked?
someone-noone 06:08 no restrictions at all
suji123 06:08 :(
someone-noone 06:08 also, are your libraries are universal binaries ?
are you receiving this error for both architectures?
suji123 06:08 the only difference between the libs is 2 for x86_64
someone-noone 06:08 lib_speex.a ?
suji123 06:08 the 1 which have problem for :Architectures in the fat file: libportaudio.a are: i386 ppc x86_64 ppc64
someone-noone 06:08 that is goo
good
suji123 06:08 lib_speex and libspeex fine. both are x86_64
someone-noone 06:08 but should be x86_64\i386
but you don't receive this error now. But will, when you fix current error
suji123 07:08 oh
so should i build those libs too for i386 also?
someone-noone 07:08 and your current... try to provide full path instead of using variables ${}
yes, and after then make with lipo universal binary
then your plugins will be also universal
suji123 07:08 ok
someone-noone 07:08 i also often receive same problem as you
in most cases there is some magic with path
or clean and build helps
or rm -rf ./build & prepmac.sh
suji123 07:08 thanks a lot for the response. let me go with this.
hope that helps :)
someone-noone 07:08 good luck ;)
suji123 07:08 thnks :)
taxilian 09:08 someone-noone: there are no restrictions on how many times you can call target_link_libraries
taxilian 11:08 anyone tried the 1.6 RC yet? anyone have any issues?
kylehuff 11:08 I have, no issues that I've found - but my plugin is pretty simple, so it's not a great test.
taxilian 11:08 well, I think it's a pretty good release; probably our most stable RC ever
so I'm not really expecting any issues
dodo 11:08 on the deployment page for Mac is says: "Provide a signed java applet for download" - where can i get more info on this?
taxilian 11:08 but would like to hear that more people are using it
dodo: I have no idea
java websites?
we don't currently have an example
dodo 11:08 so use dmg?
taxilian 11:08 use whatever you can figure out how to do that seems the cleanest to you
one of the projects I'm using has an applescript installer which works really well
they've given me permission to integrate it with FireBreath but I haven't had time
dodo 11:08 can you send it?
taxilian 11:08 I can't right now
sorry
it will take some work to clean it up
dodo 11:08 any ideas on how to install on Linux? on the website it just says copy the .so file. anything more on how to do this?
taxilian 11:08 you could try an rpm
or a .deb
linux install is hard
because you have to support all the different distros
the reason that FireBreath doesn't take an official stance on doing that is because I don't feel that I know enough about it to do so
dodo 11:08 i understand.
thanks
taxilian 11:08 good luck
feel free to contribute back better docs when you figure things out to help the next person =]
kylehuff 11:08 he is just being polite by saying "feel free" - what he really means is "feel strongly encouraged/compelled to contribute to the wiki"
taxilian 11:08 it's so nice to have an experienced interpreter around :-P
kylehuff 11:08 lol
dodo 11:08 lol
what about upgrade to plugin. if i use the Wix MSI how do i let users know that plugin needs updating?
taxilian 11:08 the most common solution is to use javascript
detect what version is installed and know what the latest available is
dodo 11:08 any examples to hand?
taxilian 11:08 !findfile fbinstaller.js
.. weird
he's not answering me
!findfile fb_isntaller.js
!findfile fb_installer.js
FireBreathBot 11:08 Found 1 matching file(s) in the master branch. First 1 are:
Installer/js/fb_installer.js http://goo.gl/3Cmr4
taxilian 11:08 there we go
dodo 11:08 thanks! - any documentation on what this file does?
taxilian 11:08 nope
but feel free to add some ;-)
dodo 11:08 lol
dodo 12:08 from the fb_installer.js i see "// look for the version at the end of the filename, before dl" do i need to name my plugin with the version?
someone-noone 12:08 hello
can anyone test BasicMediaPlayer plugin on mac with ICA? My CA is not working when i create one more instance of plugin (ie open another tab with plugin)
taxilian 13:08 on Chrome? FF4? Which browsers?
and what OS?
wait, strike the last question
=]
someone-noone 13:08 mac os, ff4, safari, chrome :)
taxilian 13:08 Safaro is not ICA
someone-noone 13:08 then forget it
i just using CA, but tried ICA with the same effect
try to open two tabs with BasicMediaPlayer on ff4
and tell me if ICA model on first loaded will still rotate
if it possible plz
taxilian 13:08 not sure on basicmediaplayer, but I have used a CA/ICA plugin that definitely worked in multiple tabs
I can't try it right now
someone-noone 13:08 there was static drawing or dynamic
?
taxilian 13:08 dynamic
video
someone-noone 13:08 hm... that is good news...
then if you will have some time in future. Can you make a test?
taxilian 13:08 eventually, but likely not today
someone-noone 13:08 like you want
taxilian 14:08 more like what I have time for :-/
Sajty 14:08 taxilian: Do you have experience with inserting SDL into the webbrowser on OS X?
I remember you said something like that
taxilian 14:08 sure don't
I'm not even sure it's possible
but if it is you'll need to get it to work on a CGContext, most likely, without a NSWindow
Sajty 14:08 I can insert SDL and ogre to an existing openGL context, and they just blindly execute openGL commands.
taxilian 14:08 then you may be able to do it using a NSOpenGLLayer
or whatever it's called
look at the BasicMediaPlayer example; it has example code for doing opengl drawing with CA/ICA
Sajty 14:08 Ogre can be inserted in an NSView* too, and then I think its creating openGL context.
ok I will check it.
taxilian: Do you have some documumentation links to OSX drawing and windowing system for starters?
taxilian 14:08 developer.apple.com
but you don't get an NSView
and you don't get a NSWindow
all you get is a CGContextRef
though there is an example in the codebase of using a NSView and then rendering the bits to a CGContextRef, I'm about 90% sure it won't work wtih opengl
Sajty 15:08 I remember that you said, that on mac I should not use cmake directly. What if I created a project in cmake on linux and moving to mac?
taxilian 15:08 always use the prep scripts
at least until I have time to update it to expect 2.8.5 or later
someone-noone 17:08 i'm not receiving onWindowAttached event in example project...
does anybody know what can it be?
taxilian 17:08 given the information you have provided about your environment, I'm guessing that something isn't firing the event
that's as specific as I can be with the information given, however
someone-noone 17:08 http://pastebin.com/F30ZjwfX
this error i'm receiving in console
ff4, debug mode
taxilian 17:08 os?
someone-noone 17:08 same issue on chrome
mac os
taxilian 17:08 what kind of example project? which example project?
someone-noone 17:08 basicmediaplayer
taxilian 17:08 huh. no idea
someone-noone 17:08 seems i need to reinstall my OS
consturctor is calling, but window attached - no
huh
tired of this :)
offtopic: is it possible to work on xcode 3 at OS X lion?
taxilian 20:08 someone-noone: yes
FireBreathBot 23:08 Commit 9b8c2f8 on firebreath-1.6 by Richard Bateman: "Fixed namespace conflicts in HttpService" http://goo.gl/MgJpQ
Commit 9b8c2f8 on master by Richard Bateman: "Fixed namespace conflicts in HttpService" http://goo.gl/MgJpQ
Commit 3b8df6d on master by Richard Bateman: "Merge branch 'master' of git://github.com/firebreath/FireBre..." http://goo.gl/CLtav
Commit 3b8df6d on firebreath-1.6 by Richard Bateman: "Merge branch 'master' of git://github.com/firebreath/FireBre..." http://goo.gl/CLtav
dougma 23:08 woe...
in ff5 i don't get an AttachedEvent if my plugin is created partly scrolled offscreen
taxilian 23:08 that's not a good sign
what OS?
dougma 23:08 windows
taxilian 23:08 have you hooked up a debugger to see if it's FireBreath or the browser yet?
dougma 23:08 yeah, trying to trace it back
just moaning as i do so. :)
taxilian 23:08 let me know =]
I understand
I'm doing a review of the code size, trying to find out why it is so large and if we can make it smaller
unfortunately the only things taking up a meaningful amount of space are things we kinda need
so far, anyway
going to look into it more in detail
dougma 23:08 how big is fbtestplugin these days?
taxilian 23:08 uncompressed? about 1.5M
dougma 23:08 large. do you think it's boost/template bloat?
taxilian 23:08 https://gist.github.com/1119641
seems to be a large part of it, yes
there are 307 different instances of boost::shared_ptr; that accounts for about 19K of the space
but I don't know how you'd fix that
dougma 23:08 how'd you produce that listing?
taxilian 23:08 similarly std::_Tree::erase is taking up almost 29K, but how do you remove it?
http://aras-p.info/projSizer.html
it's a project Georg found long ago; I just now dug out the link again
dougma 23:08 cool. so that's relminsize?
taxilian 23:08 it only says it supports .pdb files from vs2008; I haven't tried 2010 yet
no, it's relwithdebinfo
dougma 23:08 maybe 2010 does better...
taxilian 23:08 I'm going to create a relminsize with debinfo type soonish because I need it and then analyse that as well
the size is approximately the same in 2010
I don't know how much the .pdb format changed for vs2010
maybe it would be easy to update this to work on 2010 files
dougma 23:08 do we use link time code gen/whole program optimisation stuff?
taxilian 23:08 havne't even looked at the code yet
I don't think we do
that'd be worth playing with
dougma 23:08 might help...
taxilian 23:08 one interesting thing, though; "35.05: [email protected]@@ Document.obj"
that's in the "Data" section
what exactly is that?
dougma 23:08 std::exception maybe has descriptive what() strings?
taxilian 23:08 hmm. perhaps so
makes me wonder if it's possible to reduce some of that
still, most of this doesn't look like it's things we can really get away without
dougma 23:08 yeah
taxilian 23:08 not seeing any one thing that I think could be optimized
AxIdMapInit could be reduced in size, but then we'd lose the default DISPIDs that we need for IE9 events
dougma 23:08 wow, all the data culprits are exceptions!
taxilian 23:08 so if we could figure out what that is maybe some of that "data" is optional
if so that'd cut off 100K right there
wish I knew a way to do this in linux
maybe objdump can
dougma 23:08 oh, maybe related, i tried building with llvm under xcode and it picked up some interesting things
the FB exceptions overriding what() aren't actually because they are of different const-ness
taxilian 23:08 hmm. that shouldn't actually surprise me… I didn't really know what I was doing when I created those :-P
would you mind fixing it and submitting a pull request?
dougma 23:08 yeah, been away for a bit so i'm just getting back to things
will do.
taxilian 23:08 I'm beginning to contemplate a FireBreath 2.x branch where I will be breaking a lot of backwards compatibility
among other things I may make those exceptions all extend runtime_error
dougma 23:08 sounds like the way
never really used fb exceptions in anger
i always hoped/thought that in release-mode many template function instantiations would end up being indentical
like when they're operating on the same size type
could it be that Sizer is counting multiple times?
taxilian 23:08 no; it's analyzing the pdb
dougma 23:08 can different function names in the pdb point to the same place in the object code?
taxilian 23:08 hmm. in fact, the .dll is actually 2.8 MB in RelWithDebInfo mode, according to my system, and this only accounts for about 2MB
interesting
I wonder how much of the rest is things like the manifest, the RGS files, etc
dougma 23:08 our old fully-functional not-using-boost activex-control used to be around 800k
then we added one function from the intel performance library and it exploded
then i gave up caring. :)
taxilian 23:08 lol. well, I don't really care that much; I mean, a skeleton plugin in release mode compresses to about 600K
which to me is plenty
but Facebook is concerned about their plugin which is about a meg
much of which I think is probably openssl and curl
dougma 23:08 yeah, amazing how these things add up.
kalev 23:08 taxilian: on linux you can use 'nm --size-sort' to get a list of symbols sorted by size
taxilian 23:08 kalev: I love the way you just randomly pop in from time to time with solutions to my problems ;-)
kalev 23:08 some other options might also be useful, like -C for demangling the names and --print-size
:-)
dougma 23:08 some sort of fairy god mother