#1
|
|||
|
|||
trouble with winviz.exe
I have some trouble with winviz.exe of V3b. After exiting the application via Escape button, there is still a process "winviz.exe" visible in the Task-Manager which has to be killed manually. This happens without any additional DLLs like Philips OGL Wrapper (not installed on this system). I think this could be in conjunction with a thread that is responsible for loading textures. Sometimes (after different times of running) an exception is thrown.
The Traceback looks like this: Traceback (most recent call last): File "C:\Programme\WorldViz\Vizard30\bin\lib\threading. py", line 442, in __bootstrap self.run() File "TextureLoaderThread.py", line 68, in run if textureSet[slotToReplace] == None: File "C:\Programme\WorldViz\Vizard30\python\viz.py" , line 1992, in __eq__ return self.id == other.id and isinstance(other,self.__base) AttributeError: 'NoneType' object has no attribute 'id' The code worked fine with 2.53. Is there a general change in Version 3 that could cause this? Best regards, Björn |
#2
|
|||
|
|||
The problem with the exception will be fixed in the next release. Either way, you should usually use the is operator when checking for equality with None
Code:
if textureSet[slotToReplace] is None: |
#3
|
|||
|
|||
I think I have found the problem. When I start the following Testscript on Vizard 2.53, the print command is executed and after that winviz quits. On Version 3 beta the print command is NOT executed before quitting. Thats why the "TextureLoaderThread" starts again and again because I need to set a flag there.
If you still need it, i will try to create a small script tomorrow that show you the exact code structure (this will take some time because i'm not the initial author of the script) Code:
import viz viz.go() def mykeyboard(key): if key == viz.KEY_ESCAPE: print 'this will not appear on Vizard 3 beta' viz.callback(viz.KEYBOARD_EVENT,mykeyboard) |
#4
|
|||
|
|||
I'm assuming the programmers original intention was for that block of code to be executed when Vizard exits. If this is the case, then it would be better to execute the code during viz.EXIT_EVENT, instead of when the escape key is pressed. Try the following instead:
Code:
def onExit(): print 'This will appear before Vizard exits' viz.callback(viz.EXIT_EVENT,onExit) |
#5
|
|||
|
|||
Yes, thats the solution. Thanks a lot!
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|