Votes
0
Product:
iClone 7
Version:
7.7
Status:
Released in 7.9
Issue 6557
crash of iClone, when I load a new project, when the script is running
My water script dos run well, but if I load a new project, when the script is running, it dos crash iClone fully.
Now I also have tested the Widget.py sample from Reallusion. There happens the same.
What could be done?

Regards
Tesira
OS: Windows 10
  •  4
  •  1006
Submitted byTesira Dec 20, 2019
1
COMMENTS (4)
Feedback Tracker Admin Nov 3, 2021
Hi Tesira,

Can you try it in iClone v7.92?

Molly
Reallusion
Tesira Dec 21, 2019
oh sorry, the crashing script is without this line  if len(items) > 0 with this line it dos work.

def update_interface(dia):
    items = RLPy.RScene.GetSelectedObjects()
    newname=items[0].GetName()
    print (newname)
Tesira Dec 21, 2019
… well I have found out more ….. already this little script lets iClone crash, when I load a new Project or delete the seleted item …..

class EventCallback(RLPy.REventCallback):
    
    def __init__(self):
            RLPy.REventCallback.__init__(self)
            dia=0

   
    def OnObjectSelectionChanged(self):
            print("selection changed")
            update_interface(1)
            
            
    def OnObjectDeleted(self):
            print("event Object Deleted")
            update_interface(2)
            
def update_interface(dia):
    items = RLPy.RScene.GetSelectedObjects()
    if len(items) > 0:
        newname=items[0].GetName()
        print (newname)


events["event_callback"] = EventCallback()
events["event_callback_id"] = RLPy.REventHandler.RegisterCallback(events["event_callback"])

But, if I add a line to update_interface(dia), I can load also a new Project or delete an item:

def update_interface(dia):
    items = RLPy.RScene.GetSelectedObjects()
    if len(items) > 0:
        newname=items[0].GetName()
        print (newname)

I think, this should not happen, that this dos crash iClone, if there are no items selcted. There could be an error message.
animagic Dec 21, 2019
Just to clarify: you mean you actually load a project, while a script is running?

I would think that that would cause the state of the environment to change including variable bindings, etc. So that will cause a crash.
1