Assertion failed: (result.first != result.second)

Bug #1044245 reported by William Candillon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Paul J. Lucas

Bug Description

The following query:
declare namespace foo = "http://www.example.com";

declare context item := <foo:foo><foo:bar /></foo:foo>;

{ foo : bar }

Returns:
Assertion failed: (result.first != result.second), function lookup, file /Users/wcandillon/28msec/zorba/sandbox/src/diagnostics/dict.cpp, line 80.
Abort trap: 6

Related branches

Revision history for this message
William Candillon (wcandillon) wrote :

Assigned to you for dispatching.

Changed in zorba:
assignee: nobody → Chris Hillery (ceejatec)
Revision history for this message
Chris Hillery (ceejatec) wrote :

This is happening because an entry is missing from diagnostics_en.xml, at least that is my understanding. It is happening a lot with JSONiq features.

The assertion is probably useful, but it doesn't give enough information. We need it to explicitly say "I am crapping out because you used the key "~FooBarBaz" in an error but there is no localized value for that key in diagnostics_en.xml", possibly even with a pointer to the correct file to update and where the missing data should be placed.

Changed in zorba:
assignee: Chris Hillery (ceejatec) → Paul J. Lucas (paul-lucas)
importance: Undecided → High
Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

FYI: I didn't put that assert() there -- Markos did. It comes down to this question: do you want a customer's application to crash with an error message because somebody forgot to put in a dictionary string (and a test for it) or would you rather it simply print the key (as my original code before Markos' change did)?

Changed in zorba:
status: New → In Progress
Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.