headus 3D tools headus 3D tools / 3D scans
Support Forums
 
 FAQFAQ   SearchSearch    UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
headus 3D scans

Plug Cycle error
Goto page 1, 2  Next
 
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Squid



Posts: 15
Joined: 05 Feb 2007

PostPosted: Wed Feb 07, 2007 7:38 pm    Post subject: Plug Cycle error Reply with quote

Hi,
Whenever i load a mesh using the cmd line switches (xsi plugin) with uvlayout set to edit uv's i get caught in a cycle of uvlayout loading the file, writing to the file, then (because the obj seems to be flagged as changed) reloading the obj - ad ifinitum.

i can reproduce the error everytime, through xsi or the bog standard cmd line.

everything is fine when uvlayout is launched normally though.

Hope you can help

thanks

/edit - slight revision :
uvlayout seems to struggle deleting the obj file after it's created the shells. it will eventually delete the file (and stop reloading) but it's taking, on average 15 or 16 loads. this lowers to around 10-12 from a normal command line launch
Back to top
View user's profile Send private message
headus
Site Admin


Posts: 2873
Joined: 24 Mar 2005
Location: Perth, Australia

PostPosted: Wed Feb 07, 2007 8:48 pm    Post subject: Reply with quote

Sorry about that! It worked last time I checked, but that was a while ago. I'll have a look now ...

Phil
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Squid



Posts: 15
Joined: 05 Feb 2007

PostPosted: Wed Feb 07, 2007 8:50 pm    Post subject: Reply with quote

much appreciated Smile
Back to top
View user's profile Send private message
headus
Site Admin


Posts: 2873
Joined: 24 Mar 2005
Location: Perth, Australia

PostPosted: Wed Feb 07, 2007 9:34 pm    Post subject: Reply with quote

Like you said, UVLayout may be having problems deleting the OBJ file, so next time it checks, its still there and kills the one it just loaded and reloads, again and again. Looks like I need to handle errors on the delete a bit better, and put in some sort of minimum time required before a reload is allowed.

What it could be is that your application writing the OBJ (XSI I guess) isn't closing the file completely, so that blocks any other applications from deleting it. My suggestion (and it is hidden away there in the plugin docs :-) is to write to a temp file, then use the windows copy command to copy that to the target OBJ.

If you're already doing the copy thing, let me know and I'll rush through that code to handle the delete errors better.

Phil
Back to top
View user's profile Send private message Send e-mail Visit poster's website
headus
Site Admin


Posts: 2873
Joined: 24 Mar 2005
Location: Perth, Australia

PostPosted: Wed Feb 07, 2007 9:53 pm    Post subject: Reply with quote

I had a closer look at the code, and it already has a 10 second minimum wait before checking for a new OBJ ... is that what your seeing, 10 seconds between your reloads?

Phil
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Squid



Posts: 15
Joined: 05 Feb 2007

PostPosted: Thu Feb 08, 2007 3:57 am    Post subject: Reply with quote

my code -
if (uvlayout is running)
write to a temp obj file
rename it using the fielsystem -
actually i'm just moving the file as there's no rename func with the filesystem obj

i just tried it using the windowsshell and i get the same results.

The effect does seem more prevalent on higher res meshes. standard objects sometimes load first time.

With weld, clean and Detatch Flipped turned on it seems more reliable too...which makes me now think that this may be a bug with the fellow sat behind my computer Smile

is there a limit to how many shells uvlayout can/will create ?

thanks for the help
Back to top
View user's profile Send private message
headus
Site Admin


Posts: 2873
Joined: 24 Mar 2005
Location: Perth, Australia

PostPosted: Thu Feb 08, 2007 5:10 pm    Post subject: Reply with quote

Squid wrote:
my code -
if (uvlayout is running)
write to a temp obj file
rename it using the fielsystem -
actually i'm just moving the file as there's no rename func with the filesystem obj

