These are chat archives for highfidelity/hifi

6th
Aug 2014
Thickbrick Sleaford
@thickbrick
Aug 06 2014 14:35
Hi. So I built interface on linux. Now I'm getting a segfault on startup in libqxmpp. Anybody got any hints about required versions, etc?
Thijs Wenker
@thoys
Aug 06 2014 14:37
@thickbrick did you link qxmpp staticly or dynamicly?
Thickbrick Sleaford
@thickbrick
Aug 06 2014 14:39
Dynamically, I assume. Just using the system's version.
Thijs Wenker
@thoys
Aug 06 2014 14:39
Ah, in the latest version I had problems with dynamic linking, static was no problem
Thickbrick Sleaford
@thickbrick
Aug 06 2014 14:40
cmake files scare me... Any hints on how to make it link staticly?
Thijs Wenker
@thoys
Aug 06 2014 14:41
Well its the same, but you have to build qxmpp different, using qmake
let me check which flag you need, holdon
Thickbrick Sleaford
@thickbrick
Aug 06 2014 14:41
Ah. Thanks!
Thijs Wenker
@thoys
Aug 06 2014 14:43
"CONFIG+=staticlib"
this is what i use in windows: qmake.exe D:\LIBS\HIFI_LIBS\qxmpp\qxmpp.pro -r -spec win32-msvc2010 "CONFIG+=staticlib"
so in linux I would assume its something like:
qmake qxmpp.pro "CONFIG+=staticlib"
Thickbrick Sleaford
@thickbrick
Aug 06 2014 14:44
Thanks, I'll try that.
Thijs Wenker
@thoys
Aug 06 2014 15:38
@thickbrick any luck?
Thickbrick Sleaford
@thickbrick
Aug 06 2014 15:42
No luck yet @thoys. I'm fighting with multiple versions of Qt. I guess my system's qxmpp was built against Qt4 which is what was causing the segfault. But I'm not having luck rebuilding it with Qt5.
Thijs Wenker
@thoys
Aug 06 2014 15:43
what is your qmake --version ?
Thickbrick Sleaford
@thickbrick
Aug 06 2014 15:45
I'm on debian, so there's an alternatives system. The current default it from Qt3. But I was running qmake-qt4 and that didn't help. It was trying to inlude files from Qt3.
Thijs Wenker
@thoys
Aug 06 2014 15:46
But you need Qt5, if your package doesnt install that you could build it from source.
David Rowe
@ctrlaltdavid
Aug 06 2014 19:47
@ZappoMan For job 19840 (uploading local model file) would you prefer I implement a progress bar:
a) Wholly in JavaScript using Overlay2D from toolBar.js, or
b) As a new Window.progress() method that uses QProgressDialog?
David Rowe
@ctrlaltdavid
Aug 06 2014 20:15
@murillodigital Hi, what's the prognosis on adding a "content" category?
Leonardo Murillo
@murillodigital
Aug 06 2014 20:15
@Atlante45 around?
@ctrlaltdavid I’ve been occupied with other things but let me see if @Atlante45 can add the category real quick
otherwise I’ll have it ready 2morrow morning the latest
David Rowe
@ctrlaltdavid
Aug 06 2014 20:17
Ok, no problem ... I've got plenty to do : )
Clément Brisset
@Atlante45
Aug 06 2014 20:22
@murillodigital @ctrlaltdavid I’m here
What is this content category exactly?
Leonardo Murillo
@murillodigital
Aug 06 2014 20:27
@Atlante45 so @ctrlaltdavid will be posting to the models api and uploading a new type of content
same as we have skeletons and heads now
he’ll be uploading a new category, “content"
it should be just a matter of adding that category to the allowed list in data-web’s settings
can you take care of that, its likely a one line change
Clément Brisset
@Atlante45
Aug 06 2014 20:34
Yep, no pb
David Rowe
@ctrlaltdavid
Aug 06 2014 20:34
Thanks!
Leonardo Murillo
@murillodigital
Aug 06 2014 20:34
thanks!
David Rowe
@ctrlaltdavid
Aug 06 2014 20:35
@murillodigital When the user selects an FBX file to upload does a dummy FST need to be created on the fly for content models like it is for avatar models? (And ditto for SVO files?)
Leonardo Murillo
@murillodigital
Aug 06 2014 20:36
of the top off my head, likely so
of the top off my head == from what I can remember of the receiving side code
@Atlante45 while u’re in that code, see if you can find support for my theory and let @ctrlaltdavid know
Clément Brisset
@Atlante45
Aug 06 2014 20:40
Will do
Wait, yeah that’s what I though, there is no category on the data-web side. It just takes the name of the directory.
I just need to create it on S#
S3
Leonardo Murillo
@murillodigital
Aug 06 2014 20:42
nope
one sec
Clément Brisset
@Atlante45
Aug 06 2014 20:43
models_controller.rb:31
Leonardo Murillo
@murillodigital
Aug 06 2014 20:43
models_controller
104:
model_category = params[:model_category]
model_category.downcase! if model_category
  unless Settings.models.allowed_categories.include? model_category
