Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
tasmanian devil
Posts: 164
Registered: ‎06-06-2007
Message 1 of 13 (131 Views)

What does this mean

131 Views, 12 Replies
04-03-2008 10:31 AM
Howdy~
Can someone please tell me what this error message usally means: "error: bad argument type: stringp nil"?

Thanks
The Devil
Valued Mentor
mdhutchinson
Posts: 2,288
Registered: ‎11-18-2003
Message 2 of 13 (131 Views)

Re: What does this mean

04-03-2008 10:39 AM in reply to: tasmanian devil
It means the function where the crash occured requires a string data type... but its value is empty or nil.
Mentor
t.willey
Posts: 2,504
Registered: ‎02-17-2004
Message 3 of 13 (131 Views)

Re: What does this mean

04-03-2008 10:39 AM in reply to: tasmanian devil
You are passing a variable that is nil to something that wants a string.

Example
Command: (strcat "hi" nil)
; error: bad argument type: stringp nil
*Kent Cooper
Message 4 of 13 (131 Views)

Re: What does this mean

04-03-2008 10:53 AM in reply to: tasmanian devil
You get a similar message if a value that should be a text string is not empty or nil, but is some
other kind of data (e.g. a real number, an integer, a list), with that wrong value shown after the
'stringp' part. That comes up, for example, if you have a numerical value that you want to put into
a text string, and you feed it to a function like (strcat) or a Text command, but you forget to use
something like (rtos) or (itoa) on it first, to convert it into a text string. Those won't accept a
number except as a text string that happens to be made of numerical characters.

--
Kent Cooper


wrote...
It means the function where the crash occured requires a string data type... but its value is empty
or nil.
Distinguished Contributor
tasmanian devil
Posts: 164
Registered: ‎06-06-2007
Message 5 of 13 (131 Views)

Re: What does this mean

05-01-2008 07:07 AM in reply to: tasmanian devil
Howdy~
Is there something that I can look for that I can take out as those edit boxes are not needed. I know that other edit boxes need to have a string to work correctly, but I just want to get rid of the two edit boxes that are no longer needed. I am looking through 175 pages of one lsp routine so anything that I know that I can just look for would help.

Thanks
The Devil
*Martti Halminen
Message 6 of 13 (131 Views)

Re: What does this mean

05-05-2008 12:43 AM in reply to: tasmanian devil
tasmanian devil wrote:
> Howdy~
> Is there something that I can look for that I can take out as those edit boxes are not needed. I know that other edit boxes need to have a string to work correctly, but I just want to get rid of the two edit boxes that are no longer needed. I am looking through 175 pages of one lsp routine so anything that I know that I can just look for would help.
>
> Thanks
> The Devil

Start VLIDE.
In vlide's Debug -menu check "Break on Error".
Load your program as .lsp files (not .fas or .vlx).
Run the program until you hit the error.
In Vlide's debug Toolbar click the "Last Break" icon.
(Or Debug menu>Last Break Source, or Alt-F9)
this should take you to the problem site.

- in an error situation, View>Trace Stack is also often useful.



--
Distinguished Contributor
tasmanian devil
Posts: 164
Registered: ‎06-06-2007
Message 7 of 13 (131 Views)

Re: What does this mean

05-06-2008 11:40 AM in reply to: tasmanian devil
Howdy~
I tried what you had suggested and the only thing I get is the same error message that AutoCAD gives me. Help.

Thanks
The Devil
Distinguished Contributor
pnorman
Posts: 614
Registered: ‎02-24-2006
Message 8 of 13 (131 Views)

Re: What does this mean

05-06-2008 11:49 AM in reply to: tasmanian devil
Can you post the code (and please use the [ code ] tags) or attach the lisp file that's causing the problem. I think we need more information in order to give more help.
Distinguished Contributor
tasmanian devil
Posts: 164
Registered: ‎06-06-2007
Message 9 of 13 (131 Views)

Re: What does this mean

05-06-2008 01:11 PM in reply to: tasmanian devil
Howdy~
Are you sure you want me to post the whole code¿

Thanks
The Devil
Distinguished Contributor
pnorman
Posts: 614
Registered: ‎02-24-2006
Message 10 of 13 (131 Views)

Re: What does this mean

05-06-2008 01:19 PM in reply to: tasmanian devil
Oh I see "175 pages". Can't image a lisp file with 175 pages!! Anyway I do not know of an easy way to find the error other than using vlide's debugging tools as others have suggested.

So maybe attach the lisp file?...
Anyone else have a better idea?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community