← Back to team overview

zorba-coders team mailing list archive

[Bug 928135] Re: Segmentation fault while using Item or ItemFactory class in python

 

I have been reviewing this Segmentation fault you get, and looking at
the implementation of the api for python it does make sense to get this
error, the problem here is that calling the function
zorba_api.ItemFactory() creates an item of the ItemFactory class with no
actual initialization so when trying to access functions of this class
it breaks with a segmentation error sinc ethe functions does not exist
for an ItemFactory started that way.

A way to get acces to the itemFactory functions so it doesn't break is:

>>> import zorba_api
>>> store = zorba_api.InMemoryStore_getInstance()
>>> zorba = zorba_api.Zorba_getInstance(store)
>>> content_item = zorba.getItemFactory()
>>> content_item.createInteger(4)

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/928135

Title:
  Segmentation fault while using Item or ItemFactory class in python

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Here's the code to reproduce errors:

  >>> import zorba_api
  >>> item = zorba_api.ItemFactory()
  >>> content_item.createInteger(4)
  Segmentation fault


  Zorba Version: 2.1.0

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/928135/+subscriptions


References