You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Thomas F. O'Connell" <tf...@netcentral.com> on 2003/05/12 23:12:33 UTC
transforming to data causing assertion failure
I recently modified some working code to start returning results to a
string rather than outputting them to a file using XalanTransformer.
I've begun getting this assertion:
perl: XMLSupport/FormatterToXML.cpp:568: void FormatterToXML::accumCharUTF(short unsigned int): Assertion `m_stream != 0' failed.
Aborted
The same code, XML, and stylesheet all work fine if I switch back to
telling XalanTransformer to output directly to a file.
Can anyone explain this assertion?
Thanks!
-tfo
--
Thomas F. O'Connell
Programmer
NetCentral
http://www.netcentral.com/
1814 Hayes Street
Nashville, TN 37203
p: 615.777.5304 x27
f: 615.777.5340
Re: transforming to data causing assertion failure
Posted by "Thomas F. O'Connell" <tf...@netcentral.com>.
I got my copy at
ftp.cpan.org:/pub/CPAN/modules/by-module/XML/XML-Xalan-0.44.tar.gz
More information is available at CPAN:
http://search.cpan.org/author/EDPRATOMO/XML-Xalan-0.44/Xalan.pm
-tfo
On Wed, May 14, 2003 at 04:41:31PM -0700, david_n_bertoni@us.ibm.com wrote:
> It looks like our C API wrapped in Perl. Can you send the URL for where
> you got the code?
Re: transforming to data causing assertion failure
Posted by "Thomas F. O'Connell" <tf...@netcentral.com>.
Thanks, Dave. It's not an emergency. I can work around it, but it's
certainly a nice feature if I can get it to work.
I made a cursory inspection of the Perl wrapper, but I, too, am a bit
too swamped to dig into an interface I barely know. I figure as someone
who knows the wrapped code, you might have butter luck.
I appreciate your willingness to investigate.
-tfo
On Fri, May 16, 2003 at 01:49:36PM -0700, david_n_bertoni@us.ibm.com wrote:
> Hi Thomas,
>
> Sorry, I'm totally backed up right now. I downloaded the source code for
> the Perl wrapper, and I'm going try to find some time to take a look at it.
> It might take a while, or it might be able to track it down fairly quickly.
>
> I did test the code path I suspect is being used by the wrapper, and
> everything worked OK, but I won't know until I actually take a look at the
> wrapper code.
>
> Dave
Re: transforming to data causing assertion failure
Posted by da...@us.ibm.com.
Hi Thomas,
Sorry, I'm totally backed up right now. I downloaded the source code for
the Perl wrapper, and I'm going try to find some time to take a look at it.
It might take a while, or it might be able to track it down fairly quickly.
I did test the code path I suspect is being used by the wrapper, and
everything worked OK, but I won't know until I actually take a look at the
wrapper code.
Dave
"Thomas F.
O'Connell" To: xalan-c-users@xml.apache.org
<tfo@netcentral. cc: (bcc: David N Bertoni/Cambridge/IBM)
com> Subject: Re: transforming to data causing assertion failure
05/16/2003 11:14
AM
Dave,
Did you ever manage to figure out which function call might be generating
the assertion from the Perl wrapper?
If you can point me in the right direction, I'd be happy to investigate
further and file a bug report as appropriate.
Thanks!
-tfo
--
Thomas F. O'Connell
Programmer
NetCentral
http://www.netcentral.com/
1814 Hayes Street
Nashville, TN 37203
p: 615.777.5304 x27
f: 615.777.5340
On Wed, May 14, 2003 at 04:41:31PM -0700, david_n_bertoni@us.ibm.com wrote:
> Hi Thomas,
>
> It looks like our C API wrapped in Perl. Can you send the URL for where
> you got the code?
>
> Also, there's no need to send email directly to my address -- posting to
> the list is sufficient.
>
> Thanks!
>
> Dave
Re: transforming to data causing assertion failure
Posted by "Thomas F. O'Connell" <tf...@netcentral.com>.
Dave,
Did you ever manage to figure out which function call might be generating
the assertion from the Perl wrapper?
If you can point me in the right direction, I'd be happy to investigate
further and file a bug report as appropriate.
Thanks!
-tfo
--
Thomas F. O'Connell
Programmer
NetCentral
http://www.netcentral.com/
1814 Hayes Street
Nashville, TN 37203
p: 615.777.5304 x27
f: 615.777.5340
On Wed, May 14, 2003 at 04:41:31PM -0700, david_n_bertoni@us.ibm.com wrote:
> Hi Thomas,
>
> It looks like our C API wrapped in Perl. Can you send the URL for where
> you got the code?
>
> Also, there's no need to send email directly to my address -- posting to
> the list is sufficient.
>
> Thanks!
>
> Dave
Re: transforming to data causing assertion failure
Posted by da...@us.ibm.com.
Hi Thomas,
It looks like our C API wrapped in Perl. Can you send the URL for where
you got the code?
Also, there's no need to send email directly to my address -- posting to
the list is sufficient.
Thanks!
Dave
"Thomas F.
O'Connell" To: david_n_bertoni@us.ibm.com
<tfo@netcentral. cc: xalan-c-users@xml.apache.org, (bcc: David N Bertoni/Cambridge/IBM)
com> Subject: Re: transforming to data causing assertion failure
05/14/2003 03:15
PM
Well, the trouble is, I'm using XML::Xalan, so I'm having trouble tracking
down exactly what the difference is. I've not done a lot with Perl's XS
interfaces to other languages, so I'm not exactly sure which C++ function
is getting called and what is getting passed to it.
My perl looks like this:
---------------------------------------------------------------------------
#!/usr/bin/perl
use strict;
use XML::Xalan;
my $tr = new XML::Xalan::Transformer;
my( $xml, $xsl, $html ) = @ARGV;
my $parsed = $tr->parse_file( $xml );
my $compiled = $tr->compile_stylesheet_file( $xsl );
my $res = $tr->transform_to_file( $parsed, $compiled, $html )
or die $tr->errstr;
---------------------------------------------------------------------------
If I change that last line to
my $res = $tr->transform_to_data( $parsed, $compiled )
or die $tr-errstr;
then I get the aforementioned assertion.
-tfo
On Mon, May 12, 2003 at 02:37:32PM -0700, david_n_bertoni@us.ibm.com wrote:
> Hi Thomas,
>
> Looks like a bug. Can you post the snippet of code where you're calling
> the XalanTransformer instance, and include all of the relevant code
you're
> using to construct the XSLTResultTarget?
>
> Thanks!
>
> Dave
Re: transforming to data causing assertion failure
Posted by "Thomas F. O'Connell" <tf...@netcentral.com>.
Well, the trouble is, I'm using XML::Xalan, so I'm having trouble tracking
down exactly what the difference is. I've not done a lot with Perl's XS
interfaces to other languages, so I'm not exactly sure which C++ function
is getting called and what is getting passed to it.
My perl looks like this:
---------------------------------------------------------------------------
#!/usr/bin/perl
use strict;
use XML::Xalan;
my $tr = new XML::Xalan::Transformer;
my( $xml, $xsl, $html ) = @ARGV;
my $parsed = $tr->parse_file( $xml );
my $compiled = $tr->compile_stylesheet_file( $xsl );
my $res = $tr->transform_to_file( $parsed, $compiled, $html )
or die $tr->errstr;
---------------------------------------------------------------------------
If I change that last line to
my $res = $tr->transform_to_data( $parsed, $compiled )
or die $tr-errstr;
then I get the aforementioned assertion.
-tfo
On Mon, May 12, 2003 at 02:37:32PM -0700, david_n_bertoni@us.ibm.com wrote:
> Hi Thomas,
>
> Looks like a bug. Can you post the snippet of code where you're calling
> the XalanTransformer instance, and include all of the relevant code you're
> using to construct the XSLTResultTarget?
>
> Thanks!
>
> Dave
Re: transforming to data causing assertion failure
Posted by da...@us.ibm.com.
Hi Thomas,
Looks like a bug. Can you post the snippet of code where you're calling
the XalanTransformer instance, and include all of the relevant code you're
using to construct the XSLTResultTarget?
Thanks!
Dave
"Thomas F.
O'Connell" To: xalan-c-users@xml.apache.org
<tfo@netcentral. cc: (bcc: David N Bertoni/Cambridge/IBM)
com> Subject: transforming to data causing assertion failure
05/12/2003 02:12
PM
I recently modified some working code to start returning results to a
string rather than outputting them to a file using XalanTransformer.
I've begun getting this assertion:
perl: XMLSupport/FormatterToXML.cpp:568: void
FormatterToXML::accumCharUTF(short unsigned int): Assertion `m_stream != 0'
failed.
Aborted
The same code, XML, and stylesheet all work fine if I switch back to
telling XalanTransformer to output directly to a file.
Can anyone explain this assertion?
Thanks!
-tfo
--
Thomas F. O'Connell
Programmer
NetCentral
http://www.netcentral.com/
1814 Hayes Street
Nashville, TN 37203
p: 615.777.5304 x27
f: 615.777.5340