You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Christoph Kies <ck...@gmx.de> on 2006/01/19 11:38:07 UTC
Calling XMLString::transcode() with NULL
Hello everybody,
Calling XMLString::transcode() with a NULL Argument, lets my Programm exit
immediately with code 0, no segmantation fault - no exception - no error.
Is this a bug?
thanks
Christoph
--
---------------------------------------------------------------------
Christoph Kies (ckies@gmx.de)
Mobil: 0179/ 5910 805
Fax: 089/ 1488 213 020 (bis 31.03.2006)
Lindenkamp 4
59469 Ense
---------------------------------------------------------------------
Re: Calling XMLString::transcode() with NULL (final)
Posted by Christoph Kies <ck...@gmx.de>.
Finaly i found what was wrong,
As i sayed XMLString::transcode() does not return, i was wrong!
I have got a problem with an operator<<(std::ostream,..) function which is
not part of xercec-c library.
sorry everybody!
Christoph
Re: Calling XMLString::transcode() with NULL
Posted by Christoph Kies <ck...@gmx.de>.
Am Donnerstag, 19. Januar 2006 22:08 schrieb David Bertoni:
> You don't mention what system and compiler you're using, but the default
> transcoding system varies with the system and compiler. Also, you
> weren't specific about which XMLString::transcode() overload you're
> using, so a code snippet would help.
Hi David,
I first wanted to know, if it might be a bug and if it is possibly known.
Second I wanted to find out myself what might be wrong an collect some
specific information.
third i wanted to use the formular.
I am now on step two.
But I dont't have secrets, so of cause i answer your questions:
I am using v 2.7.0 compiled by myself with GCC 3.3.5 on SUSE Linux 9.3.
The function is:
static char* XMLString::transcode(const XMLCh* const toTranscode);
I dont't think that exceptions matter for this :-)
Thank you
Christoph
Re: Calling XMLString::transcode() with NULL
Posted by David Bertoni <db...@apache.org>.
Christoph Kies wrote:
> Am Donnerstag, 19. Januar 2006 18:29 schrieb David Bertoni:
>> if you mean XMLString::transcode() calls the exit() function, then
>> that's a bug, although I find it hard to believe.
> I also don't believe that exit() ist called directly. But it _seems_ so. On
> _my_ System transcode() does not return and the Process terminates with exit
> code 0.
>
>> If however, you mean that XMLString::transcode() does not fail when you
>> pass a null pointer for the source argument, then that makes sense.
> Any return of NULL or a string with size 0 would be OK, but that does not
> happen on _my_ System.
>
> I will try to find out what is happening here.
>
Could it be that you are not handling exceptions, and an exception is
thrown? It might also depend on the particular transcoder you're using.
You don't mention what system and compiler you're using, but the default
transcoding system varies with the system and compiler. Also, you
weren't specific about which XMLString::transcode() overload you're
using, so a code snippet would help.
Dave
Re: Calling XMLString::transcode() with NULL
Posted by Christoph Kies <ck...@gmx.de>.
Am Donnerstag, 19. Januar 2006 18:29 schrieb David Bertoni:
> if you mean XMLString::transcode() calls the exit() function, then
> that's a bug, although I find it hard to believe.
I also don't believe that exit() ist called directly. But it _seems_ so. On
_my_ System transcode() does not return and the Process terminates with exit
code 0.
> If however, you mean that XMLString::transcode() does not fail when you
> pass a null pointer for the source argument, then that makes sense.
Any return of NULL or a string with size 0 would be OK, but that does not
happen on _my_ System.
I will try to find out what is happening here.
Re: Calling XMLString::transcode() with NULL
Posted by David Bertoni <db...@apache.org>.
Christoph Kies wrote:
> Hello everybody,
>
> Calling XMLString::transcode() with a NULL Argument, lets my Programm exit
> immediately with code 0, no segmantation fault - no exception - no error.
> Is this a bug?
>
I don't know what you mean by "lets my Programm exit immediately," but
if you mean XMLString::transcode() calls the exit() function, then
that's a bug, although I find it hard to believe.
If however, you mean that XMLString::transcode() does not fail when you
pass a null pointer for the source argument, then that makes sense. If
you look at the source code, you'll find this is deliberate behavior.
It may not seem correct to you, but it's been that way too long for it
to be changed.
Dave