WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 17 votes, 5.00 average. Display Modes
  #1  
Old 09-19-2006, 08:10 AM
bnord bnord is offline
Member
 
Join Date: Sep 2006
Posts: 6
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
Reply With Quote
  #2  
Old 09-19-2006, 10:23 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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:
I'm not sure what is causing winviz to hang. Are you making sure that your threads cleanup properly before your script exits? Can you create a small script that recreates the problem?
Reply With Quote
  #3  
Old 09-20-2006, 05:36 AM
bnord bnord is offline
Member
 
Join Date: Sep 2006
Posts: 6
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)
(using the is-operator solved the problem with the exception ... ups )
Reply With Quote
  #4  
Old 09-20-2006, 10:04 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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)
Reply With Quote
  #5  
Old 09-21-2006, 05:22 AM
bnord bnord is offline
Member
 
Join Date: Sep 2006
Posts: 6
Yes, thats the solution. Thanks a lot!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC