Build 4904 errors?


#1

Working on my script, and see many times this error. Something broken ?

[05/18 20:39:33] [DEBUG] Web Window JS message: file:///H:/Program%20Files/High%20Fidelity/scripts/system/html/entityProperties.html 630 Uncaught TypeError: Cannot use ‘in’ operator to search for ‘grabbableKey’ in false

Other one i see but that must be some (user) failure ?

[05/18 20:36:29] [WARNING] Invalid shader URL: QUrl("")


#2

The first one looks like a bug in edit.js and the second one is a procedural entity (probably skybox) with an invalid URL in its userdata. What domain where you in?


#3

domain is SimSquare. And, yes the error appears in edit mode.

This is the skybox.
{
“ProceduralEntity”: {
“shaderUrl”: “https://s3.amazonaws.com/Oculus/shadertoys/toySkybox.fs
}
}


#4

Deteached ctrlaltdavid script that where still running. reloaded all scripts. Now i cannot script on the entity anymore. my script url box is gone ! Oh, it’s moved. but where’s the data that points to my script file on local disk ? It’s empty.

copy and pasted the path back, strange it got wiped. but the webwindow error remains.
Oh strange, teleported back from sandbox. Script local path is again gone (you know c:\bla bla) as example. and the position of the script edit box is palced back to the bottom.

I would swear i have read that errors like this where removed ?

[05/18 21:11:05] [DEBUG] DEADLOCK WATCHDOG WARNING: lastHeartbeatAge: 17445 elapsedMovingAverage: 2 PREVIOUS maxElapsed: 14950 NEW maxElapsed: 17445 ** NEW MAX ELAPSED ** maxElapsedAverage: 709 samples: 119468815

Back in previous version, local disk path again wiped from the script url. i cannot paste url because i test the script from local disk. and that need to be accepted i think. Also the location moved up.

Time for the ghostbusters ?
Error happens now with 4864 too. Mabye leftovers still from the latest version.
Correction: client is now 4864 server is 4904. before both where the same

[05/18 21:22:50] [DEBUG] Web Window JS message: file:///H:/Program%20Files/High%20Fidelity/scripts/system/html/entityProperties.html 630 Uncaught TypeError: Cannot use ‘in’ operator to search for ‘grabbableKey’ in false

This is btw my defaultscripts.

Script.load("system/progress.js");
Script.load("system/edit.js");
Script.load("system/examples.js");
Script.load("system/selectAudioDevice.js");
Script.load("system/notifications.js");
Script.load("system/dialTone.js");
Script.load("system/depthReticle.js");
Script.load("system/users.js");
Script.load("system/directory.js");

Done uninstall on the desktop, reinstalled 4904. Needed to remove Script.load(“system/depthReticle.js”); from the defaults. not sure what that script did.
It wiped file path again from the entity.

Cannot script anymore, painted in a corner and surrounded by bugs :cry:


#5

Only the status (i.e. DEADLOCK WATCHDOG STATUS).
DEADLOCK WATCHDOG WARNING and DEADLOCK WATCHDOG DETECTED are still useful for us to debug deadlock crashes and they only show up when something’s not right.
DEADLOCK WATCHDOG STATUS was printing all the time every 5 sec no matter what.

Going to your domain, I see that:

Error loading script from URL  QUrl("file:///w:%5CHigh Fidelity Scripts%5CRiRa_Door_201605_005.js?v=23")

Is that the file you are talking about?

Re: [05/18 13:58:40] [WARNING] Invalid shader URL: QUrl("") Just found out every non procedural box entity will produce that warning. I’ll file a bug for it, but it’s nothing, just some log polution.

Will file a bug for the following as well:

[05/18 21:22:50] [DEBUG] Web Window JS message: file:///H:/Program%20Files/High%20Fidelity/scripts/system/html/entityProperties.html 630 Uncaught TypeError: Cannot use 'in' operator to search for 'grabbableKey' in false

But it’s a minor bug in edit.js that doesn’t affect your ability to script.

When you set you script URL, do you press enter/click outside the text box, maybe it doesn’t save?


#6

Yes that is the script. i checked the models.json it’s saved inside that.
But… the entities properties window is not showing the url. so impossible to do a refresh to.

Doing some testing, just coming from sandbox.
Open edit window, select my test entity. looking for script url. Im still seeing the sandbox information i checked.

I can press refresh , click the entity , slect the entity in the list. the information is not updated in the edit properties.


#7

@c Thanks for the help !, the latest script version is running now too
Now i can add the latest pieces tomorrow.


#8

@c The problem is back again.

No script url, object still works. And yes i think i used the ?v= on the llcal filename. because it worked. and it’s the only way to reload a script ! Until there’s a reload button in edit entities properties. Teleporting out of the domain and back is not fixing it. I know it’s easy to fix by pasting filepath back, but it need a fix.

Also i still not see the data i add by the script in User Data. It looks like things get saved to the server, because it seems to work from within the script. But not updated to entity properties.

I need to see for now true or false in the userdata

Sometimes, very random. and most when something else broke, user error ?
i see data appear in the userdata field.

Why is the position in edit entitiy propertries for the script url edit box always jumping around. It’s nromall complete at bottom, sometimes it’s in the middle. and then it jumped down to the bottom again.

ADD: while am testing, and changing your new way. it seems to work pretty well after i start to udnerstand it a bit. But i noticed that in the entity user field appeared the UserDate from the skybox. :rolling_eyes:


#9

Arg, it’s a bug in edit.js, I just checked.
If you have something in the userData that’s not JSON, the .html page crashes and doesn’t display correct information.

Will have a fix soon.


#10

@Richardus.Raymaker https://github.com/highfidelity/hifi/pull/7944


#11

I tried to use json. but i do not understand right now complete how to work with the json data.
What i did where using the data,userdate field. put that in the json command to split it. like i do with entities. But for some reason the variables created errors.

example if (!config.boolean) created error.

Other way i did save the json string back to userdata. On other system right now.


#12

Tried to test it, but avast is blocking it, or something else. Cannot test.
Windows already started to scream to. “are you sure you want to run it !”


#13

Here is a small example on how to do it:

// From JS Object to String
var userDataObject = {
    doorOpen: true
};
var userData = JSON.stringify(userDataObject);
print(userData); // {"doorOpen":true}

// From String to JS Object
var userData = Entities.getEntityProperties(entityID, ["userData"]).userData;
var userDataOject = JSON.parse(userData);
print("Is the door open? " + userDataObject.doorOpen); // Is the door open? true

#14

Thanks @c, that looks the same as i did. Except the first line is different.
Well, still getting the reverse mode complete working.


#15

@c Why am not allowed todo this ?

if (Math.abs(signedDistance) < 5 && configDataOject.doorIsOpen==false)

But this works fine

var doorIsOpen=configDataOject.doorIsOpen; if (Math.abs(signedDistance) < 5 && doorIsOpen==false)

Unless configDataOject.doorIsOpen is still a false in string and if you transfer it to a new variable that it get converted to boolean.


#16

Weird, I don’t see why it wouldn’t work, what error do you get?
Maybe try:

if ((Math.abs(signedDistance) < 5) && (configDataOject.doorIsOpen == false)) {
    ...
}

#17

I do not get any error, but it seems the compare is not working between configDataOject.doorIsOpen and the boolean. i solved it different for now.

I need to test your last example.

It looks like that works, the small difference between langauges are sometimes to most difficult part. I