TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Pete Lyall 76703,4230 (X)
from: Bob van der Poel 76510,2203
date: 1993-03-07 14:59:31
subject: #17634-#102 (bus) error

#: 17644 S3/Languages
    07-Mar-93  14:59:31
Sb: #17634-#102 (bus) error
Fm: Bob van der Poel 76510,2203
To: Pete Lyall 76703,4230 (X)

If you ask Ole, he'll tell you that I'm the king of the 102 error. In most
cases my problem was in poor coding ...what would run fine on one system
but would report 102s when run on a box with ssm. In 90% of the cases it was
the fault of passing a NULL pointer to a library string function. For example,

        char s1, s2;    /* global variables */

        if(strcmp(s1,s2)==0) foo();     /* foo() if strings the same */

would fail. This was a result of having s1 or s2 pointing to a dynamically
allocated string. In all cases I've had to change the code to something like

        if(s1 && s2 && strcmp(s1,s2)) foo();

Note that even this will cause a 102 if s1 is NULL:

        if(*s1 && s1) ...

However

        if(s1 && *s1) ...

will work.

Hmmm, you might try debug instead of srcdbg and see if that catches the error.
At least with debug you could determine the point of the error.

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.