Hi all,
I examined my recent problems with VOS on the Mac some more, as
described in my previous mail, using vostest mainly.
I am now pretty sure that the reason for all this trouble is a race
condition, even though
I did not manage to catch the pesky little critter. There is some
evidence however that
somehow some of the Tasks involved in scene building finish before their
subtasks are done. I tried the CVS version of CS for this, and a few
times I got errors
like this:
crystalspace.mesh.object.thing: Index number 0 is too high for a
polygon (max=0) (polygon '<noname>')!
This seems to indicate that the vertice information for the
outerwalls were not
present when this happened. Other problems such as missing textures
and missing geometry can also be explained by missing child relations.
Looking for an explanation I found that the VOS plugin mostly uses
vosa3dl->mainThreadTasks.push(sometask);
but in a few places uses
TaskQueue::defaultTQ().addTask(sometask);
I "fixed" the latter to also use the main task queue, but I actually
made it worse.
Where vostest worked (mostly) before, it now sometimes crashes with:
terminate called after throwing an instance of 'VUtil::NullPointerError'
what(): tried to dereference null smart pointer in -> operator
I tracked this down to csMetaTexture::Setup(), where it does
vRef<Property> imagedata = getImage();
if(imagedata->getDataType().substr(0, 5) == "text/") {...}
without checking imagedata.isValid() as in other places.
This again can be explained by a missing child relation in case of a
race condition,
and I assume that other places have the same problem but better error
checking,
so the plugin behaves strangely instead of crashing.
Funnily enough, the plugin ran nicely and correctly on LINUX, even
with the same
task queue related modification... Maybe MacOSX uses a different
thread scheduling
mechanism, or the presence of real parallelism is a problem (testing
on G5 with 2 Processors). Sadly, I don't have time to dig into this
any deeper...
A final remark regarding the VOS plugin, neither the prerelease nor
the CVS version
can handle 3DS or MD2 models, and crash unless I turn models off in
a3dldemo.
Too bad, I liked Yohko :-)
---
Apart from messing with Ter'angreal and vostest, I also began looking
into my actual
priority 1 task, using VOS with legacy VOP support. While I can still
use LocalSocketSiteExtension instead of LocalVipSiteException, the
parsing of messages
is broken in messageblock.cc. It can only handle binary encoding, but
the sending side actually sends the old XML-like stuff.
I assume the VOPParser got axed when you removed the dependency on
flex/bison...
Do you have an alternative parser lying around, or should I write my
own one?
Also, could you do me a favour and add a "legacy" command line switch
to VosApp
to use Socket instead of Vip?
Regards,
Karsten Otto (kao)
_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d