Development >> Android >> Testers wanted

Testers wanted
Post by Richard Russell on Feb 11th, 2018, 11:45pm

I am developing a software tool which will automatically convert a BBC BASIC program to an Android app. My objective is to make it as straightforward to create an APK file for Android as it is to create an EXE file for Windows using BB4W! Enough of it is working to give me confidence that I will succeed: here is an APK for David Williams' Forces of Darkness game that I made this way (40 Mbytes):

Because the user-interface is such an important aspect of the program I would like to invite people to try it out and give me their feedback before it is formally released. The prerequisites are that you must have written a BBC BASIC program which you have confirmed works on an Android device (using BBCSDL), and that you have a relatively modern Windows PC which has Java 1.7 or later installed (or on which you are happy to install Java).

If you would like to volunteer let me know.


Re: Testers wanted
Post by DDRM on Feb 12th, 2018, 07:53am

Hi Richard,

I'm in!

Re: Testers wanted
Post by Richard Russell on Feb 14th, 2018, 11:12pm

Sadly it seems that APKs generated by my utility fail to work for about 50% of those who have tried them: they stop with a 'String too long' error from BASIC. This happens for more than one app.

I can't see any reason for it, nor can I think of any variability between Android devices that could possibly cause some to work and others to fail, at least not with such a straightforward BASIC error.

Very unfortunately I cannot reproduce the error on any of my Android devices, they all run the APKs perfectly, so I'm not able to perform any diagnostics other than what can be carried out remotely by the people with the troublesome machines.

Apart from that my utility seems to be working very nicely, but it looks as though I won't be able to release it.

Re: Testers wanted
Post by DDRM on Feb 15th, 2018, 07:44am

Hi Richard,

That's a shame, and frustrating, presumably for both you and us!

Would you consider releasing it for personal use on an "at your own risk" basis?

Edit: I see on you have already thought of this (not surprisingly) and had a go at dealing with it I'll leave it in the message for historical consistency.[Without knowing anything about the internal working of your utility, might it occur when expanding a string like @usr$ into an absolute address? If different devices have different directory structures that might explain why the failure is machine dependent.]

Best wishes,

Re: Testers wanted
Post by Richard Russell on Feb 15th, 2018, 08:39am

on Feb 15th, 2018, 07:44am, DDRM wrote:
If different devices have different directory structures that might explain why the failure is machine dependent.

Indeed, and as you say it's something I thought of, but it doesn't seem to be borne out by the evidence. The workaround which bypasses, but does not solve, the problem was to change this (simplified) code that generates the 'String too long' error:

      $!^@dir$ = path$
      CHAIN $!^@dir$ 

into this code, which doesn't:

      $$!^@dir$ = path$
      CHAIN $$!^@dir$ 

The only difference is that the string is CR-terminated in the failing case and NUL-terminated in the working case. Not only is it hard to understand how the choice of terminator could make a difference, but it's even more mysterious that the 'failing' code only fails on a subset of devices.

Drilling down into the code of the interpreter the only significant difference that I can see is that in the $$ case the length of the string is found using the strlen library function (since NUL-terminated strings are the norm in C) whereas in the $ case the length is found by searching for the CR terminator using the memchr function and subtracting the start address.

So one 'explanation' for the problem is that the memchr function is failing, but why should it fail and why only on some devices? If you, or anybody you know, has some insight into this - I am far from being a C library expert - I would be very interested to know.


Re: Testers wanted
Post by Richard Russell on Feb 16th, 2018, 4:40pm

I've sent copies of the BBC2APK utility, albeit with known incompatibilities, to all those who expressed an interest in testing it - I think. If I've missed anybody out please get in touch.

I've also updated the Forces of Darkness app and put it back where it was:

I know that this app places heavy demands on GPU texture memory and some devices, particularly with earlier versions of Android, give up and crash as a result.


Re: Testers wanted
Post by roy on Yesterday at 3:06pm

hi Richard

I'd like a go at trying the BBC2APK utility, if that's ok with you.

Regards Roy