Prime G2 crashes with break command
09-01-2019, 05:59 PM
Post: #1
 sc99cs Junior Member Posts: 5 Joined: Sep 2019
Prime G2 crashes with break command
Hello,

I recently bought a Prime G2 and I'm still playing around with it, looking at the demo programs. Every time I run the Demo_BREAK the calculator crashes.

EXPORT Demo_BREAK()
BEGIN
FOR A FROM 1 TO 10 DO
B:= (A+3) MOD 5;
IF B==1 THEN BREAK;
END;
END;
END;

The crash occurs when the program exits, so if I add a message box, the message box text is displayed and then the calculator crashes. Following advice I have tried memory resets and formatting the C drive in recovery mode with no success.

Does this happen to anyone else's G2?

Software Version 2.1.14181 (2018 1016)

Thanks.
Steve
09-02-2019, 10:05 AM
Post: #2
 BartDB Member Posts: 159 Joined: Feb 2015
RE: Prime G2 crashes with break command
Hi,

It might be because you haven't declared your variables. This could cause instability (I have had the 39Gii (Prime's smaller brother) hang due to this requiring battery removal).

Code:
 EXPORT Demo_BREAK() BEGIN LOCAL A, B;                     <-- add this line FOR A FROM 1 TO 10 DO   B:= (A+3) MOD 5;   IF B==1 THEN BREAK; END; END; END;

Regards
-Bart

09-02-2019, 11:48 AM
Post: #3
 sc99cs Junior Member Posts: 5 Joined: Sep 2019
RE: Prime G2 crashes with break command
(09-02-2019 10:05 AM)BartDB Wrote:  Hi,

It might be because you haven't declared your variables. This could cause instability (I have had the 39Gii (Prime's smaller brother) hang due to this requiring battery removal).

Code:
 EXPORT Demo_BREAK() BEGIN LOCAL A, B;                     <-- add this line FOR A FROM 1 TO 10 DO   B:= (A+3) MOD 5;   IF B==1 THEN BREAK; END; END; END;

Regards
-Bart

Thanks for the reply. The program is one of the built in demos on the G2 so shouldn't need altered. I tried what you suggested though and still get the crash.

Steve
09-02-2019, 12:36 PM (This post was last modified: 09-02-2019 12:58 PM by Tim Wessman.)
Post: #4
 Tim Wessman Senior Member Posts: 2,110 Joined: Dec 2013
RE: Prime G2 crashes with break command
Seems like BREAK is doing exactly what it should. It breaks the program, the calculator, and everything!

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
09-02-2019, 03:41 PM
Post: #5
 BartDB Member Posts: 159 Joined: Feb 2015
RE: Prime G2 crashes with break command
Hi,

I have had the emulator crash too.

At first all seemed fine, then I had entered a formula on the Home screen.

With the formula and result still on the Home screen,
go to Program, run Demo_BREAK, it executes fine
when trying to change back to Home the emulator hangs.
(similar with functions on the CAS screen, if doing something else after running the program, emulator soon hangs).

So definitely something bad there, that has probably always been there but now precipitating with the new G2 hardware.

Regards
-Bart

09-02-2019, 04:21 PM
Post: #6
 sc99cs Junior Member Posts: 5 Joined: Sep 2019
RE: Prime G2 crashes with break command
(09-02-2019 03:41 PM)BartDB Wrote:  Hi,

I have had the emulator crash too.

At first all seemed fine, then I had entered a formula on the Home screen.

With the formula and result still on the Home screen,
go to Program, run Demo_BREAK, it executes fine
when trying to change back to Home the emulator hangs.
(similar with functions on the CAS screen, if doing something else after running the program, emulator soon hangs).

So definitely something bad there, that has probably always been there but now precipitating with the new G2 hardware.

Steve

Regards
-Bart

I'm beginning to suspect that the G2 just doesn't like the BREAK command. I have managed to stop the calculator crashing in the demo program by adding an extra IFERR block.
Code:
 #pragma mode( separator(.,;) integer(h32) ) EXPORT Demo_BREAK() BEGIN FOR A FROM 1 TO 10 DO   B:= (A+3) MOD 5;   IF B==1 THEN      MSGBOX("END");     IFERR BREAK;  THEN END;     MSGBOX("A "+A+ " B "+B);     BREAK;   END; END; END;
