[redland-dev] redland rasqal datatype problem (bug?)
Lauri Aalto
laalto at gmail.com
Sun Mar 23 10:59:28 GMT 2008
On Fri, Mar 21, 2008 at 7:34 PM, Sebastian Trüg <strueg at mandriva.com> wrote:
> Nevermind.
> Apparently one needs to create one world instance for each storage. At least
> that is what fixed the issue. I personally think this should be stated in the
> documentation. ;)
I think that's not the issue.
I created some quick tests that parse in RDF/XML data with both typed
and plain literals to two librdf_models on top of bdb hash
librdf_storages created on top of the same librdf_world instance and
run some queries. I could not reproduce the problem you saw. (However,
this is a 32 bit system, not 64 bit like yours.)
>From your gdb backtrace it looks like the datatype_uri is a valid
pointer i.e. the datatype uri was valid at some point. Since the uri
has turned invalid, apparently the memory has been overwritten later.
Are you sure you don't have the same datatype uris in your code and
accidentally e.g. double delete them --- redland uris are shared,
reference counted objects and when the count becomes zero, the object
is freed, possibly leaving dangling pointers behind. In this case,
another librdf_world instance provides a workaround because uri
objects are not shared across world instances.
Please try to produce a test case that reproduces this issue without
using any additional APIs on top of librdf.
Lauri
More information about the redland-dev
mailing list