Export error

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Export error

Postby Kierra » Mon Jan 28, 2008 9:27 am

I had an odd bit of code turn up in an export of one of my ages, and when I try to link to the age it crashes to desktop.

Does anyone recognize this?

Code: Select all
C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_hsStream.py:119
: DeprecationWarning: 'H' format requires 0 <= number <= 65535
  def Write16(self,data):


and what do I do to fix it please?

Thanks,
~Kia
User avatar
Kierra
 
Posts: 371
Joined: Sat Sep 29, 2007 12:05 am
Location: 311 miles West of Cyan. roughly.

Re: Export error

Postby Robert The Rebuilder » Mon Jan 28, 2008 9:49 am

I take it that you're using the stable v0.5 plugin, right Kierra? What it looks like is that the method listed (Write16) is being passed a number outside the acceptable range for an unsigned short. This resulted in a bogus value being stored. Unfortunately, there's a lot of plug-in code that uses that method; we need to narrow it down to find out where it was called with the incorrect value.

To help us figure this out, would you provide some of the output (like, 20 lines) of the export that preceded this warning?
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Export error

Postby Kierra » Mon Jan 28, 2008 9:57 am

No, I haven't updated my plug-in yet. I plead busy RL and plain ol' laziness :lol:

I should probably try to do that. Any idea where I should start looking for it? I have a feeling its been buried in the forum somewhere :lol:

here's more of the code:

Code: Select all
@ Saving page Textures -1
@ Saving page BuiltIn -2
@ Saving page mainRoom 0
=> Storing 14993 vertices of geometry...
=> Storing 0 vertices of geometry...
=> Storing 3683 vertices of geometry...
C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_hsStream.py:119
: DeprecationWarning: 'H' format requires 0 <= number <= 65535
  def Write16(self,data):
=> Storing 86400 vertices of geometry...
@ Saving page StartAge 4
\/ Unloading page Textures -1
\/ Unloading page BuiltIn -2
\/ Unloading page mainRoom 0
\/ Unloading page StartAge 4
Writing Cottage.fni
Writing Cottage.xml
Writing Cottage.sum
done in 34.11 seconds


If I should just start from an earlier save of the .blend file I can do that. its always sad to do that, but I've learned to take it in stride :lol:

~Kia
User avatar
Kierra
 
Posts: 371
Joined: Sat Sep 29, 2007 12:05 am
Location: 311 miles West of Cyan. roughly.

Re: Export error

Postby Robert The Rebuilder » Mon Jan 28, 2008 10:03 am

Before upgrading to the new plugin, it's a good idea to make sure your age works with the stable plugin. Then you know who to blame. ;)

Unfortunately, all we can tell from the output is that the out-of-bounds value occurs while writing something in the mainRoom page.

Let's cut to the chase: in your .blender/scripts/alc_hsStream.py file, replace the Write16() method with the following code:

Code: Select all
    def Write16(self,data):
        if data < 0 or data > 65535:
            raise ValueError, "Write16 Out Of Range: %d" % (data)
        self.fs.write(struct.pack("<H",data))


This will halt the export and show us a "stack trace", telling us who called this method and with what crazy value.

Do another export, then post the ouput of the stack trace.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Export error

Postby Kierra » Mon Jan 28, 2008 10:49 am

I don't want to sound like a complete idiot.....but I have no idea what you just asked me to do :lol:

When it comes to age building I'm a moderately talented monkey punching keys on they keyboard until I like what I see. I have no idea how the program works or how to tinker with it when it doesn't work :oops: :lol:

