Survey close program not working

158 views
Skip to first unread message

Michael Davidson

unread,
Sep 4, 2010, 12:16:24 AM9/4/10
to ipho...@googlegroups.com
Hi,

I have recently bought the 42s RPN calculator app for iphone and loaded a large (1728 bytes) survey close program. I tried to perform example calculations, such as two missing distances, but it did not work. I am highly confident the program has been entered correctly and was wondering whether the app supports the full function / scientific calculations of the HP42S calculator; or if there is something more that I need to do to make it work.

I have used the HP42S for many years and it would be really helpful to be able to upload all my programs into this app.

Any help would be appreciated!

Michael

Sent from my iPad

Herlock

unread,
Sep 4, 2010, 2:15:15 AM9/4/10
to iPhone42s
Hi Michael,

Could it be possible that you accidentally turned on any of the
options under "behavior" (dynamic stack, no stack lift on enter, drop
on first click) ? These options change the stack behaviour from
classical 42S to RPL-style (i.e. HP48) and will make any program
originally written for the HP-42S to fail...
My experience with this simulator is a 100% compatibility with the
original 42S.

Regards,

Herlock

michael davidson

unread,
Sep 4, 2010, 3:38:11 AM9/4/10
to iPhone42s
Thanks for that Herlock. I looked at the options settings that you
mentioned and confirmed that they were all turned off.

The failure that occurred almost seemed like the app was crashing -
but just for one particular function. I wonder if anyone out there has
tried using the survey close program (1728 bytes) to determine "2
missing distances"? It is at this point where the app appears to crash
(it flashes to the output page before quickly shutting the app down).

The program works for the closing bearing and distance function, but I
would love to find out what is wrong for the more complex calculations

Thanks,

Michael

Herlock

unread,
Sep 4, 2010, 3:45:41 AM9/4/10
to iPhone42s
Hi Michael,

1 - Could you try your program with any other version of Free42:
Windows, Linux, MacOs, Windows Mobile, Palmos, or on the Iphone Free42
by Thomas Okken (not 42S by Byron Foster) ? With all due respect to
Byron'excellent job, he made some modifications to the original code
that *might* (I have so far no evidence ot this) affect the code... In
any case please try the latest 1.4.66. All versions are free, except
for the Iphone one. You can find them on www.thomasokken.com

2 - Could you mail me the program in .raw format, with an exact
description of the sequence that trigger the error ? I will try on my
own as well.

Thanks and regards,

Herlock
> > > Sent from my iPad- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

michael davidson

unread,
Sep 4, 2010, 8:21:54 PM9/4/10
to iPhone42s
Hi Herlock,

I have downloaded both versions (Byron's and Okken's) and have had no
luck. On Monday I will email you a scanned copy of the program and a
simple worked example of a function that the calculator does not
perform. Also I have a step by step example which came with the
program (I will also send you this).

Once again, thanks a lot for your help!

Michael

On Sep 4, 5:45 pm, Herlock <vwebe...@gmail.com> wrote:
> Hi Michael,
>

Byron

unread,
Sep 4, 2010, 10:59:00 PM9/4/10
to iPhone42s
Hi Michael,

The short answer is yes, 42s should run your program.

Free42 should be completely compatible with 42S. While my port of
Thomas' Free42 has some modifications, it will be compatible if the
"Dynamic Stack" feature is off, so stack behavior is the same as the
original 42S. However, no such confusion exists with Thomas' iPhone
port, or his ports to other platforms for that matter.

It would be handy to isolate the issue down to a simple example that
returns what you believe is an errant result. I'll take a look at
it!

Thomas Okken

unread,
Sep 5, 2010, 12:19:49 AM9/5/10
to iPhone42s
Hi Michael,

If you can send me the *.raw file, plus step-by-step instructions on
how to reproduce the error, plus the expected result, I'll take a look
as well.

- Thomas

Herlock

unread,
Sep 5, 2010, 2:40:31 AM9/5/10
to iPhone42s
Hi Michael,

1-Just a sanatity check - there are actually THREE versions on the
appstore, not 2 - Byron'rs, Thomas's, and an infamous Rip-off of
Byron's version ("Infowise") that is moreover based on an old Free42
version. Just to make 100% sure - you did not download that one, did
you ?

2-While I'm sure that both Byron and Thomas, as authors of the
programs, and myself, as a "seasonned" user, are more than willing to
help and to track a potential bug down, I'm quite sure that we are not
willing to type a 1728-byte program manually. At least I speak for
myself ;) So, the .raw file is really what we need rather than a scan
of the program ! :)

Regards,

Vincent
> > > - Afficher le texte des messages précédents -- Masquer le texte des messages précédents -

