Reproducible crash on version 3.21/3.0.9a

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
camille
Posts: 2
Joined: Wed Aug 31, 2022 3:55 am

Reproducible crash on version 3.21/3.0.9a

Post by camille »

Hello,
With a cleared calculator (version 3.21/3.0.9a), I can reproducibly trigger a crash by taking the following steps:

4 ENTER 5 COMPLEX
x^2 x^2 x^2 x^2 x^2
SHOW

This raises the following exception:

Hard Fault
r0=20002613 r1=20017f3e
r2=2000254b r3=20018000
r12=cccccccd lr=0807a2c1
pc=080f6262 psr=21000000
redglyph
Posts: 177
Joined: Sat Dec 22, 2018 11:45 am

Re: Reproducible crash on version 3.21/3.0.9a

Post by redglyph »

I confirm that, on version 3.21 (I haven't tested other versions).
rprosperi
Posts: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Reproducible crash on version 3.21/3.0.9a

Post by rprosperi »

Thanks for posting that, David will look into the cause and it will be fixed in the next release of DM42.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
User avatar
rudi
Posts: 415
Joined: Wed Nov 03, 2021 9:03 am
Location: Denmark
Contact:

Re: Reproducible crash on version 3.21/3.0.9a

Post by rudi »

It also closes (crash?) the Free42 on iPhone - but not the Plus42.
/Rudi

DM-42 (s/n 06999), HP-42S, HP-35s, HP-11c, HP-32SII (ex HP-41CV, ex HP-75C, ex HP-48G + a lot, really lot of a accessories)
Denmark
User avatar
Calambres
Posts: 48
Joined: Wed Dec 16, 2020 6:49 pm
Location: Madrid, Spain
Contact:

Re: Reproducible crash on version 3.21/3.0.9a

Post by Calambres »

rudi wrote:
Sun Sep 04, 2022 3:47 pm
It also closes (crash?) the Free42 on iPhone - but not the Plus42.
Ditto on Android and windows.
J-F Garnier
Posts: 47
Joined: Sun Mar 11, 2018 5:37 pm
Location: France

Re: Reproducible crash on version 3.21/3.0.9a

Post by J-F Garnier »

camille wrote:
Sat Sep 03, 2022 4:24 pm
With a cleared calculator (version 3.21/3.0.9a), I can reproducibly trigger a crash by taking the following steps:

4 ENTER 5 COMPLEX
x^2 x^2 x^2 x^2 x^2
SHOW
Interesting and strange quite old Free42 bug. It crashes Free42 2.0.20 (2018) but not Free42 1.5.5 (2014).
I don't have all the intermediate versions to narrow the search.

The result of the 5 square operations is:
-58739890465303386856460159-24795953123440207098015360i
If you directly paste this number into Free42, SHOW will still crash

[Edited:]
An even simpler test case:
1E22 1 + 0 COMPLEX
( see 10.0e21 i0.00e0 on stack)
SHOW --> crash
HTH

J-F
Last edited by J-F Garnier on Sun Sep 04, 2022 9:44 pm, edited 1 time in total.
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Reproducible crash on version 3.21/3.0.9a

Post by Thomas Okken »

Even Plus42 crashes if you do it with the display set to 2x22.
I'll look into it!
HPMike
Posts: 439
Joined: Fri Jul 21, 2017 11:01 pm
Location: DFW, Texas

Re: Reproducible crash on version 3.21/3.0.9a

Post by HPMike »

J-F Garnier wrote:
Sun Sep 04, 2022 8:29 pm
camille wrote:
Sat Sep 03, 2022 4:24 pm
With a cleared calculator (version 3.21/3.0.9a), I can reproducibly trigger a crash by taking the following steps:

4 ENTER 5 COMPLEX
x^2 x^2 x^2 x^2 x^2
SHOW
Interesting and strange quite old Free42 bug. It crashes Free42 2.0.20 (2018) but not Free42 1.5.5 (2014).
I don't have all the intermediate versions to narrow the search.
I can confirm that it also crashes Free42 2.5.17 running on Windows XP, but not Free42 1.4.70 running on Windows 98. Those were the last versions of Free42 that would run under those respective versions of Windows. So, your results definitely indicate that the bug was introduced sometime between 2014 and 2018.

The particular values don't matter. 5 ENTER 4 COMPLEX has the same result. Or 2 ENTER 7 COMPLEX etc. Also 4 ENTER 5 COMPLEX 32 y^x also triggers the crash.
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973. DM32, SN 00054.
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Reproducible crash on version 3.21/3.0.9a

Post by Thomas Okken »

The crash first appeared in 1.5.15. That's when I introduced new logic to handle SHOW better for complex numbers, but the new logic doesn't handle large integers with more than 22 significant digits (i.e. digits excluding trailing zeroes), and overruns a buffer with a negative index.
rprosperi
Posts: 1703
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Reproducible crash on version 3.21/3.0.9a

Post by rprosperi »

rprosperi wrote:
Sun Sep 04, 2022 3:11 pm
Thanks for posting that, David will look into the cause and it will be fixed in the next release of DM42.
Correction: It will be fixed in the next release of DM42 after it's fixed in Free42; I assumed it was DM42-unique (from fault message).
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Post Reply