You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Lubos Toth <to...@gmail.com> on 2012/06/05 09:39:12 UTC

XalanTransformer memory leaks - fix suggestion

Hi Steven,

This is my second attempt to contact you, probably my first message sent
cca 2 weeks ago was not delivered :)

We are using Xalan-C++ library in our system. Now we are in process of
migration to VS2010. The problem is, that i found memory leaks when using
the last Xalan-C++ version 1.11 => i built Xalan-C_1_11.dll from your last
SVN sources (revision 1302529) using MS VC2010 compiler. I can tell you,
that there was not a problem in older revision of Xalan-C++ (more than 1
year old).

After long time of debugging i found out, where is the problem - my fix
proposal is in attached *.patch file => please apply my patch on Xalan-C
root SVN folder (http://svn.apache.org/repos/asf/xalan/c/trunk). In my
opinion, the problem is in "XalanTransformer" class destructor - probably
you forgot to destroy "m_topXObjectFactory" (similar like you are
destroying "m_stylesheetExecutionContext"). I mean the following call is
missing in "XalanTransformer::~XalanTransformer()":
XalanDestroy(m_memoryManager, *m_topXObjectFactory);

This modification fixes all my memory leaks. I hope, that my fix is correct
:), please let me know if i am wrong.

With best regards
Lubos

Re: XalanTransformer memory leaks - fix suggestion

Posted by Lubos Toth <to...@gmail.com>.
Hi Steven,

You are welcome :). I thank you too for your fast response.

Lubos


On Wed, Jun 6, 2012 at 7:05 AM, Steve Hathaway <sh...@e-z.net> wrote:

