IRC Log Viewer » #firebreath » 2011-11-11

IRC Nick Time (GMT-7) Message
FireBreathBot 01:11 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-145 issue created by halton
FireBreathBot 01:11 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-145 issue updated by halton "This patch will allow to do what said in description.
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-145 issue commented by halton "This patch won't break old building way, this means build with FB code base still working. So far..."
FireBreathBot 02:11 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-145 issue commented by richard "If I understand your patch correctly, this would make it possible for you to build the core libra..."
pico_ 07:11 Is it possible to link and call a DLL that uses multiple threads?
linearray 07:11 hmm
pico_ 07:11 I think that's why my DLL was crashing my plugin yesterday
linearray 07:11 just read your forum post
but I see no apparent reason why it shouldn't be possible
pico_ 07:11 What's odd is that it actually returns the printer status from the DLL, it just crashes whenever the JSAPI method returns
I'm going to try some more testing and see what I can figure out
emicastro 08:11 I'm traying to test my plugin through the javascript.... and I got this message error TypeError: Cannot call method 'test' of null
pico_ 09:11 Ok, I've totally nailed the root of the issue, I created a method in my DLL that returned a string and it failed, I'm using std::string in both the DLL an the plugin, but when I try to return or assign a string returned from the DLL I get the crash
however returning an int will work fine
linearray 09:11 hmm
still doesn't make much sense :)
pico_ 09:11 I agree
I'm going to make a brand new DLL and a brand new FB Project and see if this still happens, if so I'll submit a bug report
linearray 09:11 to whom? :)
pico_ 09:11 Using the report issues link? Do you suppose?
If I can still replicate it I would think it's a FB issue?
linearray 09:11 go ahead
if you can replicate it, please also share the code
you are using the latest firebreath version, right?
Alyoshak 09:11 Morning.
linearray 09:11 and just checking: you are returning a std::string, not a std::string&, or a std::string* or anything else?
because frankly I find such a grave bug in FB rather unlikely and find it far more likely that your code tries to access an object that doesn't exist anymore
Alyoshak 09:11 I'm experiencing exceedingly slow builds when I build my plugin target. I know there's a lot of code in the entire project, but if I simply add a local variable (say, an int) and then use Cmd-B it takes a little over two minutes to build. I'm not very experienced with Xcode or I'd start messing with the project settings. Any remedy for this come to mind?
linearray 09:11 which xcode version?
Alyoshak 09:11 Actually, you guys recommend *not* jacking with the project settings methinks. I'm using the latest version.
Using 4.2, build 4C199.
linearray 09:11 hm, takes 9 seconds for me
Alyoshak 09:11 Wow. Ok, excellent. Good to know something's wrong on my end. I feared this was the norm.
linearray 09:11 can't really tell you how to make it faster :)
pico_ 09:11 @linearray I pulled FB from git a few days ago and I am just returning std:string, I agree that it is likely something in my code, but if it still exists in a simple fresh build then there is potential for some bug
linearray 09:11 indeed
Alyoshak 09:11 Ok. Well, figured since the xcodeproject was generated there might be some well-known fix, or at least things to try.
It zooms along pretty fast until it hits the plugin target, then it decides to take a siesta for a while. Gets stuck on "Compiling 2 of 2 source files ..." but eventually gets done and finishes up.
Thanks.
linearray 09:11 hmm
are you always building everything?
not that it should make a difference, but I just build my plugin target
Alyoshak 09:11 Just trying to build the plugin target. All I have to do is select the plugin target (puts a checkmark by it) and then build, right? I mean, it's simple as that ain't it?
linearray 09:11 in the toolbar there are plugin targets and architectures
no checkboxes, that's target membership
-plugin
getting confused here ;)
Alyoshak 09:11 Yeah, exactly. No, no checkboxes but when selecting your target it puts a checkmark by it and the architecture as well.
linearray 09:11 ah yes!
right.
ok, then everything's fine
Alyoshak 09:11 Cool. Well, it's clear that there's no obvious, common problem for your users or you would've said so by now. I'll keep experimenting. Thx.
taxilian 11:11 gppd ,prmomg
linearray 11:11 gwkki
taxilian 11:11 lol. must have had my fingers on the wrong keys
linearray 11:11 giq sew tiy?
taxilian 11:11 good morning, I meant =]
pico_ 11:11 After pulling a whole new FB from git, and building a simple DLL from scratch I still have the plugin crash when returning a string from a DLL, Am I doing something incorrectly?: http://forum.firebreath.org/topic/168/?page=1#post-636
emicastro 11:11 some link with a example of using AsyncGET ?
linearray 11:11 yes
you return a std::string in the API
oh wait
the first I'd try is to not name a property and a method the same
call the method something else
emicastro 11:11 I don't understand the callback parameter :S I want to do a GET from my plugin...
pico_ 11:11 Which method? In the JSAPI or in the DLL?
linearray 11:11 in the JSAPI
registerMethod("testString"
pico_ 11:11 Oh I see, I'll fix that! though I had a completely different name in the old plugin I was working with
linearray 11:11 yeah it's a shot in the blue
emicastro 11:11 linearray: I want to do a GET request from my plugin. Do I have to use some of the Sync or Async GET or POST method to do that?
linearray 11:11 emicastro: there is a (brief) example in FBTestPlugin
taxilian 11:11 pico_: try creating a new std::string from the .c_str() of the one from the DLL; remember that something allocated by your DLL must not be deallocated by firebreath
because of how c++ memory management works
emicastro: you can do the request using BrowserStreams; you can use AsyncGet if you want, but it's up to you how you do it
AsyncGet is just a simple example of how to use browserstreams that meats most common usecases
linearray 11:11 hm, shouldn't the std::string be appropriately copied?
taxilian 11:11 hard to say; if you return that string itself it may try to reuse the memory. I'm not certain how strings manage memory. I do know that it's dangerous to pass C++ objects like that across the boundary
that's the only reason I can think of that it might crash, however; the memory is being freed from the wrong place
this is definitely not a firebreath bug; it's something related to the DLL and the way you're getting data from it
pico_ 11:11 thanks taxilian, that makes sense, I'll look into how I should use strings from DLLs
emicastro 12:11 in the FBTestPlugin there are a getURL method... this method recive a url and a callback... this callback what kind of thing could be?
taxilian 12:11 a javascript function, in that case
JSObjectPtr has to be a javascript object
linearray 12:11 !findfile SimpleStreamsHelper.h
!findfile SimpleStreamHelper.h
FireBreathBot 12:11 Found 1 matching file(s) in the master branch. First 1 are:
src/PluginCore/SimpleStreamHelper.h http://goo.gl/tEjUs
linearray 12:11 look at the typedefs at the top to see what a HttpCallback is
emicastro 12:11 ok, I wish to know right this! :D
thanks!
linearray 12:11 dlls seem to be witchcraft
pico_: http://bytes.com/topic/c/answers/459890-passing-objects-through-dll-boundary
pico_ 12:11 I know, I haven't found a single solution I like yet
I found this: http://stackoverflow.com/questions/4446620/returning-strings-from-dll-functions there was a comment that advised against using output parameters by reference but I don't think I really have any other options
I think I can use char* too, but haven't looked at it yet
VJ 12:11 What is CMake Error: Could not create named generator Visual Studio 10 error ?
During building FB examples?
taxilian 12:11 means that it can't find visual studio 2010
VJ 12:11 ok thanks
kylehuff 13:11 you around taxilian?
taxilian 13:11 yes
kylehuff 13:11 I was going through my TODO list and realized I have yet to file that mozilla bug
I had typed up a quick rough draft as a gist, but I have not visited it since; it probably needs revision, if you are so inclined - https://gist.github.com/db0c603be015753452d3
I had grand plans to accomplish a crap-ton of stuff, but I am quickly running out of time
taxilian 13:11 hehe. I understand. this looks pretty good so far, but it definitely needs a specific example of what you're talking about
this needs to not feel like a hypothetical problem
kylehuff 13:11 okay, I could include my current dilemma in regards to WebPG
taxilian 13:11 yeah
that would be perfect
kylehuff 13:11 I don't have a webpg version for firefox because of this specific problem
linearray 13:11 btw. jira shows some 403 errors in the 'all' view http://jira.firebreath.org/browse/FIREBREATH-144?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs
FireBreathBot 13:11 FIREBREATH-144: Summary: Allow logging with macros without 'src' argument
FIREBREATH-144: Assigned To: amxx
FIREBREATH-144: Priority: Major, Status: Open, http://jira.firebreath.org/browse/FIREBREATH-144
linearray 13:11 and http://code.firebreath.org/ shows some 403 error regarding jira :)
taxilian 13:11 huh. weird
fixed
it was due to the CDN dns changes
just had to override them for the local host for inter-product communication
linearray 13:11 Repository [name hidden] on http://code.firebreath.org/ failed: PERMISSION DENIED
(in jira)
taxilian 13:11 you just have to log in
linearray 13:11 aha!
taxilian 13:11 can't seem to make that work for users who aren't logged in
linearray 13:11 that wasn't it
doesn't really matter... it's not like I need that functionality
taxilian 13:11 that's decided odd, however
taxilian 14:11 so, yesterday CloudFlare.com handled about 1/2 of the requests sent to firebreath.org w/out hitting my servers at all and about 1/3 of the data that needed to be transferred
linearray 14:11 is this good for business?
taxilian 14:11 it's good because it means that it's significantly reducing the load on my servers, so I can probably move to cheaper servers
potentially ones here at home
linearray 14:11 I suppose atlassian software is real heavy on the machine
taxilian 14:11 and despite the fact that confluence refuses to let any of the pages cache, it's still able to cache a fair amount
ridiculously so