probably just need to add to that allowed_categories array
see what I mean?
Clément Brisset
@Atlante45
Aug 06 2014 20:45
Oh ok
Leonardo Murillo
@murillodigital
Aug 06 2014 20:45
thanks!
Clément Brisset
@Atlante45
Aug 06 2014 20:52
@ctrlaltdavid that’s for uploading models right?
cause there is already a directory for that called entities (reference to code coming up)
David Rowe
@ctrlaltdavid
Aug 06 2014 20:54
@Atlante45 Yes, it's for uploading "content" models for inclusion in-world (i.e., not avatar model files)
Clément Brisset
@Atlante45
Aug 06 2014 20:54
Would that be hard to change your “content” category to "entities"?
Oh, I guess yours fit better, I
think I’ll rename the directory ^^
David Rowe
@ctrlaltdavid
Aug 06 2014 20:55
Not hard at all, but I think @murillodigital wanted to use "content" for the uploading process even if it ends up in entities directory
Leonardo Murillo
@murillodigital
Aug 06 2014 20:55
actually I’d like it to match
@cozza13 and I talked about what term was most appropriate
and content seemed to be the most reasonable one
Clément Brisset
@Atlante45
Aug 06 2014 20:55
Yeah same, I didn’t know how to name it and went for entities but content sounds better.
agreed gonna change it.
David Rowe
@ctrlaltdavid
Aug 06 2014 20:55
Sounds good to me
Interface's model browser will need to be updated?
Clément Brisset
@Atlante45
Aug 06 2014 20:57
Yeah, actually I’ll leave it that way so you can make as many tests as you want.
When your work is merged I
‘ll wipe the directory and switch everything to content.
David Rowe
@ctrlaltdavid
Aug 06 2014 20:57
Sounds good!
I should still specify "content" when uploading now and it'll end up in entities dir?
Clément Brisset
@Atlante45
Aug 06 2014 20:58
no it’ll end up in the content dir I just created.
David Rowe
@ctrlaltdavid
Aug 06 2014 20:59
Heh ... silly me ... sorry
Clément Brisset
@Atlante45
Aug 06 2014 20:59
So you’ll have it all for yourself =)
David Rowe
@ctrlaltdavid
Aug 06 2014 20:59
Thanks!
David Rowe
@ctrlaltdavid
Aug 06 2014 21:47
@Atlante45 Is the API change allegedly up and running?
Clément Brisset
@Atlante45
Aug 06 2014 21:52
Not yet I think.
@murillodigital can you check and merge highfidelity/data-web#147 ?
@murillodigital thanks
Leonardo Murillo
@murillodigital
Aug 06 2014 21:54
;) deploying
Clément Brisset
@Atlante45
Aug 06 2014 21:54
@ctrlaltdavid It should be up and running soon
Leonardo Murillo
@murillodigital
Aug 06 2014 21:56
deployed
David Rowe
@ctrlaltdavid
Aug 06 2014 22:01
Hmmm ... I'm still getting 502 Bad Gateway errors when try to POST to https://data.highfidelity.io/api/v1/models
I can GET from there OK
But then I could GET from there OK before the change, too
Clément Brisset
@Atlante45
Aug 06 2014 22:10
Looking at the code, don’t see what could go wrong there.
Do you gate any error message?
David Rowe
@ctrlaltdavid
Aug 06 2014 22:11
Just 502 Bad Gateway immediately the header is sent
From server nginx/1.1.9
Clément Brisset
@Atlante45
Aug 06 2014 22:12
using the exact same code, can you post to heads without a 502?
David Rowe
@ctrlaltdavid
Aug 06 2014 22:13
The more 502 Bad Gateway messages for "loading" and "done" XMLHttpRequest states
You mean post a model but with model_category=heads?
Clément Brisset
@Atlante45
Aug 06 2014 22:14
yep
David Rowe
@ctrlaltdavid
Aug 06 2014 22:16
Good thinking ... ah no, I can't
... Maybe the authorization token needs to be included as a form field instead of as a URL parameter?
Clément Brisset
@Atlante45
Aug 06 2014 22:17
good question
Nope, it’s in the url
requestURL.setQuery("access_token=" + _accountInfo.getAccessToken().token);
Leonardo Murillo
@murillodigital
Aug 06 2014 22:21
I think it’s “location” varies
between put and get
err POST and get or whatever
maybe in POST you do need it in the form data
Clément Brisset
@Atlante45
Aug 06 2014 22:22
Not that I can see, AccountManager::invokeRequest() always puts it in the URL no matter the type of request.
Clément Brisset
@Atlante45
Aug 06 2014 22:30
@ctrlaltdavid Took a look at you code but your repo might not be up to date.
Where do you add the token to the request?
David Rowe
@ctrlaltdavid
Aug 06 2014 22:31
Interestingly, PUT gives 411 "Length Required" error ... investingating thise
I add the token in XMLHttpRequestClass.cpp
(Automatically add it there to API requests)
Clément Brisset
@Atlante45
Aug 06 2014 22:38
Looking at XHTMRequestClass, I don’t see any call to AccountManager::authenticatedRequest().
David Rowe
@ctrlaltdavid
Aug 06 2014 22:38
Looks like something to do with content length missing ... am sure it was automatdically set when POSTing to own test server ... Still, it looks promising
Clément Brisset
@Atlante45
Aug 06 2014 22:38
Which is the method in charge of adding the token.
David Rowe
@ctrlaltdavid
Aug 06 2014 22:38
Ahh ... haven't committed that change yet ...
Clément Brisset
@Atlante45
Aug 06 2014 22:38
Oh ok ^^
David Rowe
@ctrlaltdavid
Aug 06 2014 22:39
if (url.toLower().left(33) == "https://data.highfidelity.io/api/") {
_url.setQuery("access_token=" + AccountManager::getInstance().getAccountInfo().getAccessToken().token);
}
Am pursuing the content length lead ... POST with a dummy one doesn't give 502 errors any more
Clément Brisset
@Atlante45
Aug 06 2014 22:40
Are you using a MultiPart?
David Rowe
@ctrlaltdavid
Aug 06 2014 22:41
Yes, sir
Just the same as avatar model uploading
Thickbrick Sleaford
@thickbrick
Aug 06 2014 22:42
@thoys: thanks for you help! I got it running! I managed to build qxmpp from source against qt5 and figured out the cmake incantation for including it. Got another segfault because I was missing libqt5multimedia5-plugins, but interface seems to run.
Clément Brisset
@Atlante45
Aug 06 2014 22:42
Ok, I might have an idea what the issue is.
You shouldn’t have to build the request yourself. You should only build the multipart the same way than in ModelUploader and then call
AccountManager::getInstance().authenticatedRequest(url,
                             QNetworkAccessManager::PostOperation,
                              JSONCallbackParams(),
                              QByteArray(),
                              multiPart);
David Rowe
@ctrlaltdavid
Aug 06 2014 22:47
Yeah, I look at doing that but many issues with calling that in XMLHttpRequest.cpp then translating the different callbacks into XMLHttpRequest callbacks
very messy
Thijs Wenker
@thoys
Aug 06 2014 22:53
@thickbrick cool!
David Rowe
@ctrlaltdavid
Aug 06 2014 23:06
@Atlante45 First model successfully uploaded!
Clément Brisset
@Atlante45
Aug 06 2014 23:06
\o/
David Rowe
@ctrlaltdavid
Aug 06 2014 23:06
(Embarrassing code mistake : )
Clément Brisset
@Atlante45
Aug 06 2014 23:07
Eheh
Fixed on of mine this morning