BUG: Crash with replace-assoc

Notices and updates
Locked
starseed
Posts: 38
Joined: Thu Jul 27, 2006 8:45 pm

BUG: Crash with replace-assoc

Post by starseed »

I found a crash

Code: Select all

newLISP v.8.9.6 on Win32 MinGW.
> (set 'test '((name "ingo")(last "Hohmann")))
((name "ingo") (last "Hohmann"))
> (push '(name1 "Whalesong") test)
(name1 "Whalesong")
> (replace-assoc 'name1 test (name1 "Starseed"))

invalid function in function replace-assoc : (name1 "Starseed")

(CRASHES)
The problem is related to the assoc replacement not being quoted.

Regards,

Ingo

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

put a quote in front of the replacement:

Code: Select all

(replace-assoc 'name1 test '(name1 "Starseed"))
else it will try to evaluate the non-exisiting function name1. But it shouldn't crash on the error, will investigate.

Lutz

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

This happened when replacing the first element with 'replace-assoc' and an error occured when evaluating the replacement.

This is fixed in 8.9.7, which will be released by the end of the week.

Lutz

starseed
Posts: 38
Joined: Thu Jul 27, 2006 8:45 pm

Post by starseed »

Yes,

that's what I thought ... whatever I did wrong, newLISP shouldn't crash ;-)

Mind you, I'm already very proficient in bugging newlisp programs, _debugging_ is a skill I still have to develop.

Thank you!


Ingo

Locked