Post Reply 
Prime G2 crashes with break command
09-01-2019, 05:59 PM
Post: #1
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
Find all posts by this user
Quote this message in a reply
09-02-2019, 10:05 AM
Post: #2
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


Visit this user's website Find all posts by this user
Quote this message in a reply
09-02-2019, 11:48 AM
Post: #3
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
Find all posts by this user
Quote this message in a reply
09-02-2019, 12:36 PM (This post was last modified: 09-02-2019 12:58 PM by Tim Wessman.)
Post: #4
RE: Prime G2 crashes with break command
Seems like BREAK is doing exactly what it should. It breaks the program, the calculator, and everything! Big Grin

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
09-02-2019, 03:41 PM
Post: #5
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


Visit this user's website Find all posts by this user
Quote this message in a reply
09-02-2019, 04:21 PM
Post: #6
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

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?
Find all posts by this user
Quote this message in a reply
09-02-2019, 04:54 PM
Post: #7
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
Cui bono?
Find all posts by this user
Quote this message in a reply
09-02-2019, 05:10 PM
Post: #8
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
Find all posts by this user
Quote this message in a reply
09-02-2019, 05:31 PM
Post: #9
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
Find all posts by this user
Quote this message in a reply
09-02-2019, 05:33 PM
Post: #10
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


Visit this user's website Find all posts by this user
Quote this message in a reply
09-02-2019, 05:35 PM
Post: #11
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.
Find all posts by this user
Quote this message in a reply
10-14-2019, 09:19 PM
Post: #12
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.
Find all posts by this user
Quote this message in a reply
Post Reply 




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