>  Greetings Lubos,
>
> Thanks much for the patch.  It is now installed to the svn trunk.
>
> I will now compile new binaries for my committer's web site.
>
> Sincerely,
> Steven J. Hathaway
> Xalan Documentation Project
> http://www.apache.org/~shathaway
>
>
> On 6/5/2012 4:49 AM, Lubos Toth wrote:
>
> Hi Gary,
>
> Thanks for your advice. This was my first contribution to xalan developers
> community, so i wasn`t sure what is the best way :).
> I created new issue XALANC-730 (
> https://issues.apache.org/jira/browse/XALANC-730) and attached the patch
> with my proposal of fix.
>
> Lubos
>
> On Tue, Jun 5, 2012 at 12:43 PM, Gary Gregory <ga...@gmail.com>wrote:
>
>>  Hi Lubos,
>>
>>  The best way to get this or anything changed or fixes is to create an
>> issue in the bug tracking system and attach your patch there.
>>
>> Gary
>>
>> On Jun 5, 2012, at 3:39, Lubos Toth <to...@gmail.com> wrote:
>>
>>   Hi Steven,
>>
>> This is my second attempt to contact you, probably my first message sent
>> cca 2 weeks ago was not delivered :)
>>
>> We are using Xalan-C++ library in our system. Now we are in process of
>> migration to VS2010. The problem is, that i found memory leaks when using
>> the last Xalan-C++ version 1.11 => i built Xalan-C_1_11.dll from your last
>> SVN sources (revision 1302529) using MS VC2010 compiler. I can tell you,
>> that there was not a problem in older revision of Xalan-C++ (more than 1
>> year old).
>>
>> After long time of debugging i found out, where is the problem - my fix
>> proposal is in attached *.patch file => please apply my patch on Xalan-C
>> root SVN folder (http://svn.apache.org/repos/asf/xalan/c/trunk). In my
>> opinion, the problem is in "XalanTransformer" class destructor - probably
>> you forgot to destroy "m_topXObjectFactory" (similar like you are
>> destroying "m_stylesheetExecutionContext"). I mean the following call is
>> missing in "XalanTransformer::~XalanTransformer()":
>> XalanDestroy(m_memoryManager, *m_topXObjectFactory);
>>
>> This modification fixes all my memory leaks. I hope, that my fix is
>> correct :), please let me know if i am wrong.
>>
>> With best regards
>> Lubos
>>
>>   <xalanc_fix.patch>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>
>

Re: XalanTransformer memory leaks - fix suggestion

Posted by Lubos Toth <to...@gmail.com>.
Hi Steven,

You are welcome :). I thank you too for your fast response.

Lubos


On Wed, Jun 6, 2012 at 7:05 AM, Steve Hathaway <sh...@e-z.net> wrote:

>  Greetings Lubos,
>
> Thanks much for the patch.  It is now installed to the svn trunk.
>
> I will now compile new binaries for my committer's web site.
>
> Sincerely,
> Steven J. Hathaway
> Xalan Documentation Project
> http://www.apache.org/~shathaway
>
>
> On 6/5/2012 4:49 AM, Lubos Toth wrote:
>
> Hi Gary,
>
> Thanks for your advice. This was my first contribution to xalan developers
> community, so i wasn`t sure what is the best way :).
> I created new issue XALANC-730 (
> https://issues.apache.org/jira/browse/XALANC-730) and attached the patch
> with my proposal of fix.
>
> Lubos
>
> On Tue, Jun 5, 2012 at 12:43 PM, Gary Gregory <ga...@gmail.com>wrote:
>
>>  Hi Lubos,
>>
>>  The best way to get this or anything changed or fixes is to create an
>> issue in the bug tracking system and attach your patch there.
>>
>> Gary
>>
>> On Jun 5, 2012, at 3:39, Lubos Toth <to...@gmail.com> wrote:
>>
>>   Hi Steven,
>>
>> This is my second attempt to contact you, probably my first message sent
>> cca 2 weeks ago was not delivered :)
>>
>> We are using Xalan-C++ library in our system. Now we are in process of
>> migration to VS2010. The problem is, that i found memory leaks when using
>> the last Xalan-C++ version 1.11 => i built Xalan-C_1_11.dll from your last
>> SVN sources (revision 1302529) using MS VC2010 compiler. I can tell you,
>> that there was not a problem in older revision of Xalan-C++ (more than 1
>> year old).
>>
>> After long time of debugging i found out, where is the problem - my fix
>> proposal is in attached *.patch file => please apply my patch on Xalan-C
>> root SVN folder (http://svn.apache.org/repos/asf/xalan/c/trunk). In my
>> opinion, the problem is in "XalanTransformer" class destructor - probably
>> you forgot to destroy "m_topXObjectFactory" (similar like you are
>> destroying "m_stylesheetExecutionContext"). I mean the following call is
>> missing in "XalanTransformer::~XalanTransformer()":
>> XalanDestroy(m_memoryManager, *m_topXObjectFactory);
>>
>> This modification fixes all my memory leaks. I hope, that my fix is
>> correct :), please let me know if i am wrong.
>>
>> With best regards
>> Lubos
>>
>>   <xalanc_fix.patch>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>
>

Re: XalanTransformer memory leaks - fix suggestion

Posted by Steve Hathaway <sh...@e-z.net>.
Greetings Lubos,

Thanks much for the patch.  It is now installed to the svn trunk.

I will now compile new binaries for my committer's web site.

Sincerely,
Steven J. Hathaway
Xalan Documentation Project
http://www.apache.org/~shathaway

