TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: highflyingbird on October 18, 2010, 01:06:14 AM

Title: A "223" bug in all the versions?
Post by: highflyingbird on October 18, 2010, 01:06:14 AM
Code: [Select]
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.
Title: Re: A "223" bug in all the versions?
Post by: Kerry on October 18, 2010, 01:23:19 AM

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

Title: Re: A "223" bug in all the versions?
Post by: Kerry on October 18, 2010, 01:35:57 AM
even this :  
Code: [Select]

(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 !!

Quote

Command: doit
((224 100 100 4))
Application ERROR: Bad argument type
Title: Re: A "223" bug in all the versions?
Post by: Cider on October 18, 2010, 01:49:35 AM
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
Title: Re: A "223" bug in all the versions?
Post by: Kerry on October 18, 2010, 07:34:08 AM

So, it may be a problem with lists 3 or 4 elements long where the first element is  220  to-> 239.
Title: Re: A "223" bug in all the versions?
Post by: Cider on October 18, 2010, 07:40:19 AM
Seems to be.

Try evaluating  (list (list 224 100 100))  in the VlIde /VisualLisp Console ---> works!


Title: Re: A "223" bug in all the versions?
Post by: Kerry on October 18, 2010, 07:54:48 AM
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
Title: Re: A "223" bug in all the versions?
Post by: JohnK on October 18, 2010, 09:33:29 AM
Weird!
Title: Re: A "223" bug in all the versions?
Post by: JohnK on October 18, 2010, 09:49:54 AM
<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))
Title: Re: A "223" bug in all the versions?
Post by: Cider on October 18, 2010, 09:55:57 AM
but

(cons (mapcar '+ (list 224 100 100))a)

 :laugh:
Title: Re: A "223" bug in all the versions?
Post by: JohnK on October 18, 2010, 10:19:06 AM
*lol*
Title: Re: A "223" bug in all the versions?
Post by: CAB on October 18, 2010, 12:02:05 PM
Same error in ACAD2000, been around for some time.
Title: Re: A "223" bug in all the versions?
Post by: Cider on October 18, 2010, 01:15:53 PM
As long it's not displayed to the ACAD Text window it should do no harm.
Can be a bugger during debugging, though.
Title: Re: A "223" bug in all the versions?
Post by: David Bethel on October 19, 2010, 07:28:52 AM
It must be a VL error.  No error in R14 ( Pre VLisp ).  -David
Title: Re: A "223" bug in all the versions?
Post by: highflyingbird on October 19, 2010, 10:24:13 AM
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.
Code: [Select]
;;; 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.
Title: Re: A "223" bug in all the versions?
Post by: LE3 on October 19, 2010, 12:24:37 PM
To avoid this, simple add:

Quote
(princ (list (list K 1 1))) (princ)

And do not have to wait that these guys at adesk to get it fixed any soon. :)
Title: Re: A "223" bug in all the versions?
Post by: MP on September 13, 2019, 05:51:20 PM
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
Title: Re: A "223" bug in all the versions?
Post by: Rod on September 15, 2019, 03:37:15 AM
Never saw it until you posted and bought it to the top again under NEW
Must admit I always try to read about bugs
Title: Re: A "223" bug in all the versions?
Post by: Marc'Antonio Alessi on September 16, 2019, 04:09:13 AM
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