HP Forums
Reproducible crash with badly defined function - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Reproducible crash with badly defined function (/thread-19092.html)



Reproducible crash with badly defined function - Stefan Falk - 11-07-2022 07:50 PM

Hello everybody,

just for the notes if someone puts this in some bug tracker: The following procedure which I did accidently reproducibly crashes my HP Prime G2 with current firmware:

1) In CAS, with no previous Answer (no 'Ans'), type Ans² and store this as f(x)
2) Compute f(2) or thelike

My Prime either told me that it had a problem and would restart, or it restarts without a message, or the display is complete garbage and the calculator hangs (and can be revived using the Reset hole on its back side).

Happy_crashing ;-)
Stefan


RE: Reproducible crash with badly defined function - Albert Chan - 11-07-2022 09:14 PM

CAS> f := x -> Ans^2 // Ans = f
CAS> f(2)                   // = f^2 = (x->f^2)^2 = (x->(x->f^2))^2 ..., causing crash

If the goal is to write a thunk to square Ans, we can use indirection, CAS.Ans instead of Ans

CAS> f := NULL -> CAS.Ans^2
CAS> f() // no argument needed, no crash
(program({},{},(double_deux_points(CAS,Ans))^2))^2
(program({},{},(double_deux_points(CAS,Ans))^2))^4
(program({},{},(double_deux_points(CAS,Ans))^2))^8

CAS> 10
CAS> f()
100
10000
100000000


RE: Reproducible crash with badly defined function - Stefan Falk - 11-08-2022 07:44 AM

Hello Albert,

Thanks for your posting. Don't worry, I don't have any problem. I _accidently_ entered that. I wanted to store x² as the function, but forgot to press x before pressing x². That way, Ans² was produced and I just didn't notice. I just wanted to report that that brought the calculator to crash or reboot. Thanks again!

Best Regards,
Stefan


RE: Reproducible crash with badly defined function - jte - 01-07-2023 02:40 AM

(11-07-2022 07:50 PM)Stefan Falk Wrote:  Hello everybody,

Hello, Stefan!

Quote:… just for the notes if someone puts this in some bug tracker…

Thanks for posting. I’ve managed to recreate the experience here and have created a ticket for it in “some bug tracker”. :-)

(If anyone reading this would like an account on the bug tracker I’ve set up to help organize matters, just let me know by PM.)


RE: Reproducible crash with badly defined function - Stefan Falk - 01-07-2023 08:34 AM

Hello jte,

Great! Thank you!

Best Regards,
Stefan