On 6/5/2012 4:49 AM, Lubos Toth wrote:
> Hi Gary,
>
> Thanks for your advice. This was my first contribution to xalan 
> developers community, so i wasn`t sure what is the best way :).
> I created new issue XALANC-730 
> (https://issues.apache.org/jira/browse/XALANC-730) and attached the 
> patch with my proposal of fix.
>
> Lubos
>
> On Tue, Jun 5, 2012 at 12:43 PM, Gary Gregory <garydgregory@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     Hi Lubos,
>
>     The best way to get this or anything changed or fixes is to create
>     an issue in the bug tracking system and attach your patch there.
>
>     Gary
>
>     On Jun 5, 2012, at 3:39, Lubos Toth <toth.lubos@gmail.com
>     <ma...@gmail.com>> wrote:
>
>>     Hi Steven,
>>
>>     This is my second attempt to contact you, probably my first
>>     message sent cca 2 weeks ago was not delivered :)
>>
>>     We are using Xalan-C++ library in our system. Now we are in
>>     process of migration to VS2010. The problem is, that i found
>>     memory leaks when using the last Xalan-C++ version 1.11 => i
>>     built Xalan-C_1_11.dll from your last SVN sources (revision
>>     1302529) using MS VC2010 compiler. I can tell you, that there was
>>     not a problem in older revision of Xalan-C++ (more than 1 year old).
>>
>>     After long time of debugging i found out, where is the problem -
>>     my fix proposal is in attached *.patch file => please apply my
>>     patch on Xalan-C root SVN folder
>>     (http://svn.apache.org/repos/asf/xalan/c/trunk). In my opinion,
>>     the problem is in "XalanTransformer" class destructor - probably
>>     you forgot to destroy "m_topXObjectFactory" (similar like you are
>>     destroying "m_stylesheetExecutionContext"). I mean the following
>>     call is missing in "XalanTransformer::~XalanTransformer()":
>>     XalanDestroy(m_memoryManager, *m_topXObjectFactory);
>>
>>     This modification fixes all my memory leaks. I hope, that my fix
>>     is correct :), please let me know if i am wrong.
>>
>>     With best regards
>>     Lubos
>>     <xalanc_fix.patch>
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>>     <ma...@xml.apache.org>
>>     For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>     <ma...@xml.apache.org>
>
>


Re: XalanTransformer memory leaks - fix suggestion

Posted by Gary Gregory <ga...@gmail.com>.
Hi Lubos,

YW. I am looking at Java side of Xalan ATM, so let's see if someone else
picks this up.

Gary

On Tue, Jun 5, 2012 at 7:49 AM, Lubos Toth <to...@gmail.com> wrote:

> Hi Gary,
>
> Thanks for your advice. This was my first contribution to xalan developers
> community, so i wasn`t sure what is the best way :).
> I created new issue XALANC-730 (
> https://issues.apache.org/jira/browse/XALANC-730) and attached the patch
> with my proposal of fix.
>
> Lubos
>
>
> On Tue, Jun 5, 2012 at 12:43 PM, Gary Gregory <ga...@gmail.com>wrote:
>
>> Hi Lubos,
>>
>> The best way to get this or anything changed or fixes is to create an
>> issue in the bug tracking system and attach your patch there.
>>
>> Gary
>>
>> On Jun 5, 2012, at 3:39, Lubos Toth <to...@gmail.com> wrote:
>>
>> Hi Steven,
>>
>> This is my second attempt to contact you, probably my first message sent
>> cca 2 weeks ago was not delivered :)
>>
>> We are using Xalan-C++ library in our system. Now we are in process of
>> migration to VS2010. The problem is, that i found memory leaks when using
>> the last Xalan-C++ version 1.11 => i built Xalan-C_1_11.dll from your last
>> SVN sources (revision 1302529) using MS VC2010 compiler. I can tell you,
>> that there was not a problem in older revision of Xalan-C++ (more than 1
>> year old).
>>
>> After long time of debugging i found out, where is the problem - my fix
>> proposal is in attached *.patch file => please apply my patch on Xalan-C
>> root SVN folder (http://svn.apache.org/repos/asf/xalan/c/trunk). In my
>> opinion, the problem is in "XalanTransformer" class destructor - probably
>> you forgot to destroy "m_topXObjectFactory" (similar like you are
>> destroying "m_stylesheetExecutionContext"). I mean the following call is
>> missing in "XalanTransformer::~XalanTransformer()":
>> XalanDestroy(m_memoryManager, *m_topXObjectFactory);
>>
>> This modification fixes all my memory leaks. I hope, that my fix is
>> correct :), please let me know if i am wrong.
>>
>> With best regards
>> Lubos
>>
>> <xalanc_fix.patch>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>
>>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: XalanTransformer memory leaks - fix suggestion

Posted by Steve Hathaway <sh...@e-z.net>.
Greetings Lubos,

Thanks much for the patch.  It is now installed to the svn trunk.

I will now compile new binaries for my committer's web site.

