[redland-dev] Segmentation Fault

Vinay Solanki vinay at binghamton.edu
Thu Jul 28 01:02:07 BST 2005


Dear Dave,

Example File is ex-10.rdf :-

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://purl.org/rss/1.0/">
   <!-- Check about rdf:li and rdf:resource -->
   <channel rdf:about="http://example.org/channel/">
      <items>
         <rdf:Seq>
            <rdf:li rdf:resource="http://example.org/01"/>
            <rdf:li rdf:resource="http://example.org/02"/>
            <rdf:li rdf:resource="http://example.org/03"/>
         </rdf:Seq>
      </items>
   </channel>
</rdf:RDF>

//over here i am using the parsing function of raptor and it works fine....
 RDF Parsing ....  listing is in the form of subject , predicate and
object URI's

<http://example.org/channel/> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://purl.org/rss/1.0/channel>

<genid1>  <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq>

<genid1>  <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> 
<http://example.org/01>

<genid1>  <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> 
<http://example.org/02>

<genid1>  <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> 
<http://example.org/03>
<http://example.org/channel/>  <http://purl.org/rss/1.0/items>  <genid1>

//after tha i am trying to serialize the Model object by creating the
object of    raptor_statement* and then setting subject, subject_type, and
so on..... but after blank node serialization i get segmentation fault
when it tries to serialize rdf:li elements ....

RDF Serialization....

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:nodeID="http://example.org/channel/">
    <rdf:type rdf:nodeID="http://purl.org/rss/1.0/channel"/>
  </rdf:Description>
  <rdf:Description rdf:about="genid1">
    <rdf:type rdf:nodeID="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/>
  </rdf:Description>
Segmentation fault


My code is as below:
//where serializer is the object of raptor serializer and rstatement is
the //raptor_statement object

 serializer = raptor_new_serializer("rdfxml");

 raptor_statement rstatement;

 raptor_serializer_set_error_handler(serializer,NULL,
rdf_serializer_error_handler);

 raptor_serializer_set_warning_handler(serializer,NULL,
rdf_serializer_warning_handler);

 raptor_serialize_statement(serializer,&rstatement);


> On Wed, 2005-07-27 at 14:23 -0400, Vinay Solanki wrote:
>> Hi All,
>>
>>  While parsing the following RDF document
>>
>>  <?xml version="1.0"?>
>> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
>>   <!-- Test rdf:Seq with rdf:li and literal XML content -->
>>   <rdf:Description rdf:about="http://example.com/somewhere/">
>>     <a:foo xmlns:a="http://example.com/properties/">
>>       <rdf:Seq>
>>         <rdf:li rdf:parseType="Literal">some literal text</rdf:li>
>>       </rdf:Seq>
>>     </a:foo>
>>   </rdf:Description>
>> </rdf:RDF>
>>
>>  I am getting segmentation fault where as many other RDF example
>> document
>> from the tests/ dir in Raptor works fine.
>>
>> Error:
>>
>>  <genid1>  <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq>
>> Segmentation fault
>
> I can't duplicate this.  You'll need to provide some more information
> such as a gdb backtrace and your operating system information.  If you
> like, you can use http://bugs.librdf.org/ to help record info more
> formerly and add any attachments such as log files you need.
>
> However before that check that you haven't got multiple versions of
> raptor hanging about and somehow are linking against different ones.
>
> Dave
>
>
>


-- 
*Trouble shared is trouble halved--joy shared is joy doubled*

Thanks & Regards
Vinay Solanki
Research Associate,
Endicott Interconnect Technologies
Dept of Computer Science
SUNY - Binghamton



More information about the redland-dev mailing list