Author Topic: Error lisp (autocad 2008)  (Read 9152 times)

0 Members and 1 Guest are viewing this topic.

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Error lisp (autocad 2008)
« on: September 15, 2008, 08:51:50 AM »
I have faced an error in usual calculations...

Code: [Select]
(setq i 0 l nil)
(repeat 2000
  (setq l (cons (list i (setq i (1+ i))) l))
)
(setq lst-min-max
       (list (apply (function mapcar) (cons (function min) l))
     (apply (function mapcar) (cons (function max) l))
       )
)
;; returne '((0 1) (1999 2000))

But

Code: [Select]
(setq i 0 l nil)
(repeat 20000
  (setq l (cons (list i (setq i (1+ i))) l))
)
(setq lst-min-max
       (list (apply (function mapcar) (cons (function min) l))
     (apply (function mapcar) (cons (function max) l))
       )
)

;; returne:

; warning: unwind skipped on exception
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Error lisp (autocad 2008)
« Reply #1 on: September 15, 2008, 08:54:58 AM »
Same here using ACAD2000
Code: [Select]
_$
; error: Exception occurred: 0xC0000005 (Access Violation)
; warning: unwind skipped on exception
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
_$
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: Error lisp (autocad 2008)
« Reply #2 on: September 15, 2008, 08:59:40 AM »
Same here using ACAD2000
Code: [Select]
_$
; error: Exception occurred: 0xC0000005 (Access Violation)
; warning: unwind skipped on exception
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
_$


In 2004 same...

GDF

  • Water Moccasin
  • Posts: 2081
Re: Error lisp (autocad 2008)
« Reply #3 on: September 15, 2008, 09:38:46 AM »
Using 2008

Code: [Select]

Command: (setq i 0 l nil)
nil

