View previous topic :: View next topic |
Author |
Message |
Squid
Posts: 15
Joined: 05 Feb 2007
|
Posted: Wed Feb 07, 2007 7:38 pm Post subject: Plug Cycle error |
|
|
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 |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Wed Feb 07, 2007 8:48 pm Post subject: |
|
|
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 |
|
 |
Squid
Posts: 15
Joined: 05 Feb 2007
|
Posted: Wed Feb 07, 2007 8:50 pm Post subject: |
|
|
much appreciated  |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Wed Feb 07, 2007 9:34 pm Post subject: |
|
|
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 |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Wed Feb 07, 2007 9:53 pm Post subject: |
|
|
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 |
|
 |
Squid
Posts: 15
Joined: 05 Feb 2007
|
Posted: Thu Feb 08, 2007 3:57 am Post subject: |
|
|
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
is there a limit to how many shells uvlayout can/will create ?
thanks for the help |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Thu Feb 08, 2007 5:10 pm Post subject: |
|
|
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 |
|
 |
Squid
Posts: 15
Joined: 05 Feb 2007
|
Posted: Thu Feb 08, 2007 9:15 pm Post subject: |
|
|
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 .
Phil |
i agree, you should spend all your time coding/compiling while i go look at pretty women on the intarweb
Thanks though  |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Thu Feb 08, 2007 9:19 pm Post subject: |
|
|
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 |
|
 |
Squid
Posts: 15
Joined: 05 Feb 2007
|
Posted: Thu Feb 08, 2007 9:34 pm Post subject: |
|
|
awesome  |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
|
Back to top |
|
 |
Squid
Posts: 15
Joined: 05 Feb 2007
|
Posted: Fri Feb 09, 2007 4:26 am Post subject: |
|
|
fantastic, downloading now  |
|
Back to top |
|
 |
Locke
Posts: 18
Joined: 31 Jan 2006
|
Posted: Tue May 15, 2007 9:29 pm Post subject: |
|
|
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 |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Tue May 15, 2007 9:32 pm Post subject: |
|
|
Does the OBJ load OK if you don't use the XSI plugin link?
Phil |
|
Back to top |
|
 |
Locke
Posts: 18
Joined: 31 Jan 2006
|
Posted: Tue May 15, 2007 9:37 pm Post subject: |
|
|
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 |
|
 |
|