Post Reply 
[Free42] ASTO 00 bug
01-09-2020, 03:46 PM
Post: #1
[Free42] ASTO 00 bug
Try this, Free42 2.5.11 iOS13.3 (but also on DM42 v3.14)

Code:
>LBL "TRY"
 1
 ENTER
 NEWMAT
 LSTO "REGS"
 "ABCDEF"
 ASTO 00
 RCL 00
 END

It ends up showing ""
Storing a number in R00 works.

I first thought this was a problem with LSTO, but it doesn't work even if you use STO "REGS" instead.

Cheers, Werner
Find all posts by this user
Quote this message in a reply
01-09-2020, 04:38 PM
Post: #2
RE: [Free42] ASTO 00 bug
(01-09-2020 03:46 PM)Werner Wrote:  Try this, Free42 2.5.11 iOS13.3 (but also on DM42 v3.14)

Confirmed. It appears to happen whenever there is a copy of REGS on the stack; even RCL "REGS" "ABCDEF" ASTO 00 RCL 00 will do it.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-09-2020, 06:30 PM
Post: #3
RE: [Free42] ASTO 00 bug
Code:
thomas@thomas-VirtualBox:~/free42$ git diff
diff --git a/common/core_sto_rcl.cc b/common/core_sto_rcl.cc
index 3ac0144b..1679e923 100644
--- a/common/core_sto_rcl.cc
+++ b/common/core_sto_rcl.cc
@@ -390,11 +390,11 @@ int generic_sto(arg_struct *arg, char operation) {
                 if (num >= size)
                     return ERR_SIZE_ERROR;
                 if (reg_x->type == TYPE_STRING) {
+                    if (!disentangle((vartype *) rm))
+                        return ERR_INSUFFICIENT_MEMORY;
                     vartype_string *vs = (vartype_string *) reg_x;
                     phloat *ds = rm->array->data + num;
                     int len, i;
-                    if (!disentangle((vartype *) rm))
-                        return ERR_INSUFFICIENT_MEMORY;
                     len = vs->length;
                     phloat_length(*ds) = len;
                     for (i = 0; i < len; i++)
thomas@thomas-VirtualBox:~/free42$

In a nutshell: when ASTO is called to modify REGS, the REGS variable and the X register are pointing at a shared instance of the matrix. The two variables have to be "disentangled" (shared memory with copy-on-write semantics), and this is currently being done halfway through the operation, while it should be done at the start. The result is that the string data gets written to one copy of the matrix (the wrong one), while the "this is a string" bit gets written to the other. Oops.

Tonight I'll take a closer look at generic_sto() to see if anything else like that is hiding in there, and then I'll release 2.5.13.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-09-2020, 06:32 PM
Post: #4
RE: [Free42] ASTO 00 bug
Thanks Thomas!
Werner
Find all posts by this user
Quote this message in a reply
01-10-2020, 01:18 AM
Post: #5
RE: [Free42] ASTO 00 bug
The update is done. It may take a while for the Android update to show up in the Play store, because of a "Violation of Families Policy Requirements." Wish me luck in trying to find out what that is all about...
Visit this user's website Find all posts by this user
Quote this message in a reply
01-10-2020, 06:02 AM
Post: #6
RE: [Free42] ASTO 00 bug
(01-10-2020 01:18 AM)Thomas Okken Wrote:  The update is done. It may take a while for the Android update to show up in the Play store, because of a "Violation of Families Policy Requirements." Wish me luck in trying to find out what that is all about...

Perhaps this might help:

https://stackoverflow.com/questions/5702...quirements

Regards.
V.

  
Find All My HP-related Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
01-10-2020, 01:27 PM
Post: #7
RE: [Free42] ASTO 00 bug
They replied to my appeal, still not very informative, but this time they highlighted two sections of their regulations, namely:

"[Apps in the program must be] specifically designed for children or families"

and

"You should only select age groups that include both adults and children if you truly have designed your app for all ages."

I'll admit that my app was not "specifically designed for all ages," but that seems a meaningless notion when talking about a tool where form follows function. Unless a "child-appropriate" calculator must have a sky blue and pink color scheme or something?

I'm asking them to clarify. It seems like simply setting the app's target audience to exclude young children would get me past this hurdle, but this has a nasty dystopian vibe to me. Keep the kids stupid so they won't learn to question their elders, that kind of thing. It's not just sex and drugs and violence that kids must be shielded from, but anything that isn't commonly taught to their age group? Precocious children should just stop being precocious and act their age? Maybe I'm misunderstanding this or reading too much into it, but Google's poor communication sure isn't helping.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-10-2020, 10:01 PM
Post: #8
RE: [Free42] ASTO 00 bug
(01-10-2020 01:27 PM)Thomas Okken Wrote:  "You should only select age groups that include both adults and children if you truly have designed your app for all ages."

I'll admit that my app was not "specifically designed for all ages," but that seems a meaningless notion when talking about a tool where form follows function. Unless a "child-appropriate" calculator must have a sky blue and pink color scheme or something?

Perhaps you should add a "Little Professor" mode? But that's TI, not HP. Smile

— Ian Abbott
Find all posts by this user
Quote this message in a reply
01-10-2020, 11:54 PM
Post: #9
RE: [Free42] ASTO 00 bug
(01-10-2020 10:01 PM)ijabbott Wrote:  Perhaps you should add a "Little Professor" mode? But that's TI, not HP. Smile

Yeah. When first run after installation, it should pop up a dialog box, asking "are you a child? (yes/no)" If the answer is yes, a pastel-hued skin is automatically selected, and all output is accompanied by text-to-speech using a high-pitched, patronizing voice. Big Grin
Visit this user's website Find all posts by this user
Quote this message in a reply
01-11-2020, 12:38 AM
Post: #10
RE: [Free42] ASTO 00 bug
(01-10-2020 11:54 PM)Thomas Okken Wrote:  Yeah. When first run after installation, it should pop up a dialog box, asking "are you a child? (yes/no)" If the answer is yes, a pastel-hued skin is automatically selected, and all output is accompanied by text-to-speech using a high-pitched, patronizing voice. Big Grin

I happen to remember a 40 yo MS-DOS adventure game intended for adult audiences, the very first one of the "Leisure Suit Larry" series, which when executed would first ask the user a number of simple questions which supposedly only an adult would understand or know the answer.

If the user failed to give all correct answers, the game would give a "Shame on you" kind of message for trying to cheat and pass for an adult and would refuse to continue to the game. The questions varied randomly with every attempt at execution so running the program again would ask different questions. I don't know how effective it was but certainly it would bring a smile or two (and a lot of frustration to minors, I reckon).

Regards and have a nice weekend.
V.

  
Find All My HP-related Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
01-11-2020, 02:15 PM
Post: #11
RE: [Free42] ASTO 00 bug
(01-11-2020 12:38 AM)Valentin Albillo Wrote:  I happen to remember a 40 yo MS-DOS adventure game intended for adult audiences, the very first one of the "Leisure Suit Larry" series, which when executed would first ask the user a number of simple questions which supposedly only an adult would understand or know the answer.

If the user failed to give all correct answers, the game would give a "Shame on you" kind of message for trying to cheat and pass for an adult and would refuse to continue to the game. The questions varied randomly with every attempt at execution so running the program again would ask different questions. I don't know how effective it was but certainly it would bring a smile or two (and a lot of frustration to minors, I reckon).

I remember that well, too. Even though it's more 30 than 40 years ago.

Have a nice weekend, you all.

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
01-13-2020, 05:19 PM
Post: #12
RE: [Free42] ASTO 00 bug
(01-10-2020 01:27 PM)Thomas Okken Wrote:  "[Apps in the program must be] specifically designed for children or families"

and

"You should only select age groups that include both adults and children if you truly

I got the app approved by changing the target age range from 9+ to 13+. I guess that simply means that the app won't be "targeted" at preteens, but they will still be able to get it if they look for it. The app is still rated for "everyone."

The whole thing is very confusing, but Free42 for Android lives to see another day, another update...
Visit this user's website Find all posts by this user
Quote this message in a reply
01-13-2020, 10:23 PM
Post: #13
RE: [Free42] ASTO 00 bug
.
Hi, Thomas:

(01-13-2020 05:19 PM)Thomas Okken Wrote:  The whole thing is very confusing, but Free42 for Android lives to see another day, another update...

Thank you very much for acting so quickly to fix the error and most especially for taking all the trouble with the Android store.

Your Free42 is an astonishingly awesome project, incredibly powerful and unbelievably fast and accurate, I love it.

Best regards.
V.

  
Find All My HP-related Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
01-13-2020, 10:38 PM
Post: #14
RE: [Free42] ASTO 00 bug
It's good to know that our youth will not be corrupted by Free42...(This Google Family policy is insane and absurd...)
Find all posts by this user
Quote this message in a reply
Post Reply 




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