Whats the simplest fix? (stars and stones, I hope that wasn't the simplest fix! :lol: )

~Kia
User avatar
Kierra
 
Posts: 371
Joined: Sat Sep 29, 2007 12:05 am
Location: 311 miles West of Cyan. roughly.

Re: Export error

Postby Robert The Rebuilder » Mon Jan 28, 2008 11:04 am

I understand - no age creator should ever have to monkey with the plug-in Python code in order to fix their age.

What I'm hoping to do is to get enough information to tell you, "Ah - just set your object's whatsis parameter to 15 instead of -15" or something like that.

But the only way we can find out which object and which parameter is if we get the plugin to be more helpful.

To make it easy, I posted a modified alc_hsStream.py file for download here. Put this into your blender/scripts folder and overwrite your existing alc_hsStream.py file. Then re-export your age, and post the last 10 lines of the output here. That should tell me more information.

Thanks for your patience, Kierra!
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Export error

Postby Trylon » Mon Jan 28, 2008 11:47 am

Oi - these kind of error messages are an incredible pain to debug....
More-so cause they shouldn't ever happen :/
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Export error

Postby Kierra » Mon Jan 28, 2008 11:55 am

ok I did as you asked Robert, and i don't see any obvious errors or differences in this export, but I'm still getting crashed to desktop when I try to link to the age.

Maybe there's something I'm not seeing *shrug*

Here's the code:

Code: Select all
Exporting C:\Program Files\Ubi Soft\Cyan Worlds\Uru - Ages Beyond Myst\dat\Cotta
ge.age ...
Args are e_age_final
['e', 'age', 'final']
Exporting age Cottage
#########################################
##
## => Exporting page Textures -1 <=
##
#########################################
#########################################
##
## => Exporting page BuiltIn -2 <=
##
#########################################
#########################################
##
## => Exporting page mainRoom 0 <=
##
#########################################

[Lamp Lamp]

[Visual Object barn]
 Drawable object has 57 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture wood_floor_02_rep.jpg from cache <=

[Visual Object barn.001]
 Drawable object has 198 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object Cube]
 Drawable object has 16 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture DoorsMedieval0027_L.j from cache <=

[Visual Object Cube.002]
 Drawable object has 64 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture concrete_with_lichens from cache <=

[Visual Object Cube.003]
 Drawable object has 1472 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture Pine1.png from cache <=

[Visual Object Cube.004]
 Drawable object has 54 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture Oldaxe.jpg from cache <=

[Visual Object Cube.006]
 Drawable object has 48 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture PlanksOld0244_1_L.jpg from cache <=

[Visual Object Cube.008]
 Drawable object has 56 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture oldshutters1.jpg from cache <=

[Visual Object Cylinder]
 Drawable object has 34 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture woodpile1.jpg from cache <=

[Visual Object Cylinder.001]
 Drawable object has 264 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture crackedwood.jpg from cache <=

[Visual Object house]
 Drawable object has 42 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture WoodPainted0111_1_L.j from cache <=

[SpawnPoint LinkInPointDefault]

[Visual Object Plane]
 Drawable object has 4225 vertices, processing can take some time...
WARNING: AutoMaterial created, since object has no material
 => Loading texture Bull2_K_Land_Tex2.jpg from cache <=

[Visual Object Plane.001]
 => Loading texture watertransparency2.pn from cache <=
 Drawable object has 4 vertices

[Visual Object Plane.002]
 Drawable object has 25 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture GrassDead0006_L.jpg from cache <=

[Visual Object Plane.003]
 Drawable object has 54 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture Oregongrapevine4.png from cache <=

[Visual Object Plane.004]
 Drawable object has 4 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture dirtring1.png from cache <=

[Visual Object Plane.005]
 Drawable object has 8 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture plantline2.png from cache <=

[Visual Object rocks]
 Drawable object has 0 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object rocks.001]
 Drawable object has 26 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture Stone47.jpg from cache <=

[Visual Object rocks.002]
 Drawable object has 26 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object rocks.003]
 Drawable object has 26 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object rocks.004]
 Drawable object has 52 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object rocks.005]
 Drawable object has 26 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object rocks.006]
 Drawable object has 26 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object rocks.007]
 Drawable object has 286 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object rocks.008]
 Drawable object has 26 vertices
WARNING: AutoMaterial created, since object has no material

