Hello,
In my Lua code (V4.1.0) I dynamically creating joints and pureShapes.
Everything goes fine, till the handler of a shape or a joint is over 2e10.
Example:
[Dummy@childScript:handler 1048613
then i get this error in this functions:
Object does not exist. (in function 'sim.setObjectPosition')
Object does not exist. (in function 'sim.setObjectOrientation')
In version V4.0. I had problem with function sim.setObjectParent and Position and Orientation worked fine.
This is part of my code:
joints[i] = sim.createJoint(sim.joint_revolute_subtype, sim.jointmode_ik,0,{0.05,0.02})
sim.addLog(0,"handler " .. joints[i])
__setObjectPosition__(joints[i],base,{0,0,0})
__setObjectOrientation__(joints[i],base,{0,0,0})
-- this two functions were automatically created in V4.1.0 when I opened ttt file created in V4.0.
As I wrote, everything is fine till handler number is under 2e10.
Example in the sandbox:
> joint = sim.getObjectHandle("Revolute_joint")
> sim.setObjectPosition(joint,-1,{0,0,0})
[string "sandboxScript"]:1: Object does not exist. (in function 'sim.setObjectPosition')
> joint
1048614
Thank you for your answer.
Handler problem - Object does not exist
Re: Handler problem - Object does not exist
Hello,
this is indeed a bug introduced in last release. My guess is that you are creating (and obviously later on also destroying) a very very large amount of objects (otherwise the scene would not be able to cope with that many objects at the same time anyways). This will be fixed in next release, out hopefully by the end of next month.
As a workaround until then:
this is indeed a bug introduced in last release. My guess is that you are creating (and obviously later on also destroying) a very very large amount of objects (otherwise the scene would not be able to cope with that many objects at the same time anyways). This will be fixed in next release, out hopefully by the end of next month.
As a workaround until then:
- try to avoid creating that many objects within one scene session. i.e. when a handle reached 999'999, save the scene and reload it. The handles will restart from 0
- or, when you notice that a handle reaches 999'999, make a loop that creates and destroys dummy objects, until the returned handle is 0. Then you can proceed as previously. This will take a few seconds depending on your machine.