Sincerely,
Steven J. Hathaway
Xalan Documentation Project
http://www.apache.org/~shathaway

On 6/5/2012 4:49 AM, Lubos Toth wrote:
> Hi Gary,
>
> Thanks for your advice. This was my first contribution to xalan 
> developers community, so i wasn`t sure what is the best way :).
> I created new issue XALANC-730 
> (https://issues.apache.org/jira/browse/XALANC-730) and attached the 
> patch with my proposal of fix.
>
> Lubos
>
> On Tue, Jun 5, 2012 at 12:43 PM, Gary Gregory <garydgregory@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     Hi Lubos,
>
>     The best way to get this or anything changed or fixes is to create
>     an issue in the bug tracking system and attach your patch there.
>
>     Gary
>
>     On Jun 5, 2012, at 3:39, Lubos Toth <toth.lubos@gmail.com
>     <ma...@gmail.com>> wrote:
>
>>     Hi Steven,
>>
>>     This is my second attempt to contact you, probably my first
>>     message sent cca 2 weeks ago was not delivered :)
>>
>>     We are using Xalan-C++ library in our system. Now we are in
>>     process of migration to VS2010. The problem is, that i found
>>     memory leaks when using the last Xalan-C++ version 1.11 => i
>>     built Xalan-C_1_11.dll from your last SVN sources (revision
>>     1302529) using MS VC2010 compiler. I can tell you, that there was
>>     not a problem in older revision of Xalan-C++ (more than 1 year old).
>>
>>     After long time of debugging i found out, where is the problem -
>>     my fix proposal is in attached *.patch file => please apply my
>>     patch on Xalan-C root SVN folder
>>     (http://svn.apache.org/repos/asf/xalan/c/trunk). In my opinion,
>>     the problem is in "XalanTransformer" class destructor - probably
>>     you forgot to destroy "m_topXObjectFactory" (similar like you are
>>     destroying "m_stylesheetExecutionContext"). I mean the following
>>     call is missing in "XalanTransformer::~XalanTransformer()":
>>     XalanDestroy(m_memoryManager, *m_topXObjectFactory);
>>
>>     This modification fixes all my memory leaks. I hope, that my fix
>>     is correct :), please let me know if i am wrong.
>>
>>     With best regards
>>     Lubos
>>     <xalanc_fix.patch>
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
>>     <ma...@xml.apache.org>
>>     For additional commands, e-mail: xalan-dev-help@xml.apache.org
>>     <ma...@xml.apache.org>
>
>


Re: XalanTransformer memory leaks - fix suggestion

Posted by Lubos Toth <to...@gmail.com>.
Hi Gary,

Thanks for your advice. This was my first contribution to xalan developers
community, so i wasn`t sure what is the best way :).
I created new issue XALANC-730 (
https://issues.apache.org/jira/browse/XALANC-730) and attached the patch
with my proposal of fix.

Lubos

On Tue, Jun 5, 2012 at 12:43 PM, Gary Gregory <ga...@gmail.com>wrote:

> Hi Lubos,
>
> The best way to get this or anything changed or fixes is to create an
> issue in the bug tracking system and attach your patch there.
>
> Gary
>
> On Jun 5, 2012, at 3:39, Lubos Toth <to...@gmail.com> wrote:
>
> Hi Steven,
>
> This is my second attempt to contact you, probably my first message sent
> cca 2 weeks ago was not delivered :)
>
> We are using Xalan-C++ library in our system. Now we are in process of
> migration to VS2010. The problem is, that i found memory leaks when using
> the last Xalan-C++ version 1.11 => i built Xalan-C_1_11.dll from your last
> SVN sources (revision 1302529) using MS VC2010 compiler. I can tell you,
> that there was not a problem in older revision of Xalan-C++ (more than 1
> year old).
>
> After long time of debugging i found out, where is the problem - my fix
> proposal is in attached *.patch file => please apply my patch on Xalan-C
> root SVN folder (http://svn.apache.org/repos/asf/xalan/c/trunk). In my
> opinion, the problem is in "XalanTransformer" class destructor - probably
> you forgot to destroy "m_topXObjectFactory" (similar like you are
> destroying "m_stylesheetExecutionContext"). I mean the following call is
> missing in "XalanTransformer::~XalanTransformer()":
> XalanDestroy(m_memoryManager, *m_topXObjectFactory);
>
> This modification fixes all my memory leaks. I hope, that my fix is
> correct :), please let me know if i am wrong.
>
> With best regards
> Lubos
>
> <xalanc_fix.patch>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>

