BUG: Crash with replace-assoc

Started by starseed, August 21, 2006, 10:16:11 AM

Previous topic - Next topic

starseed

I found a crash


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

#1
put a quote in front of the replacement:


(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

#2
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

#3
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