Android - has anyone tried yet?

Previous topic - Next topic

spacefractal

#75
Im think im have finally found the main issue of the Android 5 :-D what its really happens, but im do just not sure how im will fix it, but im do know the main reason:

The files does simply just not closed correctly when its try to open op the next format in order, here bmp, png and to the last jpg. So if you try to open a png, then its try first open it as bmp, but then its fails, the glbasic try to open op on png and so on. But actuelly this can crashout on system instead.

What we needs to do a file ending checking on each loader and do NOT try to open op a wrong format, then its would work. So now im finally knows what its happens with the file system.

btw if im removed bmp and jpg from trying to load, then the png files actuelly loaded.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

YAY! When for the fix   :booze:
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#77
not extractly that throught :-(.....

But more future testing, its just bmp files that loads very fine, while both png and jpg does not works on Android 5.

This is what im came with and im have no clue what its does in the png loader, so Gernot might need to help here. But its all about to getting the png and jpg to work again. bmp files works fine.

Im have pm you the project, so you can see, where im have changed the back.png to back.bmp, and that one loads fine (and that also why font also loads as they was in the bmp format too), while all pngs might fails.

So nothing about file permissions and im also removed the Setcurrentpath("Media/") as on android, allways best to load from main path.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#78
more precision, png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); fails....... Dannet. It's a libpng issue. No idea how to fix, but it's that line that Bork. Some sort of a wrong compiler setting..

BMP works actuelly fine. JPG might have crashed due above issue.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

#79
Hey is the libpng library the updated one that Google requested a year or so ago...is it possible the old version of the libpng is in the project?

Can't seem to locate the libpng file - maybe in a different place under the Steam version?

Or is it combined in another lib file?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#80
We use the latest possible security version and we use the source code version of it, so no precompiled libs is used. But not sure why it's fails on andoid 5, while it's works on later versions, except we do use a newer compiler, which can also been the reason. etc wrong build compuiler configuration.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

warning!...a wild hunch approaches....

Could it be that certain settings on the PNG and JPG creation are causing trouble?
Like if the file is not generated a certain way it will fail security and not load?

Sorry if it sounds stupid, but I have to try to chip in one way or the other. :)

spacefractal

Im thinks PNG fail is more the why while jpg crash because the file seens not have been closed correctly (its still open). so im believe when possible to get the PNG compiling to work, then jpg would do too. So jpg has not a focus at all yet.

my believe is there is some compiler setting (libpng is wrote in c, not c++) issue as some source code require some compiler settings sometimes to get it working property. Im have no really clue here what settings its want and where to set it. its do weird as its does work on Android 6.0, but could simply due how the compiler compiles and works.

As its per now, the file will NOT open, etc its fails to set a pointer to read the file and libpng code does not out a error, so im have no clue what to do and what a kind of error its is. That would been nice. Im just hate when no error output is shown.

There was nothing wrong with haveing GETCURRENTDIR() which might have a little bit different SETCURRENTDIR() path, both was actuelly pointed to the same folder anyway.

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Hi SF,

Just to remind that SOUND assets failed to load on Android 5.x too - until I used GETCURRENTDIR() but maybe you fixed that with your update to assets copying etc.

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

as allready tried various ideas with that kind (one assets loaded in different ways as other). also bmps does works, but not png, and its dont output a error from libpng or dont know how to get it output its error.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Let's know when you or Gernot have a fix for this ...
I am keen to fix a bug in one of my Android apps - but need to have the Asset load issues sorted beforehand. :)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#86
waiting also, but dont hold your breath as Android 5 is actuelly old (Android 10 is close to release), and you could reenable it again when its got fixed, or by only use bmp files if png did not got loading (you can check if a sprite got loaded or not).

This is a libpng issue and no idea what to do without seing any errors why.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Maybe Gernot can figure out the compiler issue?  :noggin:

I am on holidays soon and wanted to update a bug in an app, looks like android won't be really ready for while yet.

I might try update an app with a small userbase and see how it goes...can't risk this yet on apps with tens of thousands of users.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

Apple do force update as well. For best practical simply set Api to been minimum Android 6.0 by now. When/if its got fixed, then a another update can been done to enable Android 5 again. By now im do still have focus on a Spectrum Next game.

Anyway if im do port Genius Greedy Mouse again to Android, then im would require Android 6+ anyway. For me missing Android 5 is not a biggue at all.

But if you can, convert all your images to bmp (its not much bigger than png when compressed to the apk really). yes you might miss some features, but just disable those.

You game was still playable by using bmp for the title screen and then playing the b&w version.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

im have wrote to gernot as im cant do anything with it and not sure how to do it sadly why libpng fails to open as its diddent out error, but have not checked it due im got distracted by a game named "Tyvarian" on Spectrum Next.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/