jpeg error_exit shit

BlitzMax Forums/BlitzMax Programming/jpeg error_exit shit

(tu) ENAY(Posted 2006) [#1]
I got a couple of these when my program exits when compiling in new versions of Blitzmax. Any initial ideas? I'm guessing it's hidden debug code (I don't even have debug switched on and I certainly haven't been putting swear words in my debug code)
Funny thing is, I'm not even loading any jpegs :)
So any ideas?

This error does not appear when I compile in earlier versions of Blitzmax.


Dreamora(Posted 2006) [#2]
hu?
Strange that thing was already there with 1.20 and got fixed and shouldn't appear anymore. Sure you have the actual BM version and syncmod everything?


(tu) ENAY(Posted 2006) [#3]
Sync modding seems to have stopped the error from occurring, but I still get corrupt gfx when using the 4 images that were causing the error. I guess some more investigation is needed.

BTW I'm actually using 1.22, the directory you can see is 1.20. I just happen to have a lot of different versions of Blitzmax on my harddrive.
I've taken down the pic now, but hopefully I should be able to figure out what's going wrong in my code now.


TomToad(Posted 2006) [#4]
I find 2 places where shit exists. One is in pub.mod\freetype.mod\ttinterp.c on lines 4721, 4798, and 4801.
04721: /* BULLSHIT: Measures from the original glyph must be taken along the */
04798: /* BULLSHIT: Measure taken in the original glyph must be along the dual */
04801: /* Second BULLSHIT: Flag attributes are inverted! */

The second is in brl.mod\blitz.mod\blitz_bbdoc.bmx line 263.
00263: bbdoc: Bitwise 'Shit arithmetic right' binary operator


Neither would appear as an error or print to the console on exit. Perhaps you're compiler is reading modules left over from an older version of blitzMAX?


skidracer(Posted 2006) [#5]
ENAY, you need to rethink your blitzmax strategy. If you are mixing and matching modules and compiler versions I think maybe it's time to consider asking for a refund.


marksibly(Posted 2006) [#6]
Enay,

It *has* been fixed - I suspect you're confusing your versions.


(tu) ENAY(Posted 2006) [#7]
Oh, so my bug topic has been moved that's strange.

> ENAY, you need to rethink your blitzmax strategy.
> If you are mixing and matching modules and
> compiler versions I think maybe it's time
> to consider asking for a refund.

I don't see what the problem is with having various versions of Blitzmax available for usage on my harddrive.
I've been doing the same with B2D and B3D for years, it makes testing, bug hunting that much easier. I don't see why Blitzmax should be any different. If I'm trying to compile someone else's code from years gone that was written using a much older build of Blitz, I can easily load and compile it into older versions if things don't seem to be working. Two of my old B3D games don't work properly with sound in the latest 6-7 B3D updates. So I just use the old versions instead.



Anyway I've finally isolated the problem, seems to be a problem with the DirectX driver, works ok with the OpenGL one. Here's the code to replicate it:-

http://enaysoft.co.uk/parp/BlitzmaxBug.zip

This is what should happen:-


But in DirectX, this is what I get:-


So no idea how to fix that, I suspect it's a bug, I thought it was to do with that jpeg shit thing, but that clearly wasn't the reason as fixing that didn't solve anything.

I suspect it's a problem with SetViewPort. I'm trying to emulate DrawAnimImage using a combination of SetViewPort commands in Blitzmax, I had problems with this before over a year ago but used a different approach instead of trying to figure out what was wrong.

But I need it to work and after trying again I seem to be having the same old problem with randomly corrupt graphics.

My specs are:-

Windows XP Home Edition
Pentium 4 CPU 2.80GHz
512 MB Of Ram
DirectX 9
NVidia GeForce4 MX 440 with AGP8X

And DEFINITELY compiled in the latest version 1.22 with all the sync me bobbins.

Does this qualify to go back into the bug forum? :)


skidracer(Posted 2006) [#8]
The DX clipping problem with the MX440 has been reported before, will see what I can do.


skidracer(Posted 2006) [#9]
If you have a moment can you try this:

change brl.mod/dxgraphics.mod/d3d7graphics.bmx[309] from
		res=d3d.CreateDevice(IID_IDirect3DTnLDevice,primarysurface,Varptr device)

to
		res=True 'd3d.CreateDevice(IID_IDirect3DTnLDevice,primarysurface,Varptr device)


which may give you the same performance as you get with blitzmax1.10


(tu) ENAY(Posted 2006) [#10]
Hi,

OK, I tried the code fix but it didn't make any difference sadly.

I probably should've said though that I only got the jpeg error message in newer versions of Blitzmax BUT that the gfx glitch appears in all versions of Blitzmax I've tried it on.
Therefore it never did work in 1.10 either, sorry for not making that clear earlier.

At least on the upside, I know that I can work in OpenGL and know that things will work using that and that it's just my gfx card that is seemingly causing the problems.
(I'm presuming you tested my code and everything worked fine for you in both OpenGL and DirectX?)

I guess I will just have to wait for the next update of Blitzmax for a MX440 fix :)


Dreamora(Posted 2006) [#11]
chance that a different driver for this GeForce 2 based GPU (yes, GF4 MX is a GF2 no GF4 chip so really old) fixes the problem is larger. (NV is changing their DX7 driver implementation on some major part every few versions for some stupid reason. Thats why power of 2, square is needed with GF 6600 again in dx7 or it will break)


Beaker(Posted 2006) [#12]
It was me that reported the Viewport problem originally (on a GF4 440mx as well). Tried a few drivers, didn't really fix it.


Hotcakes(Posted 2006) [#13]
For a GeForce 4 series card I'd recommend the drivers on Windows Update... I think it was 4x.xx... did you try -that- far back? =]


Dreamora(Posted 2006) [#14]
43.25, yes.

They are quite good, had them as well on my GeForce 420go which is the mobile version of the MX.