TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: highflyingbird on October 18, 2010, 01:06:14 AM
-
command: (list '(223 5))
((223 5)) --It's ok.
command: (list '(223 5 2))
((223 5 2)) --It's ok
Application ERROR: Bad argument type ---English version
应用程序错误: 参数类型错误 ----Chinese version.
command:(list '(223 5 2 223))
((223 5 2 223))
Application ERROR: Bad argument type ---English version
应用程序错误: 参数类型错误 ----Chinese version.
command:(list '(223 5 2 223 1))
((223 5 2 223 1)) --It's ok
命令: (list '(223 5 2 1 2 1))
((223 5 2 1 2 1)) -It's ok
command: (list '(223 "a" 1))
((223 "a" 1) -It's ok.
when a list is filled with numbers(all the elements are numbers) and first number is 223 , the count of elements is equal to 3 or 4,then we will meet this bug.
the same bug is "21212" ?
If you haven't this bug,maybe it's caused by operating system,If you have,then it must be a bug of autoCAD.
It's found by xshrimp ,a Chinese.
-
Interesting bug !!
This also causes an Error on : AC2011 Win7 x64
(list (list 224 100 100))
either at the command line or as a statement in a function,
essentially anytime the statement is evaluated
-
even this :
(defun c:doit ()
(setq x224 224)
(setq xxx (list (list x224 100 100 4)))
)
I'm surprised this hasn't been noticed previously ... good find !!
Command: doit
((224 100 100 4))
Application ERROR: Bad argument type
-
You may find this thread interesting:
http://ww3.cad.de/foren/ubb/Forum145/HTML/001297.shtml#000016
It's german, but the conclusion is, the error occurs when the result is presented on the screen.
Wiriting to a file gives no error.
regards
Martin
-
So, it may be a problem with lists 3 or 4 elements long where the first element is 220 to-> 239.
-
Seems to be.
Try evaluating (list (list 224 100 100)) in the VlIde /VisualLisp Console ---> works!
-
Yes I noticed that
(setq xxxxx (list (list 224 100 100))) ;< - in VLIDE .. no error displayed
Command: _vlide
Command:
Command: !xxxxx
((224 100 100))
Application ERROR: Bad argument type
-
Weird!
-
<snip>
It's german, but the conclusion is, the error occurs when the result is presented on the screen.
Wiriting to a file gives no error.
That is weird!
*lol*
(mapcar '+ (list 224 100 100))
-
but
(cons (mapcar '+ (list 224 100 100))a)
:laugh:
-
*lol*
-
Same error in ACAD2000, been around for some time.
-
As long it's not displayed to the ACAD Text window it should do no harm.
Can be a bugger during debugging, though.
-
It must be a VL error. No error in R14 ( Pre VLisp ). -David
-
So, it may be a problem with lists 3 or 4 elements long where the first element is 220 to-> 239.
Acutally ,I found a lot of numbers have this kind of bug.
for example, use this routine,you can find more numbers.
;;; from 5 to 32
(DEFUN C:T1 (/ n k)
(SETQ N (GETINT "\nPlease entet a number:"))
(setq K (+ (* N 1000) 210)) ;can be replaced by any number of 210-239
(list (list K 1 1))
)
0, 220~239
1, 220~239
2, 210~239
3, 210~239
4, 222~239
5, 210~239
..
32,210~239
It's really weird.it looks like irregular.
maybe it's associated with ASCII??
so many numbers ,we even didn't notice this bug before,really strange.I wonder how many this kind of numbers we didn't find?
according a friend from http:://www.mjtd.com ,called masterlong, reported these numbers:
220~239
1220~1239
2010~2019
2210~2233
3016~3019
3210~3239
4222~4239
5011~5013,5015
5110~5119
5210~5239
6010~6019
6110~6119
6210~6239
7010~7019
7110~7119
7210~7239
8010~8019
8110~8119
8210~8239
9010~9019
9110~9119
9210~9239
And he mentioned an unusual number 5016:
command: (list 5016 1 1 1)
(5016 1 1 1)
; 错误: 出现异常: 0xC0000005 (访问冲突) ->it's different from "223" bug.
-
To avoid this, simple add:
(princ (list (list K 1 1))) (princ)
And do not have to wait that these guys at adesk to get it fixed any soon. :)
-
27166++ views.
Every day I see ppl viewing this - approaching ten year old - thread.
It’s not like this bug affects thousands of programs so I’m confused by the lure.
wth
-
Never saw it until you posted and bought it to the top again under NEW
Must admit I always try to read about bugs
-
Never saw it until you posted and bought it to the top again under NEW
Must admit I always try to read about bugs
02-13-2003
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-argument-type-in-simple-list-why/td-p/838757