Re: XalanTransformer memory leaks - fix suggestion

Posted by Lubos Toth <to...@gmail.com>.
Hi Gary,

Thanks for your advice. This was my first contribution to xalan developers
community, so i wasn`t sure what is the best way :).
I created new issue XALANC-730 (
https://issues.apache.org/jira/browse/XALANC-730) and attached the patch
with my proposal of fix.

Lubos

On Tue, Jun 5, 2012 at 12:43 PM, Gary Gregory <ga...@gmail.com>wrote:

> Hi Lubos,
>
> The best way to get this or anything changed or fixes is to create an
> issue in the bug tracking system and attach your patch there.
>
> Gary
>
> On Jun 5, 2012, at 3:39, Lubos Toth <to...@gmail.com> wrote:
>
> Hi Steven,
>
> This is my second attempt to contact you, probably my first message sent
> cca 2 weeks ago was not delivered :)
>
> We are using Xalan-C++ library in our system. Now we are in process of
> migration to VS2010. The problem is, that i found memory leaks when using
> the last Xalan-C++ version 1.11 => i built Xalan-C_1_11.dll from your last
> SVN sources (revision 1302529) using MS VC2010 compiler. I can tell you,
> that there was not a problem in older revision of Xalan-C++ (more than 1
> year old).
>
> After long time of debugging i found out, where is the problem - my fix
> proposal is in attached *.patch file => please apply my patch on Xalan-C
> root SVN folder (http://svn.apache.org/repos/asf/xalan/c/trunk). In my
> opinion, the problem is in "XalanTransformer" class destructor - probably
> you forgot to destroy "m_topXObjectFactory" (similar like you are
> destroying "m_stylesheetExecutionContext"). I mean the following call is
> missing in "XalanTransformer::~XalanTransformer()":
> XalanDestroy(m_memoryManager, *m_topXObjectFactory);
>
> This modification fixes all my memory leaks. I hope, that my fix is
> correct :), please let me know if i am wrong.
>
> With best regards
> Lubos
>
> <xalanc_fix.patch>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org
>
>

Re: XalanTransformer memory leaks - fix suggestion

Posted by Gary Gregory <ga...@gmail.com>.
Hi Lubos,

The best way to get this or anything changed or fixes is to create an issue
in the bug tracking system and attach your patch there.

Gary

On Jun 5, 2012, at 3:39, Lubos Toth <to...@gmail.com> wrote:

Hi Steven,

This is my second attempt to contact you, probably my first message sent
cca 2 weeks ago was not delivered :)

We are using Xalan-C++ library in our system. Now we are in process of
migration to VS2010. The problem is, that i found memory leaks when using
the last Xalan-C++ version 1.11 => i built Xalan-C_1_11.dll from your last
SVN sources (revision 1302529) using MS VC2010 compiler. I can tell you,
that there was not a problem in older revision of Xalan-C++ (more than 1
year old).

After long time of debugging i found out, where is the problem - my fix
proposal is in attached *.patch file => please apply my patch on Xalan-C
root SVN folder (http://svn.apache.org/repos/asf/xalan/c/trunk). In my
opinion, the problem is in "XalanTransformer" class destructor - probably
you forgot to destroy "m_topXObjectFactory" (similar like you are
destroying "m_stylesheetExecutionContext"). I mean the following call is
missing in "XalanTransformer::~XalanTransformer()":
XalanDestroy(m_memoryManager, *m_topXObjectFactory);

This modification fixes all my memory leaks. I hope, that my fix is correct
:), please let me know if i am wrong.

With best regards
Lubos

<xalanc_fix.patch>


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org