Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Exception in C++ constructor

4 posts in General Discussion (old) Last posting was on 2000-02-22 13:01:26.0Z
Jonas Olsson Posted on 2000-02-18 15:22:16.0Z
Newsgroups: sybase.public.easerver
From: "Jonas Olsson" <Jonas.Olsson@cambiosys.com>
Subject: Exception in C++ constructor
Date: Fri, 18 Feb 2000 16:22:16 +0100
Lines: 28
Organization: Cambio Healthcare Systems
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 195.100.184.126
Message-ID: <347_#OrarRie$GA.204@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28382
Article PK: 160407

We're using a C++ component in EAS 3.0.1 for ODBC calls which we use quite
frequently. However, we can reproduce a situation where constructor throws
an exception which EAS promptly passes on to the OS (and Dr Watson ...).
The relevant C++-code is:

BasicCompImpl::BasicCompImpl()
{
setCache(DEFAULT_CACHE);
}

void BasicCompImpl::setCache
(const char* cache)
{
strcpy(cacheName, cache);
}

As it happens in the construction of the component (after narrow in the Java
client component [inter-component call]) the rest of the caller's code
should not matter (?).
Is this an indication of some memory management problems or what? Please
advice.

--
Jonas Olsson
Software Development Engineer
Cambio Healthcare Systems


Jonas Olsson Posted on 2000-02-19 11:47:45.0Z
Newsgroups: sybase.public.easerver
From: "Jonas Olsson" <Jonas.Olsson@cambiosys.com>
Subject: Re: Exception in C++ constructor (UPDATE)
Date: Sat, 19 Feb 2000 12:47:45 +0100
Lines: 52
Organization: Cambio Healthcare Systems
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 195.100.184.126
Message-ID: <347_T0nSc#se$GA.204@forums.sybase.com>
References: <347_#OrarRie$GA.204@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28330
Article PK: 160360

Hi!

Further week-end investigations have revealed the following:

1. Before each of these "constructor exceptions" we have logged a long (>
3000 characters) SQL statement using JagLog.
2. It is in creation of an instance of the logging component that the error
occurs.
3. If we remove the logging the error does not occur.

We would, however, like to keep the SQL logging to be able to track database
transactions.
Is this something in JagLog (so we could log to a file of our own) or is
this a more "global" I/O problem?

---
Jonas Olsson
Software Development Engineer
Cambio Healthcare Systems

Jonas Olsson wrote in message <#OrarRie$GA.204@forums.sybase.com>...
>We're using a C++ component in EAS 3.0.1 for ODBC calls which we use quite
>frequently. However, we can reproduce a situation where constructor throws
>an exception which EAS promptly passes on to the OS (and Dr Watson ...).
>The relevant C++-code is:
>
>BasicCompImpl::BasicCompImpl()
>{
> setCache(DEFAULT_CACHE);
>}
>
>void BasicCompImpl::setCache
> (const char* cache)
>{
> strcpy(cacheName, cache);
>}
>
>As it happens in the construction of the component (after narrow in the
Java
>client component [inter-component call]) the rest of the caller's code
>should not matter (?).
>Is this an indication of some memory management problems or what? Please
>advice.
>
>--
>Jonas Olsson
>Software Development Engineer
>Cambio Healthcare Systems
>
>


Dave Wolf [Sybase] Posted on 2000-02-22 01:54:50.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Exception in C++ constructor (UPDATE)
Date: Mon, 21 Feb 2000 20:54:50 -0500
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 158.159.8.19
Message-ID: <347_sDP4RhNf$GA.65@forums.sybase.com>
References: <347_#OrarRie$GA.204@forums.sybase.com> <347_T0nSc#se$GA.204@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28257
Article PK: 160299

Please open a case. From the outside it looks kinda like a buffer overflow.

Dave Wolf
Internet Applications Division