michael davidson

unread,
Sep 6, 2010, 6:02:31 AM9/6/10
to iPhone42s
Hi Byron,

Thanks for your support, I have not had a chance to put together, a
scanned copy of the survey close program along with the .raw file at
the moment, I will however compile all data and examples tomorrow. I
also think I found a little bug when entering the program, it didn't
prevent me entering the program, but it happens when entering ARCL 19
or ASTO 19 " for example if you use the qwerty number 9 a zero is
entered.

I will also send the program data to Thomas and Herlock

michael davidson

unread,
Sep 6, 2010, 6:08:55 AM9/6/10
to iPhone42s

Thanks Thomas,

I will send you the raw file, I found your program to act a little
different to Byrons with the close program, I will explain in detail
when I send it to you.

Regards
Michael

michael davidson

unread,
Sep 6, 2010, 6:20:36 AM9/6/10
to iPhone42s
Hi Vincent,

Don't worry I didn't buy the parasite version.
Thanks for the offer to help track the problem down,
I will send you the data including the raw file, I agree that it is
better to have the number of bytes shown in the program rather than
line numbers, as it helps check if you have entered the program in
correctly. The raw file that I will send tomorrow has 1729 Bytes but
the program should have 1728 Bytes, the error is only a space in a
text line.
Any way thanks heaps.

Michael

Thomas Okken

unread,
Sep 8, 2010, 4:12:54 PM9/8/10
to iPhone42s
I can reproduce the problem running 42s in the iPad simulator; it
crashes after pressing 2DIST, in Michael's second test case. I can't
tell what, if anything, 42s is doing wrong at the time of the crash;
could be a delayed effect of an earlier memory corruption bug, or some
incompatibility between the iPad version of the OS and 42s... I'll
leave that to Byron to figure out. :-)

Just for grins, I also tried to reproduce the problem on the iPhone 4
simulator, but the HTTP server wasn't working correctly -- when I
pointed my browser at it, all it got was a zero-size document with
Content-Type: application/octet-stream. Something I'll have to look
into. This could also affect Free42 on the iPhone 4.

Thomas Okken

unread,
Sep 8, 2010, 10:26:29 PM9/8/10
to iPhone42s
OK, there is indeed a problem with the HTTP server, but it only seems
to bite when running 42s or Free42 on the iPhone 4 simulator. It
appears that the simulator changes the current working directory, and
that throws the HTTP server off the scent: it expects the CWD to be
the Documents directory, and in the iPhone 4 simulator, apparently
that isn't necessarily true. It *should* be true, because both 42s and
Free42 change the CWD to Documents on startup.
I think I'm going to fix the HTTP server code so that it doesn't
depend on the CWD. No big rush though, AFAICT -- on my iPod touch,
which runs iOS 4.*, the problem doesn't appear. Seems like a simulator
bug, then.

Herlock

unread,
Sep 9, 2010, 3:47:44 AM9/9/10
to iPhone42s
Thanks Thomas.
What is the probability of the problem being also present on the
Iphone 4,i.e. that Ios version is not everything, hardware counts as
well ?
Thanks and regards,
Vincent

Thomas Okken

unread,
Sep 9, 2010, 5:31:20 AM9/9/10
to iPhone42s
> What is the probability of the problem being also present on the
> Iphone 4,i.e. that Ios version is not everything, hardware counts as
> well ?

Objection, your Honor. Calls for speculation! :-)
I consider this an iPhone 4 simulator bug. Once I confirm and come up
with a simple test case to prove this, I'll report it to Apple, and
that will be that as far as I'm concerned. Anyway, once I change the
HTTP server code to not rely on the CWD, Free42 and 42s will be immune
from this bug.

Herlock

unread,
Sep 10, 2010, 11:18:07 AM9/10/10
to iPhone42s
:-)
Ok, I'll buy an Iphone 4 and pray :)
Cheers,
Vincent

Thomas Okken

unread,
Sep 12, 2010, 4:21:07 PM9/12/10
to iPhone42s
Turns out that the problem with the iPhone 4 simulator has to do with
the stat() calls used by the HTTP server not working correctly. It's
not a bug; it turns out that the layout of struct stat has changed in
4.0 (inodes widened from 32 bits to 64) and that causes a problem when
running a 3.2 binary in the 4.0 simulator. Why this problem exists in
the first place is still unclear to me (the 4.0 device *is* backwards
compatible; why not also the simulator?), I'm fuzzy on the details,
but the important part is: as long as you build using the 4.0 SDK when
running on the 4.0 simulator, you'll be fine, and the actual devices
are not affected at all.
So, case closed.
Reply all
Reply to author
Forward
0 new messages