[Verse-dev] Data loss problems

Emil Brink emil at obsession.se
Wed Nov 3 17:01:41 CET 2004


Hello.

I've spent a while uploading large-ish models (3000 and 4000 vertices),
and observing the failures that invariably occur.

I'm going to be very concrete, and illustrate with code from my model
uploading tool, in Python using Brecht's . Hopefully this is readable by most people
here.

The following is my vertex send loop:

for o in m.objects.itervalues():
  for i in range(0, len(o.verts)):
    xyz = o.verts[i]
    v.send_g_vertex_set_real32_xyz(o.node_geometry_id, 0, i, xyz[0], xyz[1], xyz[2])

For my test case, this first sends one mesh of ~4400 vertices,
and then another one with 3100. When connecting a renderer to
the host later, the then presented data has holes in it. Some
instrumentation code I added to the host revealed that all the
holes were in the end of the last node, the first one came
through just fine.

I then added a single call to a function that waits for the session
size to grow to 10 or less bytes, as mentioned earlier on the list,
like so:

def flush():
  while v.session_get_size() > 10:
    v.callback_update(10000)

for o in m.objects.itervalues():
  for i in range(0, len(o.verts)):
    xyz = o.verts[i]
    v.send_g_vertex_set_real32_xyz(o.node_geometry_id, 0, i, xyz[0], xyz[1], xyz[2])
  flush()

This flushes all the vertices of one node before starting on the
next one, and for my test case it completely solved the problem.

Now, we can't just say "you need to flush between objects", because
it is very probable that the actual number of vertices sent plays a
role in when it breaks.

I tried it with another object, that has 10,519 vertices, and it
dropped 14 vertices, indicating that some magical limit has been
breached.

I am not happy with this situation, but I need to consult with
Eskil about how it's supposed to work, and he's not in right
now as you might be aware.

I guess I just wanted to acknowledge that even if I do every-
thing to the best of my knowledge, I can provoke the server into
dropping data. This confirms some results achieved by others.

Regards,

/Emil


More information about the Verse-dev mailing list