However I'd be reluctant to do this in a complicated program.

Question now is it just my G2 or is it a general problem?
09-02-2019, 04:54 PM
Post: #7
 toml_12953 Senior Member Posts: 1,134 Joined: Dec 2013
RE: Prime G2 crashes with break command
(09-01-2019 05:59 PM)sc99cs Wrote:  Hello,

I recently bought a Prime G2 and I'm still playing around with it, looking at the demo programs. Every time I run the Demo_BREAK the calculator crashes.

EXPORT Demo_BREAK()
BEGIN
FOR A FROM 1 TO 10 DO
B:= (A+3) MOD 5;
IF B==1 THEN BREAK;
END;
END;
END;

The crash occurs when the program exits, so if I add a message box, the message box text is displayed and then the calculator crashes. Following advice I have tried memory resets and formatting the C drive in recovery mode with no success.

Does this happen to anyone else's G2?

Software Version 2.1.14181 (2018 1016)

Thanks.
Steve

It happens to me as well. Are we about due for a firmware update? Someone mentioned we might be. I hope the BREAK problem was fixed. If we could choose only one or the other (XOR?), I'd rather have existing bugs squashed than new features!

Tom L

People may say I'm inept but I consider myself to be totally ept.
09-02-2019, 05:10 PM
Post: #8
 Tyann Member Posts: 202 Joined: Oct 2014
RE: Prime G2 crashes with break command
Bonjour

Sauf erreur de ma part, ce bogue était présent sur les modèles G1 et
avait était corrigé lors d'une mise à jour.
Espérons que la G2 ne nous ressorte pas tous les bogues que la G1 a connu.

Hello

Unless I'm mistaken, this bug was present on the G1 and
had been fixed during an update.
Let's hope the G2 doesn't bring up all the bugs the G1 has known.

Sorry for my english
09-02-2019, 05:31 PM
Post: #9
 sc99cs Junior Member Posts: 5 Joined: Sep 2019
RE: Prime G2 crashes with break command
Thanks Tom and Tyann.

At least I now know that my G2 isn't faulty as such but this is a general problem with the calculator.

Steve
09-02-2019, 05:33 PM
Post: #10
 BartDB Member Posts: 159 Joined: Feb 2015
RE: Prime G2 crashes with break command
Hi,

Unfortunately I do not have a G2 to test.

However, another way to do the program:
Code:
EXPORT Another_Loop() BEGIN LOCAL A, B;  A:=0;  WHILE B<>1 DO   A:=A+1;   B:= (A+3) MOD 5;  END;  MSGBOX(A); END;

or the following:
Code:
EXPORT Demo_BREAK() BEGIN LOCAL A, B;  FOR A FROM 1 TO 10 DO   B:= (A+3) MOD 5;    IF B==1 THEN     MSGBOX(A);     KILL;    END;  END; END;

However, this one will show an error message after the MSGBOX result is displayed.

Regards,
-Bart

09-02-2019, 05:35 PM
Post: #11
 sc99cs Junior Member Posts: 5 Joined: Sep 2019
RE: Prime G2 crashes with break command
(09-02-2019 05:33 PM)BartDB Wrote:  Hi,

Unfortunately I do not have a G2 to test.

However, another way to do the program:
Code:
EXPORT Another_Loop() BEGIN LOCAL A, B;  A:=0;  WHILE B<>1 DO   A:=A+1;   B:= (A+3) MOD 5;  END;  MSGBOX(A); END;

or the following:
Code:
EXPORT Demo_BREAK() BEGIN LOCAL A, B;  FOR A FROM 1 TO 10 DO   B:= (A+3) MOD 5;    IF B==1 THEN     MSGBOX(A);     KILL;    END;  END; END;

However, this one will show an error message after the MSGBOX result is displayed.

Regards,
-Bart

Posts crossed but I'll give this a try.
10-14-2019, 09:19 PM
Post: #12
 mbeddo Junior Member Posts: 41 Joined: Nov 2014
RE: Prime G2 crashes with break command
I am in same situation as original poster. New G2 and latest update installed - calculator crashes. Program runs fine on my other HP Prime non-G2.
 « Next Oldest | Next Newest »

User(s) browsing this thread: 2 Guest(s)