Jonas Olsson <Jonas.Olsson@cambiosys.com> wrote in message
news:T0nSc#se$GA.204@forums.sybase.com...
> Hi!
>
> Further week-end investigations have revealed the following:
>
> 1. Before each of these "constructor exceptions" we have logged a long (>
> 3000 characters) SQL statement using JagLog.
> 2. It is in creation of an instance of the logging component that the
error
> occurs.
> 3. If we remove the logging the error does not occur.
>
> We would, however, like to keep the SQL logging to be able to track
database
> transactions.
> Is this something in JagLog (so we could log to a file of our own) or is
> this a more "global" I/O problem?
>
> ---
> Jonas Olsson
> Software Development Engineer
> Cambio Healthcare Systems
>
> Jonas Olsson wrote in message <#OrarRie$GA.204@forums.sybase.com>...
> >We're using a C++ component in EAS 3.0.1 for ODBC calls which we use
quite
> >frequently. However, we can reproduce a situation where constructor
throws
> >an exception which EAS promptly passes on to the OS (and Dr Watson ...).
> >The relevant C++-code is:
> >
> >BasicCompImpl::BasicCompImpl()
> >{
> > setCache(DEFAULT_CACHE);
> >}
> >
> >void BasicCompImpl::setCache
> > (const char* cache)
> >{
> > strcpy(cacheName, cache);
> >}
> >
> >As it happens in the construction of the component (after narrow in the
> Java
> >client component [inter-component call]) the rest of the caller's code
> >should not matter (?).
> >Is this an indication of some memory management problems or what? Please
> >advice.
> >
> >--
> >Jonas Olsson
> >Software Development Engineer
> >Cambio Healthcare Systems
> >
> >
>
>


Jonas Olsson Posted on 2000-02-22 13:01:26.0Z
Newsgroups: sybase.public.easerver
From: "Jonas Olsson" <Jonas.Olsson@cambiosys.com>
Subject: Re: Exception in C++ constructor (UPDATE)
Date: Tue, 22 Feb 2000 14:01:26 +0100
Lines: 81
Organization: Cambio Healthcare Systems
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 195.100.184.126
Message-ID: <347_CcxDlVTf$GA.202@forums.sybase.com>
References: <347_#OrarRie$GA.204@forums.sybase.com> <347_T0nSc#se$GA.204@forums.sybase.com> <347_sDP4RhNf$GA.65@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28219
Article PK: 160095

Repeated chrashes despite removal of logging revelead an oversight on our
part: older logging methods were left in the C++-object when we'd moved to
C-functions for logging. So depending on if in a C++-method or C-function
different logging procedures were executed.
The C++-methods were buffer-limited (i.e. overflowing) while the C-functions
handle all sizes.

---
Jonas Olsson
Software Development Engineer
Cambio Healthcare Systems

Dave Wolf [Sybase] wrote in message ...
>Please open a case. From the outside it looks kinda like a buffer
overflow.
>
>Dave Wolf
>Internet Applications Division
>
>Jonas Olsson <Jonas.Olsson@cambiosys.com> wrote in message
>news:T0nSc#se$GA.204@forums.sybase.com...
>> Hi!
>>
>> Further week-end investigations have revealed the following:
>>
>> 1. Before each of these "constructor exceptions" we have logged a long (>
>> 3000 characters) SQL statement using JagLog.
>> 2. It is in creation of an instance of the logging component that the
>error
>> occurs.
>> 3. If we remove the logging the error does not occur.
>>
>> We would, however, like to keep the SQL logging to be able to track
>database
>> transactions.
>> Is this something in JagLog (so we could log to a file of our own) or is
>> this a more "global" I/O problem?
>>
>> ---
>> Jonas Olsson
>> Software Development Engineer
>> Cambio Healthcare Systems
>>
>> Jonas Olsson wrote in message <#OrarRie$GA.204@forums.sybase.com>...
>> >We're using a C++ component in EAS 3.0.1 for ODBC calls which we use
>quite
>> >frequently. However, we can reproduce a situation where constructor
>throws
>> >an exception which EAS promptly passes on to the OS (and Dr Watson ...).
>> >The relevant C++-code is:
>> >
>> >BasicCompImpl::BasicCompImpl()
>> >{
>> > setCache(DEFAULT_CACHE);
>> >}
>> >
>> >void BasicCompImpl::setCache
>> > (const char* cache)
>> >{
>> > strcpy(cacheName, cache);
>> >}
>> >
>> >As it happens in the construction of the component (after narrow in the
>> Java
>> >client component [inter-component call]) the rest of the caller's code
>> >should not matter (?).
>> >Is this an indication of some memory management problems or what? Please
>> >advice.
>> >
>> >--
>> >Jonas Olsson
>> >Software Development Engineer
>> >Cambio Healthcare Systems
>> >
>> >
>>
>>
>
>