[Visual Object Sphere]
 Drawable object has 513 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture SkyA1.jpg from cache <=

[Visual Object Sphere.001]
 => Loading texture Treeline2A.png from cache <=
 Drawable object has 192 vertices

[Visual Object Sphere.002]
 => Loading texture MountShoad1.png from cache <=
 Drawable object has 16 vertices

[Visual Object stonearch]
 Drawable object has 106 vertices
WARNING: AutoMaterial created, since object has no material
 => Loading texture carvedarchgate1.jpg from cache <=

[Region Object swimregion]
 Region type: swimrgn

[Region Object swimsurface]
 Region type: swimplainsfc

[Visual Object treefoliage]
 => Loading texture Pinebranch1.png from cache <=
 Drawable object has 1728 vertices

[Visual Object treefoliage.001]
 Drawable object has 86400 vertices, processing can take some time...

[Visual Object treefoliage.003]
 Drawable object has 1728 vertices

[Visual Object trunk]
 => Loading texture BarkDecidious0062_L.j from cache <=
 Drawable object has 22 vertices

[Visual Object trunk.001]
 Drawable object has 572 vertices

[Visual Object trunk.002]
 Drawable object has 22 vertices
#########################################
##
## => Exporting page StartAge 4 <=
##
#########################################

@ Saving page Textures -1
@ Saving page BuiltIn -2
@ Saving page mainRoom 0
=> Storing 14993 vertices of geometry...
=> Storing 0 vertices of geometry...
=> Storing 3683 vertices of geometry...
=> Storing 86400 vertices of geometry...
@ Saving page StartAge 4
\/ Unloading page Textures -1
\/ Unloading page BuiltIn -2
\/ Unloading page mainRoom 0
\/ Unloading page StartAge 4
Writing Cottage.fni
Writing Cottage.xml
Writing Cottage.sum
done in 16.91 seconds


~Kia
User avatar
Kierra
 
Posts: 371
Joined: Sat Sep 29, 2007 12:05 am
Location: 311 miles West of Cyan. roughly.

Re: Export error

Postby Robert The Rebuilder » Mon Jan 28, 2008 12:17 pm

I just now noticed this, from your earlier output message:

Kierra wrote:
Code: Select all
@ Saving page Textures -1
@ Saving page BuiltIn -2
@ Saving page mainRoom 0
=> Storing 14993 vertices of geometry...
=> Storing 0 vertices of geometry...
=> Storing 3683 vertices of geometry...
C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_hsStream.py:119
: DeprecationWarning: 'H' format requires 0 <= number <= 65535
  def Write16(self,data):
=> Storing 86400 vertices of geometry...
@ Saving page StartAge 4



The last "Storing" message has a vertex count of 86400 vertices. This is the number causing the problem, because right before it prints that message, it calls Write16() on that vertex count.

So, the plugin has combined several objects together into a buffer group of vertices that exceeds the maximum allowed amount. The frustrating thing is that there is a mechanism in place that is supposed to prevent this from happening - the method is plDrawableSpans.find_buffer_group() - and yet, here we are.

Well, one thing you can do is to move some of the objects currently in page 0 to other pages. That will keep the number of vertices per buffer group down, since they're distributed among other pages.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Export error

Postby Nadnerb » Mon Jan 28, 2008 12:41 pm

So, the plugin has combined several objects together into a buffer group of vertices that exceeds the maximum allowed amount. The frustrating thing is that there is a mechanism in place that is supposed to prevent this from happening - the method is plDrawableSpans.find_buffer_group() - and yet, here we are.

Well, one thing you can do is to move some of the objects currently in page 0 to other pages. That will keep the number of vertices per buffer group down, since they're distributed among other pages.

That won't fix the problem. This group is going through because all those verts are in one object.
[Visual Object treefoliage.001]
Drawable object has 86400 vertices, processing can take some time...

That object is way too ridiculous, and must be reduced or split into separate objects.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 2 guests