These are chat archives for highfidelity/hifi

19th
Jul 2017
Armads
@Armads
Jul 19 2017 01:27
anyone here familiar with the way avatar attachments are rendered?
I'm looking for a place to conditionally hide certain attachment models
Sachin Mahapure
@sachinmahapure
Jul 19 2017 06:23
@Atlante45 Thanks a lot!
Sachin Mahapure
@sachinmahapure
Jul 19 2017 16:32

Steps we followed to reproduce the issue (https://worklist.net/21399):

  • Launched interface
  • Run it in tablet mode by unchecking “Desktop Tablet Becomes Toolbar”
  • Went to Edit -> Running Scripts… in menu bar
  • Clicked “FROM URL” tab under LOAD SCRIPTS and entered the “https://hifi-content.s3.amazonaws.com/liv/dev/demo/demo.js” & “https://hifi-content.s3.amazonaws.com/liv/dev/demo/SlackMe.js” as Script URL separately in the pop-up.
  • This adds two new button each for the “DEMO” and “SLACK” in the tablet
  • When we click on these button, we can see the drop down in the opened screen
  • But UI is not locked in both the cases, we can close the shown screen and tablet as well (not able to reproduce)

Is there something that we are missing?

Clément Brisset
@Atlante45
Jul 19 2017 17:42
@Armads the attachment models are stored in the _attachmentModels member of the Avatar class.
You can turn them on and off using the member function setVisibleInScene in the Model class.
Ex:
for (auto& model : _attachmentModels) {
    model->setVisibleInScene(true, qApp->getMain3DScene());
}
Armads
@Armads
Jul 19 2017 18:04
when I run interface I get an immediate crash in qmetatype.h, for what looks like a null reference
First-chance exception at 0x00000000616420F7 (Qt5Cored.dll) in interface.exe: 0xC0000005: Access violation reading location 0x0000000000000004.
Unhandled exception at 0x00000000616420F7 (Qt5Cored.dll) in interface.exe: 0xC0000005: Access violation reading location 0x0000000000000004.
line 1773
anyone else seen this?
Armads
@Armads
Jul 19 2017 18:34
(I should mention this is when I run a locally built one from VS, not the installed one)
I have some local changes to do with the attachment rendering stuff, but the faulty line seems to be unrelated
int audioInjectorPtrMetaTypeId = qRegisterMetaType<AudioInjector*>();
from AudioInjector.cpp:30
Clément Brisset
@Atlante45
Jul 19 2017 18:36
We've had no report of this.
Can you stash your changes and do a clean build to sanity check your changes?
Armads
@Armads
Jul 19 2017 18:38
sure, trying now
Melissa Brown
@themelissabrown
Jul 19 2017 18:45
@misslivirose sachin has some additional questions regarding the select tags
they're upthread
Armads
@Armads
Jul 19 2017 18:53
@Atlante45 crash still happens, and I double checked my branch is even with hifi:master
Jeff Moyes
@jmo7
Jul 19 2017 20:07
I'm working through some feedback on a pull request I made. The first one is: "Equipping can fail with a smaller than normal avatar as the offsets are hard coded rather than scaled relative to the user's scale."
I've done a search on the hifi repo on github and I might have just missed it, but I couldn't find an example of this. (In almost all instances it's set statically as just numbers as so:
RightHand: [{
x: 0.001,
y: 0.139,
z: 0.050
}, {
x: -0.73,
y: -0.043,
z: -0.108,
w: -0.666
}],
LeftHand: [{
x: 0.007,
y: 0.151,
z: 0.061
}, {
x: -0.417,
y: 0.631,
z: -0.389,
w: -0.525

in a few instances it refers to a function to generate the numbers, but the functions don't seem to be pulling in any sort of Avatar sizing/scaling info.

Am I missing something?
Thanks for any help

Clément Brisset
@Atlante45
Jul 19 2017 20:12
@jmo7 I think what you're talking about is TEAR_AWAY_DISTANCE in handControllerGrab.js
Basically if an equipped entity is moved to far away from the wrist, it is auto-unequipped.
@Armads have you wiped your build directory completely?
Your build might have gotten messed up in some way.
Clément Brisset
@Atlante45
Jul 19 2017 20:17
What I recommend is:
  • Do a git fetch upstream
  • get you on your master branch and force reset it to upstream git reset --hard upstream/master (NOTE: If you have anything committed or staged on the current branch, it will be lost)
  • delete the content of your build folder: rm -rf build/*
  • Build repo
If this fails, then there's a real issue.
If it works, pull your changes and build again.
Armads
@Armads
Jul 19 2017 20:21
fetch upstream doesn't work; says fatal: 'upstream' does not appear to be a git repository fatal: Could not read from remote repository.
does fetch https://github.com/highfidelity/hifi.git do the same thing?
Clément Brisset
@Atlante45
Jul 19 2017 20:22
@Armads can you send me the output of git remote -vv
Yes
Armads
@Armads
Jul 19 2017 20:23
$ git remote -vv origin https://github.com/highfidelity/hifi.git (fetch) origin https://github.com/highfidelity/hifi.git (push)
Clément Brisset
@Atlante45
Jul 19 2017 20:23
Ok, do git remote add upstream https://github.com/highfidelity/hifi.git
That way you won't have to type the URL, you can just use upstream.
Armads
@Armads
Jul 19 2017 20:25
ok, now the reset returns fatal: ambiguous argument 'upstream/master': unknown revision or path not in the working tree.
Clément Brisset
@Atlante45
Jul 19 2017 20:26
Did you do git fetch upstream?
Armads
@Armads
Jul 19 2017 20:29
ahhh no
I did it with the complete url but now it did something different
Clément Brisset
@Atlante45
Jul 19 2017 20:31
Yeah, you need to fetch so that git knows what's the current status (branches and their heads) of the remote you just added.
Armads
@Armads
Jul 19 2017 20:32
reset has set my head to d76039387a, does that sound right?
Clément Brisset
@Atlante45
Jul 19 2017 20:34
yup, that's it
Armads
@Armads
Jul 19 2017 20:36
...cool, that didn't fix the crash
might have to nuke my workspace yet again
Clément Brisset
@Atlante45
Jul 19 2017 20:37
You've clean built already?
Armads
@Armads
Jul 19 2017 20:37
status returns no unstaged changes and that my branch is up to date
Clément Brisset
@Atlante45
Jul 19 2017 20:37
did you delete your build directory and build again from scratch?
Armads
@Armads
Jul 19 2017 20:38
thought I did but I'll try again
Clément Brisset
@Atlante45
Jul 19 2017 20:38
You're building on windows right?
Armads
@Armads
Jul 19 2017 20:38
yeah
Clément Brisset
@Atlante45
Jul 19 2017 20:38
VS 2013?
Armads
@Armads
Jul 19 2017 20:38
yep
Clément Brisset
@Atlante45
Jul 19 2017 20:38
Ok, close VS before deleting everything in your build directory.
Run cmake
and open VS by double clicking on the hifi.sln file that'll be generated by cmake in your build directory.
Armads
@Armads
Jul 19 2017 20:41
right, that's how I set it up before
do I have to do that whole procedure, including deleting /build/, every time I fetch changes?
Clément Brisset
@Atlante45
Jul 19 2017 20:45
No, but I want to make absolutely sure your build is not busted in some way.
The best way to do that is to just delete your build directory and start fresh.
Usually, when you pull from the upstream master, you want to re-run cmake because some source files might have been added/deleted or other things could've changed that require cmake to be re-run.
Jeff Moyes
@jmo7
Jul 19 2017 20:50
@Atlante45 Thanks for the info on TEAR_AWAY_DISTANCE. There isn't anything I can do to override this though, is there? (Since handControllerGrab.js, like other js files, are Immediately Invoked Function Expressions thus creating their own closure)? Therefore I wouldn't be able to do anything about the PR feedback. Or is there some other way?
Armads
@Armads
Jul 19 2017 20:56
build finished, and still crashes
Clément Brisset
@Atlante45
Jul 19 2017 21:12
@jmo7 Checking the PR now to see what they're talking about exactly.
@Armads Damn, can you send me the output of a clean cmake?
I think a lot of people in the office have moved to Qt 5.9/VS 2017 ahead of our official switch.
I wonder if that bug could only be happening on Qt 5.6/VS 2013.
Although our build system still uses that so this is weird.
@Armads are you building for debug or release?
Armads
@Armads
Jul 19 2017 21:27
debug, I'll try release now and see if it's any different
Clément Brisset
@Atlante45
Jul 19 2017 21:32
Is your crash a white popup?
Armads
@Armads
Jul 19 2017 21:33
no, but I think it would be if VS didn't catch it
Clément Brisset
@Atlante45
Jul 19 2017 21:33
Ok, try to just ignore it.
If you're running with a debugger just hit continue.
You might hit a couple on startup.
Armads
@Armads
Jul 19 2017 21:38
continuing doesn't work, and the ignore option is disabled
but, the breakpoint doesn't hit when i run in release
Cain Kilgore
@cain-kilgore
Jul 19 2017 21:41
Hey guys - I'm having the same issue.
Clément Brisset
@Atlante45
Jul 19 2017 21:41
Ok, can you work in release for now?
While we figure it out.
Armads
@Armads
Jul 19 2017 21:41
I can try but debug would be nice as soon as you can get it working
till then, thanks
Clément Brisset
@Atlante45
Jul 19 2017 21:41
Build for RelWithDebugInfo with the debugger should be roughly the same as Debug.
It'll be faster to run too.
Clément Brisset
@Atlante45
Jul 19 2017 22:06
Oh I'm getting it too now. Must not have been up to date with master.
I'll look into it.
Cain Kilgore
@cain-kilgore
Jul 19 2017 22:06
Running it in RelWithDebInfo works
Jeff Moyes
@jmo7
Jul 19 2017 22:24
@Atlante45 For easier reference it's highfidelity/hifi#10902 and the comment is about 3 comments up from the bottom of the list
Clément Brisset
@Atlante45
Jul 19 2017 22:56
@Armads @cain-kilgore if you need to use a Debug build, you can patch your local client by deleting this line:
int audioInjectorPtrMetaTypeId = qRegisterMetaType<AudioInjector*>(); in AudioInjector.cpp:30

@jmo7

 +    userData: JSON.stringify({
 +        "grabbableKey": {"grabbable": true},
 +        "equipHotspots": [
 +            {
 +                "position": {"x": 0.0, "y": 0.0, "z": 0.0},
 +                "radius": 0.3,
 +                "joints":{
 +                    "RightHand":[
 +                        {"x":0.05, "y":0.3, "z":0.03},
 +                        {"x":-0.5, "y":-0.5, "z":-0.5, "w":0.5}
 +                    ],
 +                    "LeftHand":[
 +                        {"x":-0.05, "y":0.3, "z":0.03},
 +                        {"x":-0.5, "y":0.5, "z":0.5, "w":0.5}
 +                    ]
 +                }
 +            }
 +        ]
 +    })

Those numbers look pretty big to me.

Any chance you can make the hotspot closer?