HP Forums
Prime G2 crashes with break command - 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: Prime G2 crashes with break command (/thread-13566.html)



Prime G2 crashes with break command - sc99cs - 09-01-2019 05:59 PM

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


RE: Prime G2 crashes with break command - BartDB - 09-02-2019 10:05 AM

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


RE: Prime G2 crashes with break command - sc99cs - 09-02-2019 11:48 AM

(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


RE: Prime G2 crashes with break command - Tim Wessman - 09-02-2019 12:36 PM

Seems like BREAK is doing exactly what it should. It breaks the program, the calculator, and everything! Big Grin


RE: Prime G2 crashes with break command - BartDB - 09-02-2019 03:41 PM

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


RE: Prime G2 crashes with break command - sc99cs - 09-02-2019 04:21 PM

(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

Thanks for the reply 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?


RE: Prime G2 crashes with break command - toml_12953 - 09-02-2019 04:54 PM

(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!


RE: Prime G2 crashes with break command - Tyann - 09-02-2019 05:10 PM

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.


RE: Prime G2 crashes with break command - sc99cs - 09-02-2019 05:31 PM

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


RE: Prime G2 crashes with break command - BartDB - 09-02-2019 05:33 PM

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


RE: Prime G2 crashes with break command - sc99cs - 09-02-2019 05:35 PM

(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.


RE: Prime G2 crashes with break command - mbeddo - 10-14-2019 09:19 PM

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.