Discussion:
How long will shell work for you?
(too old to reply)
Timothy Finley
2005-02-23 00:59:37 UTC
Permalink
For all the people who have things mostly done, do you have any problems
running b.exe or long.exe multiple times? I can run b.exe twice fine, but
on the third time it starts up it fails with a refCount assertion failure.
Now long.exe won't fail until the fourth time I try to start it. I presume
that I'm failing to clean up correctly, but was wondering if anyone else
had this problem.

Tim
Julio Espinoza-Sokal
2005-02-23 04:52:29 UTC
Permalink
I ran into a similar problem with my project where calling b.exe and
long.exe would randomly fail the refCount assertion and it seems to have
gone away once I remembered to initialize the memory I allocated for the
userContext before using it. I probably wasn't setting initial values for
everything I needed to be.

Julio
Post by Timothy Finley
For all the people who have things mostly done, do you have any problems
running b.exe or long.exe multiple times? I can run b.exe twice fine, but
on the third time it starts up it fails with a refCount assertion failure.
Now long.exe won't fail until the fourth time I try to start it. I presume
that I'm failing to clean up correctly, but was wondering if anyone else
had this problem.
Tim
Timothy Finley
2005-02-23 07:53:51 UTC
Permalink
Bingo, I should remember that you can't assume too much about default
values in C. Thanks,

Tim
Ben Rogers
2005-02-23 21:24:31 UTC
Permalink
I am now running into the same problem too. How did you initialize the
memory for the user context. I tried using memset, but then shell stops
running for some reason. I guess my question is did you use memset, or
just initialize all the values?
Julio Espinoza-Sokal
2005-02-24 03:44:36 UTC
Permalink
All I did was use memset just after my Malloc calls to set the entire memory
block to '\0'.
Post by Ben Rogers
I am now running into the same problem too. How did you initialize the
memory for the user context. I tried using memset, but then shell stops
running for some reason. I guess my question is did you use memset, or
just initialize all the values?
Loading...