JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.01k stars 612 forks source link

Progressive JPEG images cause crash on startup. #212

Closed SzicoVII closed 11 years ago

SzicoVII commented 11 years ago

This crash does not seem to occur in baseja - but I accidentally saved a JPEG file (not even loaded ingame, simply an editor texture) using a progressive interlace system instead of standard and it caused the game to crash at the splash screen.

Perhaps baseja would crash too if it loaded with sv_pure 0 (like openjk) but I haven't checked this.

ensiform commented 11 years ago

Most likely because they aren't supported :}

SzicoVII commented 11 years ago

I realise that, but baseja doesn't crash unless you actually attempt to load the texture in a map load, whereas gtk rad/q3map2 supports different formats, which allows you to use different image types there without crashing ja. I see no reason why openJK should crash just because such a texture is in the textures directory? Its not a major thing but thought itd be worth a mention.

ensiform commented 11 years ago

Newer libjpeg code. Please find out if crashes with sv_pure in regular.

Getting a proper debug callstack would be nice too.

ensiform commented 11 years ago

@SzicoVII is this for SP or MP?

eezstreet commented 11 years ago

His post on JKHub indicates that it's MP

Sent from my Windows Phone


From: Ensiformmailto:notifications@github.com Sent: ‎5/‎7/‎2013 8:29 PM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Subject: Re: [OpenJK] Progressive JPEG images cause crash on startup. (#212)

@SzicoVII is this for SP or MP?


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/212#issuecomment-17579628

ensiform commented 11 years ago

Need a file to even test with debug if he's not actually testing with debug and compiling himself.

eezstreet commented 11 years ago

Just make a progressive JPG? I'll be back on IRC in 15 minutes if you need one.

Sent from my Windows Phone


From: Ensiformmailto:notifications@github.com Sent: ‎5/‎7/‎2013 8:37 PM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Progressive JPEG images cause crash on startup. (#212)

Need a file to even test with debug if he's not actually testing with debug and compiling himself.


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/212#issuecomment-17579905

ensiform commented 11 years ago

Can't reproduce with a progressive jpeg that @eezstreet gave me. @SzicoVII will have to be more specific how to make it happen.

shinyquagsire23 commented 11 years ago

I've experienced this on SP only when the image is about to be displayed while working on increasing the max force level in the force selection screen which required newer graphics. However, I've noticed that if an appropriate image is available (non progressive) it will load that as a fallback instead of the image that is supposed to override the default. Perhaps forcing the UI to load a non progressive image would yield the results described.

eezstreet commented 11 years ago

btw, progressive JPGs have never worked in JKA so yeah.

xycaleth commented 11 years ago

But at least it didn't cause the game to crash :p

eezstreet commented 11 years ago

It caused a very vague Com_Error, which might as well be considered the same thing in this case.

Sent from my Windows Phone


From: Alex Lomailto:notifications@github.com Sent: ‎5/‎10/‎2013 6:04 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Progressive JPEG images cause crash on startup. (#212)

But at least it didn't cause the game to crash :p


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/212#issuecomment-17712868

xycaleth commented 11 years ago

@SzicoVII , I can't seem to replicate this bug. Can you provide a pk3 that causes the problem please?

ensiform commented 11 years ago

@eezstreet very vague how? >>> be specific with what it actually says.

eezstreet commented 11 years ago

Can't recall. Something like "Bad JPG header" but doesn't specify which file

Sent from my Windows Phone


From: Ensiformmailto:notifications@github.com Sent: ‎5/‎10/‎2013 10:50 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Progressive JPEG images cause crash on startup. (#212)

@eezstreet very vague how? >>> be specific with what it actually says.


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/212#issuecomment-17724523

ensiform commented 11 years ago

Well, thats likely an error spit out by libjpeg itself.

eezstreet commented 11 years ago

Yep.

Sent from my Windows Phone


From: Ensiformmailto:notifications@github.com Sent: ‎5/‎10/‎2013 11:44 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Progressive JPEG images cause crash on startup. (#212)

Well, thats likely an error spit out by libjpeg itself.


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/212#issuecomment-17727833

ensiform commented 11 years ago

See jpeg-8c/jerror.h for list of errors.

ensiform commented 11 years ago

@SzicoVII Need your materials to reproduce this...

SzicoVII commented 11 years ago

Ill get them asap.

xycaleth commented 11 years ago

Okay, in the midst of trying to replace jpeg-6 with jpeg-8c in SP, I found the cause of this issue's problem. When @ensiform upgraded the library in MP (commit 66642f7c), he changed a Com_Printf to a Com_Error in the JPG loading, so what was before an error message in the console, is now a full program error.

eezstreet commented 11 years ago

Change it or leave it?

Sent from my Windows Phone


From: Alex Lomailto:notifications@github.com Sent: ‎5/‎14/‎2013 11:40 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Progressive JPEG images cause crash on startup. (#212)

Okay, in the midst of trying to replace jpeg-6 with jpeg-8c in SP, I found the cause of this issue's problem. When @ensiform upgraded the library in MP (commit 66642f7c), he changed a Com_Printf to a Com_Error in the JPG loading, so what was before an error message in the console, is now a full program error.


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/212#issuecomment-17884420

xycaleth commented 11 years ago

I don't think there's any problems with changing it to a Com_Printf and returning from the function. I'll go ahead and change it.

xycaleth commented 11 years ago

Didn't mean to auto-close... need someone to verify that my changes worked. Any takers?

ensiform commented 11 years ago

Why would a com_error cause a "crash" though unless its erroring too soon I guess.

eezstreet commented 11 years ago

Or it's being build on debug (int 3)

Sent from my Windows Phone


From: Ensiformmailto:notifications@github.com Sent: ‎5/‎14/‎2013 10:36 PM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Progressive JPEG images cause crash on startup. (#212)

Why would a com_error cause a "crash" though unless its erroring too soon I guess.


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/212#issuecomment-17917241

xycaleth commented 11 years ago

Buildbot only creates Release builds.

xycaleth commented 11 years ago

@SzicoVII would you mind checking this problem is solved, please? :)

xycaleth commented 11 years ago

I'll consider this closed seeing as nobody's bothered to reply, and I'm pretty sure I fixed the bug.