Command: (repeat 2000
(_>   (setq l (cons (list i (setq i (1+ i))) l))
(_> )
2 153) (151 152) (150 151) (149 150) (148 149) (147 148) (146 147) (145 146)
(144 145) (143 144) (142 143) (141 142) (140 141) (139 140) (138 139) (137 138)
(136 137) (135 136) (134 135) (133 134) (132 133) (131 132) (130 131) (129 130)
(128 129) (127 128) (126 127) (125 126) (124 125) (123 124) (122 123) (121 122)
(120 121) (119 120) (118 119) (117 118) (116 117) (115 116) (114 115) (113 114)
(112 113) (111 112) (110 111) (109 110) (108 109) (107 108) (106 107) (105 106)
(104 105) (103 104) (102 103) (101 102) (100 101) (99 100) (98 99) (97 98) (96
97) (95 96) (94 95) (93 94) (92 93) (91 92) (90 91) (89 90) (88 89) (87 88) (86
87) (85 86) (84 85) (83 84) (82 83) (81 82) (80 81) (79 80) (78 79) (77 78) (76
77) (75 76) (74 75) (73 74) (72 73) (71 72) (70 71) (69 70) (68 69) (67 68) (66
67) (65 66) (64 65) (63 64) (62 63) (61 62) (60 61) (59 60) (58 59) (57 58) (56
57) (55 56) (54 55) (53 54) (52 53) (51 52) (50 51) (49 50) (48 49) (47 48) (46
47) (45 46) (44 45) (43 44) (42 43) (41 42) (40 41) (39 40) (38 39) (37 38) (36
37) (35 36) (34 35) (33 34) (32 33) (31 32) (30 31) (29 30) (28 29) (27 28) (26
27) (25 26) (24 25) (23 24) (22 23) (21 22) (20 21) (19 20) (18 19) (17 18) (16
17) (15 16) (14 15) (13 14) (12 13) (11 12) (10 11) (9 10) (8 9) (7 8) (6 7) (5
6) (4 5) (3 4) (2 3) (1 2) (0 1))2) (430 431) (429 430) (428 429) (427 428)
(426 427) (425 426) (424 425) (423 424) (422 423) (421 422) (420 421) (419 420)
(418 419) (417 418) (416 417) (415 416) (414 415) (413 414) (412 413) (411 412)
(410 411) (409 410) (408 409) (407 408) (406 407) (405 406) (404 405) (403 404)
(402 403) (401 402) (400 401) (399 400) (398 399) (397 398) (396 397) (395 396)
(394 395) (393 394) (392 393) (391 392) (390 391) (389 390) (388 389) (387 388)
(386 387) (385 386) (384 385) (383 384) (382 383) (381 382) (380 381) (379 380)
(378 379) (377 378) (376 377) (375 376) (374 375) (373 374) (372 373) (371 372)
(370 371) (369 370) (368 369) (367 368) (366 367) (365 366) (364 365) (363 364)
(362 363) (361 362) (360 361) (359 360) (358 359) (357 358) (356 357) (355 356)
(354 355) (353 354) (352 353) (351 352) (350 351) (349 350) (348 349) (347 348)
(346 347) (345 346) (344 345) (343 344) (342 343) (341 342) (340 341) (339 340)
(338 339) (337 338) (336 337) (335 336) (334 335) (333 334) (332 333) (331 332)
(330 331) (329 330) (328 329) (327 328) (326 327) (325 326) (324 325) (323 324)
(322 323) (321 322) (320 321) (319 320) (318 319) (317 318) (316 317) (315 316)
(314 315) (313 314) (312 313) (311 312) (310 311) (309 310) (308 309) (307 308)
(306 307) (305 306) (304 305) (303 304) (302 303) (301 302) (300 301) (299 300)
(298 299) (297 298) (296 297) (295 296) (294 295) (293 294) (292 293) (291 292)
(290 291) (289 290) (288 289) (287 288) (286 287) (285 286) (284 285) (283 284)
(282 283) (281 282) (280 281) (279 280) (278 279) (277 278) (276 277) (275 276)
(274 275) (273 274) (272 273) (271 272) (270 271) (269 270) (268 269) (267 268)
(266 267) (265 266) (264 265) (263 264) (262 263) (261 262) (260 261) (259 260)
(258 259) (257 258) (256 257) (255 256) (254 255) (253 254) (252 253) (251 252)
(250 251) (249 250) (248 249) (247 248) (246 247) (245 246) (244 245) (243 244)
(242 243) (241 242) (240 241) (239 240) (238 239) (237 238) (236 237) (235 236)
(234 235) (233 234) (232 233) (231 232) (230 231) (229 230) (228 229) (227 228)
(226 227) (225 226) (224 225) (223 224) (222 223) (221 222) (220 221) (219 220)
(218 219) (217 218) (216 217) (215 216) (214 215) (213 214) (212 213) (211 212)
(210 211) (209 210) (208 209) (207 208) (206 207) (205 206) (204 205) (203 204)
(202 203) (201 202) (200 201) (199 200) (198 199) (197 198) (196 197) (195 196)
(194 195) (193 194) (192 193) (191 192) (190 191) (189 190) (188 189) (187 188)
(186 187) (185 186) (184 185) (183 184) (182 183) (181 182) (180 181) (179 180)
(178 179) (177 178) (176 177) (175 176) (174 175) (173 174) (172 173) (171 172)
(170 171) (169 170) (168 169) (167 168) (166 167) (165 166) (164 165) (163 164)
(162 163) (161 162) (160 161) (159 160) (158 159) (157 158) (156 157) (155 156)
(154 155) (153 154) (15

Command: (setq lst-min-max
(_>        (list (apply (function mapcar) (cons (function min) l))
((_>      (apply (function mapcar) (cons (function max) l))
((_>        )
(_> )
((0 1) (1999 2000))


Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Spike Wilbury

  • Guest
Re: Error lisp (autocad 2008)
« Reply #4 on: September 15, 2008, 10:05:52 AM »
I get the error using AutoCAD 2002 - but not on AutoCAD 2007

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Error lisp (autocad 2008)
« Reply #5 on: September 15, 2008, 10:06:13 AM »
The code snip that has 20,000 iterations ran fine under AutoCAD 2005; crashed on 2008. <shrug> Maybe it only runs under odd numbered AutoCAD releases.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8691
  • AKA Daniel
Re: Error lisp (autocad 2008)
« Reply #6 on: September 15, 2008, 10:16:03 AM »
works here on 07,

and it works in Bricscad V9

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Error lisp (autocad 2008)
« Reply #7 on: September 15, 2008, 11:19:44 AM »
Worked in '06.  Ran both, one after the other.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: Error lisp (autocad 2008)
« Reply #8 on: September 15, 2008, 11:23:04 AM »
Worked in 08:
Code: [Select]
(progn
  (alloc 65000)
  (expand 1000)
  (setq i 0
l nil
  )
  (repeat 25000
    (setq l (cons (list i (setq i (1+ i))) l))
  )
  (gc)
  (alloc 65000)
  (expand 1000)
  (princ
    (setq lst-min-max
   (list (apply (function mapcar) (cons (function min) l))
(apply (function mapcar) (cons (function max) l))
   )
    )
  )
  (princ)
)

 :-)

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: Error lisp (autocad 2008)
« Reply #9 on: September 15, 2008, 11:27:49 AM »

Worked in '04:
Code: [Select]
(progn
  (alloc 65000)
  (expand 1000)
  (setq i 0
l nil
  )
  (repeat 25000
    (setq l (cons (list i (setq i (1+ i))) l))
  )
  (gc)
  (alloc 65535)
  (expand 1000)
  (expand 1000)
  (princ
    (setq lst-min-max
   (list (apply (function mapcar) (cons (function min) l))
(apply (function mapcar) (cons (function max) l))
   )
    )
  )
  (princ)
)

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: Error lisp (autocad 2008)
« Reply #10 on: September 15, 2008, 11:29:27 AM »
Who can prompt how correctly to pick up values for functions ' expand and ' alloc?

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)
Re: Error lisp (autocad 2008)
« Reply #11 on: September 15, 2008, 11:37:17 AM »
Worked in '06.  Ran both, one after the other.
If to load acad first time with the new drawing.
Works?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Error lisp (autocad 2008)
« Reply #12 on: September 15, 2008, 11:40:01 AM »
Worked in '06.  Ran both, one after the other.
If to load acad first time with the new drawing.
Works?
I opened Acad, and then opened one drawing.  Didn't do anything yet, but then tested the code ( in the second drawing opened ), and it worked.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

VovKa

  • Water Moccasin
  • Posts: 1629
  • Ukraine
Re: Error lisp (autocad 2008)
« Reply #13 on: September 15, 2008, 02:45:58 PM »
Evgeniy, it looks like you have a good amount of RAM is you can evaluate
Code: [Select]
(alloc 65000)
(expand 1000)
for my map 2005 the following would be enough
Code: [Select]
(progn
       (expand 26000)
       (setq i 0
     l nil
       )
       (repeat 25000 (setq l (cons (list i (setq i (1+ i))) l)))
       (gc)
       (princ (setq lst-min-max
     (list (apply (function mapcar) (cons (function min) l))
   (apply (function mapcar) (cons (function max) l))
     )
      )
       )
       (princ)
)
no need to change the segment size (256 is default)

DEVITG

  • Bull Frog
  • Posts: 479
Re: Error lisp (autocad 2008)
« Reply #14 on: September 16, 2008, 01:39:22 PM »
Using acad 2008

I run from the command line , and from the vlide , no problem

Quote
Command: (setq lst-min-max
(_>        (list (apply (function mapcar) (cons (function min) l))
((_>      (apply (function mapcar) (cons (function max) l))
((_>        )
(_> )
((0 1) (19999 20000))
Location @ Córdoba Argentina Using ACAD 2019  at Window 10