GLBasic forum

Main forum => Bug Reports => Topic started by: MrTAToad on 2009-Oct-02

Title: Jpeg loading problem
Post by: MrTAToad on 2009-Oct-02
I have found on Windows (haven't tried any of the other platforms yet), that loading different JPEG's into the same sprite ID causes one of two problems :

A)  A Run-time error window or,
B)  Program crashes (and, in my case, affects Internet Explorer) and corrupts sprites being displayed.

The code I'm using is :  
Code (glbasic) Select
LOADSPRITE selectPictureFiles.programDir$+"/"+selectPictureFiles.list$[backgroundIndex%],SPRITE_BACKGROUND%
backgroundIndex% changes between 0 and 1, and of course, the array exists and has two filenames

I tried using
Code (glbasic) Select
LOADSPRITE "",SPRITE_BACKGROUND%, but that makes it worse...

[attachment deleted by admin]
Title: Re: Jpeg loading problem
Post by: Ian Price on 2009-Oct-02
I stated that there were JPEG loading/displaying problems a while back, but forgot about upping a demo.
It really fecks things up, doesn't it? It's pretty erratic too. This is one of the reasons my BattleCards game has been delayed. And it does indeed affect pc and other formats.

I mentioned it HERE (http://www.glbasic.com/forum/index.php?topic=3395.0)
Title: Re: Jpeg loading problem
Post by: Kitty Hello on 2009-Oct-02
works for me. Please zip a package where I can reproduce it.
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2009-Oct-02
Here it is. 

It can take anything from 2 to 5 goes before the program unexpectedly terminates.

[attachment deleted by admin]
Title: Re: Jpeg loading problem
Post by: Ian Price on 2009-Oct-02
Quote from: Ian Price on 2009-Oct-02
It's pretty erratic too.

:(
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2009-Oct-02
Are you using x64 by any chance ?

Its fine with x32 Windows 7 - need to test XP later on.
Title: Re: Jpeg loading problem
Post by: Ian Price on 2009-Oct-02
I'm using XP and the problem definitely exists.
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2009-Oct-02
Yes, I get it in XP too :

Event Type:   Error
Event Source:   Application Error
Event Category:   None
Event ID:   1000
Date:      02/10/2009
Time:      11:00:56
User:      N/A
Computer:   RIGHTCOMPUTER
Description:
Faulting application testjpeg.exe, version 0.0.0.0, faulting module ntdll.dll, version 5.1.2600.5755, fault address 0x00011909.

PNG is fine - JPEG's just seem to be the problem.
Title: Re: Jpeg loading problem
Post by: Kitty Hello on 2009-Oct-02
oh dear. On XP there seems to be something.
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2009-Oct-02
I've also got to check another Vista x64 machine followed by Vista x32 and XP again...
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2009-Oct-04
The other Vista x64 machine crashes the program too.  32-bit version of Vista is fine.

Have tried a complete re-installation of GLBasic, but that didn't help.
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2009-Oct-10
Unfortunately it still does it in the latest update.
Title: Re: Jpeg loading problem
Post by: dejunai on 2010-Jan-02
This is still a problem on Win32 ( I'm using Vista x64 ), and on the WiZ.
Is there anything I can do to help resolve this?
-DEJ
Title: Re: Jpeg loading problem
Post by: Kitty Hello on 2010-Jan-04
So the x64 platforms crash with libjpeg?
Title: Re: Jpeg loading problem
Post by: Ian Price on 2010-Jan-04
JPEGs don't work properly no matter what the system - Windoes XP, Windows 7 64bit, GP2X or Wiz. They Might display once properly, if you're lucky, and then cause other problems, including crashing and graphical glitching.
Title: Re: Jpeg loading problem
Post by: Kitty Hello on 2010-Jan-04
aw, bad. Thing is, it's breaking totally on iPhone, too. I'll investigate.
Title: Re: Jpeg loading problem
Post by: Ian Price on 2010-Jan-04
Cheers Gernot.
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2010-Jan-04
I have to concur with that...
Title: Re: Jpeg loading problem
Post by: Kitty Hello on 2010-Jan-04
One thing was - I didn't close the file handle after reading, thus re-reading was impossible.
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2010-Jan-04
D'oh  :good:
Title: Re: Jpeg loading problem
Post by: dejunai on 2010-Jan-13
Quote from: Kitty Hello on 2010-Jan-04
One thing was - I didn't close the file handle after reading, thus re-reading was impossible.

Did this fix make it int v7.230?
-DEJ

Fixed on Win32, Vista 64x...
Still problems on WiZ...
-DEJ
Title: Re: Jpeg loading problem
Post by: MrTAToad on 2010-Jan-13
Well, its still doing it...  :S
Title: Re: Jpeg loading problem
Post by: Ian Price on 2010-Jan-13
It doesn't seem fixed for me either :(
Title: Re: Jpeg loading problem
Post by: Kitty Hello on 2010-Jan-14
I'll see if a new version might fix it...