Try this and see if it changes at all ...
- write to a temp obj file
- copy that to target obj file
- delete temp obj file

Quote:
is there a limit to how many shells uvlayout can/will create ?


A thousand or so. My guess is that turning on the import options slows down the load a bit which gives the temp file enough time to deleted properly.

OK, instead of spending hours trying to work out why the files aren't deleting straight away, I'll work on making uvlayout more robust. What it should do is not load a new mesh until its seen that the old one has been deleted properly. Shouldn't be hard to do ... I'll have a new installer ready for you later today (Perth time :-).

Phil
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Squid



Posts: 15
Joined: 05 Feb 2007

PostPosted: Thu Feb 08, 2007 9:15 pm    Post subject: Reply with quote

headus wrote:

Try this and see if it changes at all ...
- write to a temp obj file
- copy that to target obj file
- delete temp obj file


No difference - using the com object (from within xsi)
Slight difference (5 or 6 loads) when using the shell cmds (still from xsi)
Huge difference when using c# - pretty much loads everytime
the dotNet/c# soloution precludes xsi v5 from using the plugin though.

headus wrote:

OK, instead of spending hours trying to work out why the files aren't deleting straight away, I'll work on making uvlayout more robust. What it should do is not load a new mesh until its seen that the old one has been deleted properly. Shouldn't be hard to do ... I'll have a new installer ready for you later today (Perth time Smile.

Phil


i agree, you should spend all your time coding/compiling while i go look at pretty women on the intarweb Wink

Thanks though Smile
Back to top
View user's profile Send private message
headus
Site Admin


Posts: 2873
Joined: 24 Mar 2005
Location: Perth, Australia

PostPosted: Thu Feb 08, 2007 9:19 pm    Post subject: Reply with quote

Ive made the fixes to the plugin code ... its smarter now about handling these delayed delete conditions, plus you can turn on some debugging that gets sent to the shell window so you can see whats happening internally.

Just have to fix another unrelated problem, then I can upload the new installer!

Phil
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Squid



Posts: 15
Joined: 05 Feb 2007

PostPosted: Thu Feb 08, 2007 9:34 pm    Post subject: Reply with quote

awesome Smile
Back to top
View user's profile Send private message
headus
Site Admin


Posts: 2873
Joined: 24 Mar 2005
Location: Perth, Australia

PostPosted: Thu Feb 08, 2007 10:30 pm    Post subject: Reply with quote

All done! I'm uploading the new installer now, and will post to the Update forum when its ready to grab.

Update: Uploaded. See http://www.headus.com/phpbb/viewtopic.php?p=1448#1448

Phil
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Squid



Posts: 15
Joined: 05 Feb 2007

PostPosted: Fri Feb 09, 2007 4:26 am    Post subject: Reply with quote

fantastic, downloading now Smile
Back to top
View user's profile Send private message
Locke



Posts: 18
Joined: 31 Jan 2006

PostPosted: Tue May 15, 2007 9:29 pm    Post subject: Reply with quote

Hey Phil, this sucker is back for me. Trying to load up a 5000 poly object using the XSI plugin and told UVLayout to use the existing UVs. I then get into the infinite loading loop but cyeat.exe is throwing this error:

"Instruction at 0x69747139 referenced memory at 0x01d20040. Memory could not be written to."
Back to top
View user's profile Send private message
headus
Site Admin


Posts: 2873
Joined: 24 Mar 2005
Location: Perth, Australia

PostPosted: Tue May 15, 2007 9:32 pm    Post subject: Reply with quote

Does the OBJ load OK if you don't use the XSI plugin link?

Phil
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Locke



Posts: 18
Joined: 31 Jan 2006

PostPosted: Tue May 15, 2007 9:37 pm    Post subject: Reply with quote

Actually, I think it's the object. It gave the same error when I did it by hand but didn't get stuck in that loop. Checking clean and weld on the load options allowed it to load.

I'll send you the mesh.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group