[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-12 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-12 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug935639-2012-03-12T23-14-08.66Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-12 Thread Zorba Build Bot
Validation queue job bug935639-2012-03-12T23-14-08.66Z is finished. The final 
status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-12 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-11 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-11 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug935639-2012-03-12T01-12-03.818Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-11 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-10 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-10 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-10 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 
(message):
  Validation queue job bug935639-2012-03-11T01-05-09.922Z is finished.  The
  final status was:

  

  3 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-10 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Approved = Rejected

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Rejected = Work in progress

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Zorba Build Bot
There are additional revisions which have not been approved in review. Please 
seek review and approval of these new revisions.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Rodolfo Ochoa
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Commit Message changed to:

This fixes the error:
n strings remain in the pool.
and change it to a more comprehensive error with reference to document that 
helps to prevent the error.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 
(message):
  Validation queue job bug935639-2012-03-07T22-33-06.388Z is finished.  The
  final status was:

  

  No tests were run - build or configure step must have failed.

  Not commiting changes.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug935639 into lp:zorba has been 
updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug935639-2012-03-07T22-33-06.388Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-03-06 Thread Markos Zaharioudakis
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-02-28 Thread Cezar Andrei
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug935639 into lp:zorba

2012-02-27 Thread Rodolfo Ochoa
Rodolfo Ochoa has proposed merging lp:~zorba-coders/zorba/bug935639 into 
lp:zorba.

Requested reviews:
  Cezar Andrei (cezar-andrei)
  Matthias Brantner (matthias-brantner)
Related bugs:
  Bug #935639 in Zorba: Closing without releasing objects
  https://bugs.launchpad.net/zorba/+bug/935639

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900

The problem can't be solved by technical means, the developer have to take care 
of resource usage, as in C++ the user must release all objects before shutdown 
the store, the same thing applies for XQJ.
So. the best workaround this problem is to show a more friendly message around 
the Strings Pool and create documentation that explain this issue. At the end, 
this issue affects every API usage from our clients.
Please check my changes and help me with English usage in the new document I 
created.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/zorba/indexpage.dox.in'
--- doc/zorba/indexpage.dox.in	2012-01-03 18:03:54 +
+++ doc/zorba/indexpage.dox.in	2012-02-28 02:26:20 +
@@ -29,6 +29,8 @@
 - \ref ft_thesaurus
   - \ref errors_warnings
   - \ref impl_dep_features
+  - \ref memory_management
+  - \ref memory_leaks
 
 \section xqlib XQuery Modules
  - a href=../xqdoc/xhtml/index.htmlXQuery Module Library/a

=== added file 'doc/zorba/memory_leaks.dox'
--- doc/zorba/memory_leaks.dox	1970-01-01 00:00:00 +
+++ doc/zorba/memory_leaks.dox	2012-02-28 02:26:20 +
@@ -0,0 +1,146 @@
+/** \page memory_leaks Memory Leaks
+
+\section memory_leaks_intro Introduction
+
+The Zorba XQuery processor manage automatically its own memory, but still, there are cases where you may receive the following message:
+
+\code
+Zorba did not close properly, objects may still in memory while shutdown the store. For help avoiding this message please refer to http://www.zorba-xquery.com/memory_leaks.
+ID: 1   Referenced URI:  [..uri...]
+...
+
+Zorba Internal Fatal Error in 
+[n] referenced URIs remain in the string pool.
+\endcode
+
+
+This message means the store is being shutdown, but there are still URIs strings in the pool because 
+there are still references (smart pointers) to those strings.  
+The references may be somewhere in the zorba engine (which usually means there is a memory leak) or in the application. 
+For the application, the rule is that before shutting down the store, 
+all variables storing references to zorba objects must have gone out of scope, or explicitly set to NULL.
+
+So, strictly speaking, your program is leaking resources.
+
+There are several cases using Zorba's APIs in C++ or other languages where you can produce this error besides everything looks correct in your code, here is an example:
+
+
+\section memory_leaks_example_c Example in C++
+Here is a code example that shows how a StaticContext and a Query are pointing to the URI http://www.foo.com, 
+and they are still in memory when the store is being shutdown.
+
+\code
+int main(int argc, char* argv[])
+{
+  void* lStore = zorba::StoreManager::getStore();
+  Zorba* lZorba = Zorba::getInstance(lStore);
+  
+  StaticContext_t lContext = lZorba-createStaticContext();
+  lContext-addNamespace(foo, http://www.foo.com;);
+  XQuery_t lQuery = lZorba-compileQuery(foo:e/, lContext);
+  lQuery-execute();
+  
+  lZorba-shutdown();
+  zorba::StoreManager::shutdownStore(lStore);
+  return 0;
+}
+\endcode
+
+So, for this scenario, the ideal way to solve the problem is through scopes, 
+where you implement certain part of code in methods and release them when the objects loose their reference. 
+Other way to do it, is to explicitely set the object to null, the autopointer automatically will free the object.
+
+Solution example:
+\code
+int main(int argc, char* argv[])
+{
+  void* lStore = zorba::StoreManager::getStore();
+  Zorba* lZorba = Zorba::getInstance(lStore);
+  
+  {  // Use a scope
+
+  StaticContext_t lContext = lZorba-createStaticContext();
+lContext-addNamespace(foo, http://www.foo.com;);
+XQuery_t lQuery = lZorba-compileQuery(foo:e/, lContext);
+lQuery-execute();
+lContext = NULL;  // or explicitely free the resource
+lQuery = NULL;
+  }
+  lZorba-shutdown();
+  zorba::StoreManager::shutdownStore(lStore);
+  return 0;
+}
+\endcode
+
+
+\section memory_leaks_example_java Example in Java
+This particular error is specially notorious when a memory managed language 
+shows the error because you expect the language frees all memory, here is an example:
+
+\code
+  public static void main ( String argv[] )
+  {
+InMemoryStore store = InMemoryStore.getInstance();
+Zorba zorba = Zorba.getInstance ( store );
+
+StaticContext context = zorba.createStaticContext();
+context.addNamespace(foo, http://www.foo.com;);
+XQuery query = zorba.compileQuery(foo:e/, context);
+String result = query.execute();
+
+