[Zorba-coders] [Bug 1024892] Re: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.
** Changed in: zorba Assignee: Matthias Brantner (matthias-brantner) = Markos Zaharioudakis (markos-za) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/1024892 Title: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed. Status in Zorba - The XQuery Processor: New Bug description: Compiling the following query: module namespace guestbook = http://www.28msec.com/templates/guestbook/guestbook;; import module namespace functx = http://www.functx.com/;; import module namespace db = http://www.zorba-xquery.com/modules/store/static/collections/dml;; import module namespace idx = http://www.zorba-xquery.com/modules/store/static/indexes/dml;; declare namespace an = http://www.zorba-xquery.com/annotations;; declare collection guestbook:entries as node()*; declare variable $guestbook:entries as xs:QName := xs:QName(guestbook:entries); (: Access a document range :) declare %private %an:automatic %an:unique %an:value-range index guestbook:by-date on nodes db:collection(xs:QName('guestbook:entries')) by guestbook:convert-dateTime(@datetime) as xs:dateTime; declare %private variable $guestbook:by-date as xs:QName := xs:QName('guestbook:by-date'); declare function guestbook:convert-dateTime($dateTime as xs:string) as xs:dateTime { current-dateTime() }; Results in 0 libzorba_simplestore.2.5.0.dylib0x00010932780a _ZN5zorba16assertion_failedEPKcS1_iS1_ + 74 1 libzorba_simplestore.2.5.0.dylib0x000109488cbf _ZN5zorba13user_function8optimizeEPNS_10CompilerCBE + 1259 2 libzorba_simplestore.2.5.0.dylib0x00010921ab66 _ZN5zorba9MarkExprs5applyERNS_15RewriterContextEPNS_4exprERb + 150 3 libzorba_simplestore.2.5.0.dylib0x00010920ab69 _ZN5zorba15RuleMajorDriver7rewriteERNS_15RewriterContextE + 125 4 libzorba_simplestore.2.5.0.dylib0x00010920bdc2 _ZN5zorba16DefaultOptimizer7rewriteERNS_15RewriterContextE + 304 5 libzorba_simplestore.2.5.0.dylib0x00010914d938 _ZN5zorba14TranslatorImpl9end_visitERKNS_12IndexKeyListEPv + 5482 6 libzorba_simplestore.2.5.0.dylib0x0001090f706c _ZNK5zorba13AST_IndexDecl6acceptERNS_17parsenode_visitorE + 78 7 libzorba_simplestore.2.5.0.dylib0x0001090fd4a2 _ZNK5zorba12VFO_DeclList6acceptERNS_17parsenode_visitorE + 64 8 libzorba_simplestore.2.5.0.dylib0x0001090f5b12 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 78 9 libzorba_simplestore.2.5.0.dylib0x0001090f5a9a _ZNK5zorba13LibraryModule6acceptERNS_17parsenode_visitorE + 96 10 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 11 libzorba_simplestore.2.5.0.dylib0x000109142381 _ZN5zorba14TranslatorImpl9end_visitERKNS_12ModuleImportEPv + 7243 12 libzorba_simplestore.2.5.0.dylib0x0001090fd432 _ZNK5zorba13SIND_DeclList6acceptERNS_17parsenode_visitorE + 206 13 libzorba_simplestore.2.5.0.dylib0x0001090f5b00 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 60 14 libzorba_simplestore.2.5.0.dylib0x0001090f59fe _ZNK5zorba10MainModule6acceptERNS_17parsenode_visitorE + 78 15 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 16 libzorba_simplestore.2.5.0.dylib0x00010912ad3e _ZN5zorba9translateERKNS_9parsenodeEPNS_10CompilerCBE + 446 17 libzorba_simplestore.2.5.0.dylib0x0001092344b6 _ZN5zorba14XQueryCompiler9normalizeENS_8rchandleINS_9parsenodeEEE + 34 18 libzorba_simplestore.2.5.0.dylib0x0001092345cc _ZN5zorba14XQueryCompiler7compileERKNS_8rchandleINS_9parsenodeEEEbRNS1_INS_4exprEEERmRNS_5audit12ScopedRecordE + 130 19 libzorba_simplestore.2.5.0.dylib0x0001092355a8 _ZN5zorba14XQueryCompiler7compileERSiRKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERm + 534 20 libzorba_simplestore.2.5.0.dylib0x000109065551 _ZN5zorba10XQueryImpl9doCompileERSiRK19Zorba_CompilerHintsbRm + 861 21 libzorba_simplestore.2.5.0.dylib0x000109065cce _ZN5zorba10XQueryImpl7compileERSiRKNS_8SmartPtrINS_13StaticContextEEERK19Zorba_CompilerHints + 518 22 zorba 0x0001090437b9 _Z17compileAndExecutePN5zorba5ZorbaERK18ZorbaCMDPropertiesRNS_8SmartPtrINS_13StaticContextEEERKSsRSiRSoR10TimingInfo + 1705 23 zorba
[Zorba-coders] [Bug 1024892] Re: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.
The problem is that the key expression in the index declaration accesses a function of the module. However, this function doesn't seem to be compiled, yet. As a side-node, the example above should raise an error because the key expression tries to access the dynamic context (because of fn:current- dateTime) which is not allowed. -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/1024892 Title: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed. Status in Zorba - The XQuery Processor: New Bug description: Compiling the following query: module namespace guestbook = http://www.28msec.com/templates/guestbook/guestbook;; import module namespace functx = http://www.functx.com/;; import module namespace db = http://www.zorba-xquery.com/modules/store/static/collections/dml;; import module namespace idx = http://www.zorba-xquery.com/modules/store/static/indexes/dml;; declare namespace an = http://www.zorba-xquery.com/annotations;; declare collection guestbook:entries as node()*; declare variable $guestbook:entries as xs:QName := xs:QName(guestbook:entries); (: Access a document range :) declare %private %an:automatic %an:unique %an:value-range index guestbook:by-date on nodes db:collection(xs:QName('guestbook:entries')) by guestbook:convert-dateTime(@datetime) as xs:dateTime; declare %private variable $guestbook:by-date as xs:QName := xs:QName('guestbook:by-date'); declare function guestbook:convert-dateTime($dateTime as xs:string) as xs:dateTime { current-dateTime() }; Results in 0 libzorba_simplestore.2.5.0.dylib0x00010932780a _ZN5zorba16assertion_failedEPKcS1_iS1_ + 74 1 libzorba_simplestore.2.5.0.dylib0x000109488cbf _ZN5zorba13user_function8optimizeEPNS_10CompilerCBE + 1259 2 libzorba_simplestore.2.5.0.dylib0x00010921ab66 _ZN5zorba9MarkExprs5applyERNS_15RewriterContextEPNS_4exprERb + 150 3 libzorba_simplestore.2.5.0.dylib0x00010920ab69 _ZN5zorba15RuleMajorDriver7rewriteERNS_15RewriterContextE + 125 4 libzorba_simplestore.2.5.0.dylib0x00010920bdc2 _ZN5zorba16DefaultOptimizer7rewriteERNS_15RewriterContextE + 304 5 libzorba_simplestore.2.5.0.dylib0x00010914d938 _ZN5zorba14TranslatorImpl9end_visitERKNS_12IndexKeyListEPv + 5482 6 libzorba_simplestore.2.5.0.dylib0x0001090f706c _ZNK5zorba13AST_IndexDecl6acceptERNS_17parsenode_visitorE + 78 7 libzorba_simplestore.2.5.0.dylib0x0001090fd4a2 _ZNK5zorba12VFO_DeclList6acceptERNS_17parsenode_visitorE + 64 8 libzorba_simplestore.2.5.0.dylib0x0001090f5b12 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 78 9 libzorba_simplestore.2.5.0.dylib0x0001090f5a9a _ZNK5zorba13LibraryModule6acceptERNS_17parsenode_visitorE + 96 10 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 11 libzorba_simplestore.2.5.0.dylib0x000109142381 _ZN5zorba14TranslatorImpl9end_visitERKNS_12ModuleImportEPv + 7243 12 libzorba_simplestore.2.5.0.dylib0x0001090fd432 _ZNK5zorba13SIND_DeclList6acceptERNS_17parsenode_visitorE + 206 13 libzorba_simplestore.2.5.0.dylib0x0001090f5b00 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 60 14 libzorba_simplestore.2.5.0.dylib0x0001090f59fe _ZNK5zorba10MainModule6acceptERNS_17parsenode_visitorE + 78 15 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 16 libzorba_simplestore.2.5.0.dylib0x00010912ad3e _ZN5zorba9translateERKNS_9parsenodeEPNS_10CompilerCBE + 446 17 libzorba_simplestore.2.5.0.dylib0x0001092344b6 _ZN5zorba14XQueryCompiler9normalizeENS_8rchandleINS_9parsenodeEEE + 34 18 libzorba_simplestore.2.5.0.dylib0x0001092345cc _ZN5zorba14XQueryCompiler7compileERKNS_8rchandleINS_9parsenodeEEEbRNS1_INS_4exprEEERmRNS_5audit12ScopedRecordE + 130 19 libzorba_simplestore.2.5.0.dylib0x0001092355a8 _ZN5zorba14XQueryCompiler7compileERSiRKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERm + 534 20 libzorba_simplestore.2.5.0.dylib0x000109065551 _ZN5zorba10XQueryImpl9doCompileERSiRK19Zorba_CompilerHintsbRm + 861 21 libzorba_simplestore.2.5.0.dylib0x000109065cce _ZN5zorba10XQueryImpl7compileERSiRKNS_8SmartPtrINS_13StaticContextEEERK19Zorba_CompilerHints + 518 22
Re: [Zorba-coders] [Bug 1024892] Re: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.
Yes, you can replace current-dateTime() by 1 if it is easier to fix the problem. In fact the real example wasn't using current-dateTime(). On Mon, Jul 16, 2012 at 6:48 PM, Matthias Brantner 1024...@bugs.launchpad.net wrote: The problem is that the key expression in the index declaration accesses a function of the module. However, this function doesn't seem to be compiled, yet. As a side-node, the example above should raise an error because the key expression tries to access the dynamic context (because of fn:current- dateTime) which is not allowed. -- You received this bug notification because you are subscribed to the bug report. https://bugs.launchpad.net/bugs/1024892 Title: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed. Status in Zorba - The XQuery Processor: New Bug description: Compiling the following query: module namespace guestbook = http://www.28msec.com/templates/guestbook/guestbook;; import module namespace functx = http://www.functx.com/;; import module namespace db = http://www.zorba-xquery.com/modules/store/static/collections/dml;; import module namespace idx = http://www.zorba-xquery.com/modules/store/static/indexes/dml;; declare namespace an = http://www.zorba-xquery.com/annotations;; declare collection guestbook:entries as node()*; declare variable $guestbook:entries as xs:QName := xs:QName(guestbook:entries); (: Access a document range :) declare %private %an:automatic %an:unique %an:value-range index guestbook:by-date on nodes db:collection(xs:QName('guestbook:entries')) by guestbook:convert-dateTime(@datetime) as xs:dateTime; declare %private variable $guestbook:by-date as xs:QName := xs:QName('guestbook:by-date'); declare function guestbook:convert-dateTime($dateTime as xs:string) as xs:dateTime { current-dateTime() }; Results in 0 libzorba_simplestore.2.5.0.dylib0x00010932780a _ZN5zorba16assertion_failedEPKcS1_iS1_ + 74 1 libzorba_simplestore.2.5.0.dylib0x000109488cbf _ZN5zorba13user_function8optimizeEPNS_10CompilerCBE + 1259 2 libzorba_simplestore.2.5.0.dylib0x00010921ab66 _ZN5zorba9MarkExprs5applyERNS_15RewriterContextEPNS_4exprERb + 150 3 libzorba_simplestore.2.5.0.dylib0x00010920ab69 _ZN5zorba15RuleMajorDriver7rewriteERNS_15RewriterContextE + 125 4 libzorba_simplestore.2.5.0.dylib0x00010920bdc2 _ZN5zorba16DefaultOptimizer7rewriteERNS_15RewriterContextE + 304 5 libzorba_simplestore.2.5.0.dylib0x00010914d938 _ZN5zorba14TranslatorImpl9end_visitERKNS_12IndexKeyListEPv + 5482 6 libzorba_simplestore.2.5.0.dylib0x0001090f706c _ZNK5zorba13AST_IndexDecl6acceptERNS_17parsenode_visitorE + 78 7 libzorba_simplestore.2.5.0.dylib0x0001090fd4a2 _ZNK5zorba12VFO_DeclList6acceptERNS_17parsenode_visitorE + 64 8 libzorba_simplestore.2.5.0.dylib0x0001090f5b12 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 78 9 libzorba_simplestore.2.5.0.dylib0x0001090f5a9a _ZNK5zorba13LibraryModule6acceptERNS_17parsenode_visitorE + 96 10 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 11 libzorba_simplestore.2.5.0.dylib0x000109142381 _ZN5zorba14TranslatorImpl9end_visitERKNS_12ModuleImportEPv + 7243 12 libzorba_simplestore.2.5.0.dylib0x0001090fd432 _ZNK5zorba13SIND_DeclList6acceptERNS_17parsenode_visitorE + 206 13 libzorba_simplestore.2.5.0.dylib0x0001090f5b00 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 60 14 libzorba_simplestore.2.5.0.dylib0x0001090f59fe _ZNK5zorba10MainModule6acceptERNS_17parsenode_visitorE + 78 15 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 16 libzorba_simplestore.2.5.0.dylib0x00010912ad3e _ZN5zorba9translateERKNS_9parsenodeEPNS_10CompilerCBE + 446 17 libzorba_simplestore.2.5.0.dylib0x0001092344b6 _ZN5zorba14XQueryCompiler9normalizeENS_8rchandleINS_9parsenodeEEE + 34 18 libzorba_simplestore.2.5.0.dylib0x0001092345cc _ZN5zorba14XQueryCompiler7compileERKNS_8rchandleINS_9parsenodeEEEbRNS1_INS_4exprEEERmRNS_5audit12ScopedRecordE + 130 19 libzorba_simplestore.2.5.0.dylib0x0001092355a8 _ZN5zorba14XQueryCompiler7compileERSiRKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERm + 534 20
[Zorba-coders] [Bug 1024892] Re: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.
The failing expression is by guestbook:convert-dateTime(@datetime) ** Changed in: zorba Milestone: None = 2.7 ** Changed in: zorba Assignee: (unassigned) = Chris Hillery (ceejatec) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/1024892 Title: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed. Status in Zorba - The XQuery Processor: New Bug description: Compiling the following query: module namespace guestbook = http://www.28msec.com/templates/guestbook/guestbook;; import module namespace functx = http://www.functx.com/;; import module namespace db = http://www.zorba-xquery.com/modules/store/static/collections/dml;; import module namespace idx = http://www.zorba-xquery.com/modules/store/static/indexes/dml;; declare namespace an = http://www.zorba-xquery.com/annotations;; declare collection guestbook:entries as node()*; declare variable $guestbook:entries as xs:QName := xs:QName(guestbook:entries); (: Access a document range :) declare %private %an:automatic %an:unique %an:value-range index guestbook:by-date on nodes db:collection(xs:QName('guestbook:entries')) by guestbook:convert-dateTime(@datetime) as xs:dateTime; declare %private variable $guestbook:by-date as xs:QName := xs:QName('guestbook:by-date'); declare function guestbook:convert-dateTime($dateTime as xs:string) as xs:dateTime { current-dateTime() }; Results in 0 libzorba_simplestore.2.5.0.dylib0x00010932780a _ZN5zorba16assertion_failedEPKcS1_iS1_ + 74 1 libzorba_simplestore.2.5.0.dylib0x000109488cbf _ZN5zorba13user_function8optimizeEPNS_10CompilerCBE + 1259 2 libzorba_simplestore.2.5.0.dylib0x00010921ab66 _ZN5zorba9MarkExprs5applyERNS_15RewriterContextEPNS_4exprERb + 150 3 libzorba_simplestore.2.5.0.dylib0x00010920ab69 _ZN5zorba15RuleMajorDriver7rewriteERNS_15RewriterContextE + 125 4 libzorba_simplestore.2.5.0.dylib0x00010920bdc2 _ZN5zorba16DefaultOptimizer7rewriteERNS_15RewriterContextE + 304 5 libzorba_simplestore.2.5.0.dylib0x00010914d938 _ZN5zorba14TranslatorImpl9end_visitERKNS_12IndexKeyListEPv + 5482 6 libzorba_simplestore.2.5.0.dylib0x0001090f706c _ZNK5zorba13AST_IndexDecl6acceptERNS_17parsenode_visitorE + 78 7 libzorba_simplestore.2.5.0.dylib0x0001090fd4a2 _ZNK5zorba12VFO_DeclList6acceptERNS_17parsenode_visitorE + 64 8 libzorba_simplestore.2.5.0.dylib0x0001090f5b12 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 78 9 libzorba_simplestore.2.5.0.dylib0x0001090f5a9a _ZNK5zorba13LibraryModule6acceptERNS_17parsenode_visitorE + 96 10 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 11 libzorba_simplestore.2.5.0.dylib0x000109142381 _ZN5zorba14TranslatorImpl9end_visitERKNS_12ModuleImportEPv + 7243 12 libzorba_simplestore.2.5.0.dylib0x0001090fd432 _ZNK5zorba13SIND_DeclList6acceptERNS_17parsenode_visitorE + 206 13 libzorba_simplestore.2.5.0.dylib0x0001090f5b00 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 60 14 libzorba_simplestore.2.5.0.dylib0x0001090f59fe _ZNK5zorba10MainModule6acceptERNS_17parsenode_visitorE + 78 15 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 16 libzorba_simplestore.2.5.0.dylib0x00010912ad3e _ZN5zorba9translateERKNS_9parsenodeEPNS_10CompilerCBE + 446 17 libzorba_simplestore.2.5.0.dylib0x0001092344b6 _ZN5zorba14XQueryCompiler9normalizeENS_8rchandleINS_9parsenodeEEE + 34 18 libzorba_simplestore.2.5.0.dylib0x0001092345cc _ZN5zorba14XQueryCompiler7compileERKNS_8rchandleINS_9parsenodeEEEbRNS1_INS_4exprEEERmRNS_5audit12ScopedRecordE + 130 19 libzorba_simplestore.2.5.0.dylib0x0001092355a8 _ZN5zorba14XQueryCompiler7compileERSiRKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERm + 534 20 libzorba_simplestore.2.5.0.dylib0x000109065551 _ZN5zorba10XQueryImpl9doCompileERSiRK19Zorba_CompilerHintsbRm + 861 21 libzorba_simplestore.2.5.0.dylib0x000109065cce _ZN5zorba10XQueryImpl7compileERSiRKNS_8SmartPtrINS_13StaticContextEEERK19Zorba_CompilerHints + 518 22 zorba 0x0001090437b9
[Zorba-coders] [Bug 1024892] Re: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.
Assigned to you for dispatching. I believe that it is quite trivial to fix. ** Changed in: zorba Importance: Undecided = High -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/1024892 Title: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed. Status in Zorba - The XQuery Processor: New Bug description: Compiling the following query: module namespace guestbook = http://www.28msec.com/templates/guestbook/guestbook;; import module namespace functx = http://www.functx.com/;; import module namespace db = http://www.zorba-xquery.com/modules/store/static/collections/dml;; import module namespace idx = http://www.zorba-xquery.com/modules/store/static/indexes/dml;; declare namespace an = http://www.zorba-xquery.com/annotations;; declare collection guestbook:entries as node()*; declare variable $guestbook:entries as xs:QName := xs:QName(guestbook:entries); (: Access a document range :) declare %private %an:automatic %an:unique %an:value-range index guestbook:by-date on nodes db:collection(xs:QName('guestbook:entries')) by guestbook:convert-dateTime(@datetime) as xs:dateTime; declare %private variable $guestbook:by-date as xs:QName := xs:QName('guestbook:by-date'); declare function guestbook:convert-dateTime($dateTime as xs:string) as xs:dateTime { current-dateTime() }; Results in 0 libzorba_simplestore.2.5.0.dylib0x00010932780a _ZN5zorba16assertion_failedEPKcS1_iS1_ + 74 1 libzorba_simplestore.2.5.0.dylib0x000109488cbf _ZN5zorba13user_function8optimizeEPNS_10CompilerCBE + 1259 2 libzorba_simplestore.2.5.0.dylib0x00010921ab66 _ZN5zorba9MarkExprs5applyERNS_15RewriterContextEPNS_4exprERb + 150 3 libzorba_simplestore.2.5.0.dylib0x00010920ab69 _ZN5zorba15RuleMajorDriver7rewriteERNS_15RewriterContextE + 125 4 libzorba_simplestore.2.5.0.dylib0x00010920bdc2 _ZN5zorba16DefaultOptimizer7rewriteERNS_15RewriterContextE + 304 5 libzorba_simplestore.2.5.0.dylib0x00010914d938 _ZN5zorba14TranslatorImpl9end_visitERKNS_12IndexKeyListEPv + 5482 6 libzorba_simplestore.2.5.0.dylib0x0001090f706c _ZNK5zorba13AST_IndexDecl6acceptERNS_17parsenode_visitorE + 78 7 libzorba_simplestore.2.5.0.dylib0x0001090fd4a2 _ZNK5zorba12VFO_DeclList6acceptERNS_17parsenode_visitorE + 64 8 libzorba_simplestore.2.5.0.dylib0x0001090f5b12 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 78 9 libzorba_simplestore.2.5.0.dylib0x0001090f5a9a _ZNK5zorba13LibraryModule6acceptERNS_17parsenode_visitorE + 96 10 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 11 libzorba_simplestore.2.5.0.dylib0x000109142381 _ZN5zorba14TranslatorImpl9end_visitERKNS_12ModuleImportEPv + 7243 12 libzorba_simplestore.2.5.0.dylib0x0001090fd432 _ZNK5zorba13SIND_DeclList6acceptERNS_17parsenode_visitorE + 206 13 libzorba_simplestore.2.5.0.dylib0x0001090f5b00 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 60 14 libzorba_simplestore.2.5.0.dylib0x0001090f59fe _ZNK5zorba10MainModule6acceptERNS_17parsenode_visitorE + 78 15 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 16 libzorba_simplestore.2.5.0.dylib0x00010912ad3e _ZN5zorba9translateERKNS_9parsenodeEPNS_10CompilerCBE + 446 17 libzorba_simplestore.2.5.0.dylib0x0001092344b6 _ZN5zorba14XQueryCompiler9normalizeENS_8rchandleINS_9parsenodeEEE + 34 18 libzorba_simplestore.2.5.0.dylib0x0001092345cc _ZN5zorba14XQueryCompiler7compileERKNS_8rchandleINS_9parsenodeEEEbRNS1_INS_4exprEEERmRNS_5audit12ScopedRecordE + 130 19 libzorba_simplestore.2.5.0.dylib0x0001092355a8 _ZN5zorba14XQueryCompiler7compileERSiRKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERm + 534 20 libzorba_simplestore.2.5.0.dylib0x000109065551 _ZN5zorba10XQueryImpl9doCompileERSiRK19Zorba_CompilerHintsbRm + 861 21 libzorba_simplestore.2.5.0.dylib0x000109065cce _ZN5zorba10XQueryImpl7compileERSiRKNS_8SmartPtrINS_13StaticContextEEERK19Zorba_CompilerHints + 518 22 zorba 0x0001090437b9 _Z17compileAndExecutePN5zorba5ZorbaERK18ZorbaCMDPropertiesRNS_8SmartPtrINS_13StaticContextEEERKSsRSiRSoR10TimingInfo + 1705 23 zorba
[Zorba-coders] [Bug 1024892] Re: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed.
I'm not totally sure who to dispatch to - I would normally think Markos, but he's going to be on vacation for the next week and a half. Matthias, would this be something you could look at, or else could you re-assign it to someone more appropriate? ** Changed in: zorba Assignee: Chris Hillery (ceejatec) = Matthias Brantner (matthias-brantner) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/1024892 Title: Zorba error [zerr:ZXQP0002]: theBodyExpr: assertion failed. Status in Zorba - The XQuery Processor: New Bug description: Compiling the following query: module namespace guestbook = http://www.28msec.com/templates/guestbook/guestbook;; import module namespace functx = http://www.functx.com/;; import module namespace db = http://www.zorba-xquery.com/modules/store/static/collections/dml;; import module namespace idx = http://www.zorba-xquery.com/modules/store/static/indexes/dml;; declare namespace an = http://www.zorba-xquery.com/annotations;; declare collection guestbook:entries as node()*; declare variable $guestbook:entries as xs:QName := xs:QName(guestbook:entries); (: Access a document range :) declare %private %an:automatic %an:unique %an:value-range index guestbook:by-date on nodes db:collection(xs:QName('guestbook:entries')) by guestbook:convert-dateTime(@datetime) as xs:dateTime; declare %private variable $guestbook:by-date as xs:QName := xs:QName('guestbook:by-date'); declare function guestbook:convert-dateTime($dateTime as xs:string) as xs:dateTime { current-dateTime() }; Results in 0 libzorba_simplestore.2.5.0.dylib0x00010932780a _ZN5zorba16assertion_failedEPKcS1_iS1_ + 74 1 libzorba_simplestore.2.5.0.dylib0x000109488cbf _ZN5zorba13user_function8optimizeEPNS_10CompilerCBE + 1259 2 libzorba_simplestore.2.5.0.dylib0x00010921ab66 _ZN5zorba9MarkExprs5applyERNS_15RewriterContextEPNS_4exprERb + 150 3 libzorba_simplestore.2.5.0.dylib0x00010920ab69 _ZN5zorba15RuleMajorDriver7rewriteERNS_15RewriterContextE + 125 4 libzorba_simplestore.2.5.0.dylib0x00010920bdc2 _ZN5zorba16DefaultOptimizer7rewriteERNS_15RewriterContextE + 304 5 libzorba_simplestore.2.5.0.dylib0x00010914d938 _ZN5zorba14TranslatorImpl9end_visitERKNS_12IndexKeyListEPv + 5482 6 libzorba_simplestore.2.5.0.dylib0x0001090f706c _ZNK5zorba13AST_IndexDecl6acceptERNS_17parsenode_visitorE + 78 7 libzorba_simplestore.2.5.0.dylib0x0001090fd4a2 _ZNK5zorba12VFO_DeclList6acceptERNS_17parsenode_visitorE + 64 8 libzorba_simplestore.2.5.0.dylib0x0001090f5b12 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 78 9 libzorba_simplestore.2.5.0.dylib0x0001090f5a9a _ZNK5zorba13LibraryModule6acceptERNS_17parsenode_visitorE + 96 10 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 11 libzorba_simplestore.2.5.0.dylib0x000109142381 _ZN5zorba14TranslatorImpl9end_visitERKNS_12ModuleImportEPv + 7243 12 libzorba_simplestore.2.5.0.dylib0x0001090fd432 _ZNK5zorba13SIND_DeclList6acceptERNS_17parsenode_visitorE + 206 13 libzorba_simplestore.2.5.0.dylib0x0001090f5b00 _ZNK5zorba6Prolog6acceptERNS_17parsenode_visitorE + 60 14 libzorba_simplestore.2.5.0.dylib0x0001090f59fe _ZNK5zorba10MainModule6acceptERNS_17parsenode_visitorE + 78 15 libzorba_simplestore.2.5.0.dylib0x00010912afa9 _ZN5zorbaL13translate_auxEPNS_14TranslatorImplERKNS_9parsenodeEPNS_14static_contextEmPNS_11ModulesInfoERKSt3mapINS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcESI_St4lessISI_ESaISt4pairIKSI_SI_EEEbNS_19StaticContextConsts16xquery_version_tE + 105 16 libzorba_simplestore.2.5.0.dylib0x00010912ad3e _ZN5zorba9translateERKNS_9parsenodeEPNS_10CompilerCBE + 446 17 libzorba_simplestore.2.5.0.dylib0x0001092344b6 _ZN5zorba14XQueryCompiler9normalizeENS_8rchandleINS_9parsenodeEEE + 34 18 libzorba_simplestore.2.5.0.dylib0x0001092345cc _ZN5zorba14XQueryCompiler7compileERKNS_8rchandleINS_9parsenodeEEEbRNS1_INS_4exprEEERmRNS_5audit12ScopedRecordE + 130 19 libzorba_simplestore.2.5.0.dylib0x0001092355a8 _ZN5zorba14XQueryCompiler7compileERSiRKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERm + 534 20 libzorba_simplestore.2.5.0.dylib0x000109065551 _ZN5zorba10XQueryImpl9doCompileERSiRK19Zorba_CompilerHintsbRm + 861 21 libzorba_simplestore.2.5.0.dylib0x000109065cce