Load JPG on iPhone broken, when used with PNGs

Previous topic - Next topic

bigsofty

Loading a jpeg, then loading a png, causes "EXC_BAD_ACCESS"

Code (glbasic) Select

SETCURRENTDIR("Media")
LOADSPRITE "test.jpg", GENSPRITE()
LOADSPRITE "movcarmtxt.png", GENSPRITE()// PNG's need to be 1st


I don't think the JPEG file type (bits, compression etc.) matters but I can supply the above files if need be.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

MrTAToad

It does pretty much on other platforms too :)

Scott_AW

Don't use JPEGs, they're horrible and should be forgotten.
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

bigsofty

Its not a real situation, only coded to show the error.  ;)

I don't have to use JPEGs but Gernot needs to be aware of the error.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

I am aware of that. The JPEG laoder is buggy and for iPhone even more.
I never wanted JPEG, just that you know. that's what I get for implementing features I don't really like :/ ;)

MrTAToad


FutureCow

I've just encountered this bug too on a windows box (it does do a very nice program crash doesn't it?  :D ). It drove me nuts tracking it down as I could load a jpeg once and it would work, if I then loaded it again (under a different sprite number) it crashed. At least I know I can fix it by migrating everything to PNG (which is normally my format of choice anyway, I just inherited a lot of graphics in jpeg and used them as GLBasic supported them.)

bigsofty

I agree, it can be a horrible bug to find as the line causing the bug actually works fine, its another, relatively unrelated line that actually crashes...  :blink:

JPEG, is not a good format any-ways, maybe JPEG support should be pulled while this bug exists?
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Ian Price

QuoteJPEG, is not a good format any-ways,
Which is why only 99.9%* of photographic devices produce this format as standard...

It is a necessay evil - it can be very useful in apps - especially since GLB supports iPhone, which itself uses the JPEG format. It is a relevant and very popular format that I think needs to be included and fixed. As developers we can choose not to use it; but if we do, it should work.




* approximate guesstimation ;)
I came. I saw. I played.

Kitty Hello

Yes. I have the new jpeg lib here and will see if it can fit the old code.

Ian Price

I came. I saw. I played.

MrTAToad

Yey!  We can them mercilessly test it :)

bigsofty

Cool, thanks Gernot!  :good:

... I should have that made into my sig, save time typing!  :S
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Scott_AW

Quote from: Ian Price on 2010-May-12
QuoteJPEG, is not a good format any-ways,
Which is why only 99.9%* of photographic devices produce this format as standard...

Bad habits die hard I guess.  I do photo toning and clip art for my job time to time, I've grown to loath JPEGs with a passion.
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

Ian Price

QuoteBad habits die hard I guess.  I do photo toning and clip art for my job time to time, I've grown to loath JPEGs with a passion.
Well, whether you like it or not, it's not going away anytime soon.

I do happen to agree though, especially now that we have huge amounts of storage space in something smaller than a fingernail. There is really no excuse for not offering alternative formats for saving images, but how many of todays devices do? I suspect maybe only the ones deemed for "professional" use.
I came. I saw. I played.