Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tcl8.2 aborts with Error Message "Tcl_SetStringObj called with shared object" when calling Tnm routines

102 views
Skip to first unread message

shyam

unread,
Nov 16, 2006, 3:01:49 AM11/16/06
to
Hi All

I am using Tcl8.2 with Tnm 3.0 and trying to build some simple snmp
utilities

I have run into problem where the tclsh somethimes aborts saying
Tcl_SetStringObj called with shared object

This happens after I try to add/modify the arguments of existing snmp
session object and then do a get or set operation on that session.

I dont know about the TCL C API functions but in a layman sense I think
the problem is that
whenever I add or modify an existing session it kind of becomes
"shared" & then anyother command on that session causes this .

Dosent make much sense to me
& I am not sure if it is a bug in TCL8.2 or maybe Tnm

Can anyone help ??

thanks
in advance

Don Porter

unread,
Nov 16, 2006, 8:44:55 AM11/16/06
to
shyam wrote:
> I am using Tcl8.2 with Tnm 3.0

The current version of Tcl is 8.4.15. You're missing several years of
bug fixes. You ought to upgrade unless you have some really good reason
that you can't.

> I have run into problem where the tclsh somethimes aborts saying
> Tcl_SetStringObj called with shared object

If you get that panic message, it is certainly correct, and some caller
of the Tcl_SetStringObj routine passed in a shared Tcl_Obj. That caller
is buggy and needs to be corrected. Since you note your use of Tnm,
that's a likely suspect. A stack trace from a debugger will tell you
for sure.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|

Don Porter

unread,
Nov 16, 2006, 8:45:38 AM11/16/06
to
Don Porter wrote:
> shyam wrote:
>> I am using Tcl8.2 with Tnm 3.0
>
> The current version of Tcl is 8.4.15.

Sorry about the typo. Current version is 8.4.14.

shyam

unread,
Nov 16, 2006, 8:54:56 AM11/16/06
to

Don Porter wrote:
> Don Porter wrote:
> > shyam wrote:
> >> I am using Tcl8.2 with Tnm 3.0
> >
> > The current version of Tcl is 8.4.15.
>
> Sorry about the typo. Current version is 8.4.14.
Yup , I know about the current version
but Tnm supports 8.2 only

I cannot use Tnm with 8.4 bcoz then some of the old modules like
TclpCreateDirectory will fail

Can you suggest how to see the trace and fix it ?

shyam

unread,
Nov 16, 2006, 8:57:21 AM11/16/06
to

Don Porter wrote:
> Don Porter wrote:
> > shyam wrote:
> >> I am using Tcl8.2 with Tnm 3.0
> >
> > The current version of Tcl is 8.4.15.
>
> Sorry about the typo. Current version is 8.4.14.
I cannot use 8.4 since Tnm dosnt support it. I have to use onlu 8.2

Is there a way to see the trace and fix this "shared" problem ?

Cameron Laird

unread,
Nov 16, 2006, 5:51:05 PM11/16/06
to
In article <1163685441.4...@e3g2000cwe.googlegroups.com>,

shyam <shyam...@gmail.com> wrote:
>
>Don Porter wrote:
>> Don Porter wrote:
>> > shyam wrote:
>> >> I am using Tcl8.2 with Tnm 3.0
>> >
>> > The current version of Tcl is 8.4.15.
>>
>> Sorry about the typo. Current version is 8.4.14.
>I cannot use 8.4 since Tnm dosnt support it. I have to use onlu 8.2
>
>Is there a way to see the trace and fix this "shared" problem ?
.
.
.
Wojciech and others have fixed some of these problems at least once.
None of us have taken the step of setting up a definite site for up-
dates, though ...

Kevin Kenny

unread,
Nov 16, 2006, 8:11:36 PM11/16/06
to
shyam wrote:
> I cannot use Tnm with 8.4 bcoz then some of the old modules like
> TclpCreateDirectory will fail

TclpCreateDirectory is easy to work around: construct a Tcl_Obj
containing the three-element list "file mkdir $dirNmae" (use
Tcl_CreateListObj to do this), and Tcl_EvalObj the result.

--
73 de ke9tv/2, Kevin

Donal K. Fellows

unread,
Nov 17, 2006, 4:42:55 AM11/17/06
to
Kevin Kenny wrote:
> TclpCreateDirectory is easy to work around: construct a Tcl_Obj
> containing the three-element list "file mkdir $dirNmae" (use
> Tcl_CreateListObj to do this), and Tcl_EvalObj the result.

That should be Tcl_NewListObj(). :-)

Donal.

0 new messages