PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Bizarre Data Misalignment error when updating to v1.03

Hi all.

I have received a very strange error code when using v1.03. A Data Misalignment (0x80000002) error.

Here is the piece of code that generates this error:

Code:


CGapiDisplay *gDisplay = new CGapiDisplay;
if(gDisplay->OpenDisplay(hWnd,0))
{
delete gDisplay;
return false;
}

if(gDisplay->SetDisplayMode(GDDISPMODE_NORMAL))
{
delete gDisplay;
return false;
}

CGapiBitmapFont *S1 = new CGapiBitmapFont;
S1->CreateSurface(TEXT("\\temp\\fonts\\6809chargen.bmp"));
S1->SetColorKey(RGB(255,0,255));
S1->CreateFont(0,NULL);
delete S1;


As soon as the program reached the CreateSurface, the error appears.

The weird thing is that is works without problem when I use v1.02. I tried to clean the project, rebuild, but no luck. I also tried to move this function around in the program, no luck either.

What can cause this to fail? And especially when v1.02 works? Anything changed in v1.03 regarding the CGapiBitmapFont class?

Thanks!

PS: Here is the font I'm using:

http://www.techlogic.ca/aw/6809chargen.bmp

Also, the font is really at the location in the program, as it works in 1.02...
Ouch.

I can confirm this to be an issue. CGapiBitmapFont did not change, but the BMP loader did. :(

As it is now you can not load a BMP image from file in GapiDraw 1.03 on any Pocket PC. You can however load BMP images from a resource.

I see no other solution than to quickly release GapiDraw 1.04 tomorrow.

Thanks for reporting in,
/Johan
Glad to be of help. I'm surprised no one saw that one yet.

I will be using any new version you put up, so I would be happy to test any "beta" version you have, if you need the help.
Hm, can it be that this also goes for loading bitmaps from files on stationary pc's? I just tried to upgrade my application from 1.02 to 1.03 and a call to CreateSurface that worked perfectly fine in 1.02 now returns 'GDERR_INVALIDBITMAP'....
That's pretty bad, I wanted to upgrade to 1.03 because I just discovered that the rotation function in Blt rotates in the wrong direction on my pc, which according to the release history, was a bug that is fixed in 1.03. But being unable to load any files forces me to go back to 1.02 for now... I hope you come up with a new release very soon, even if it was just a minor bug-fix release to correct the bitmap-loading issue.
jasjenl, I hope you understand how lucky we are that GapiDraw exists. A few bugs here and there for a short period of time is no big deal. So far anything that has cropped up is fixed very fast, often much faster than something you paid for would be fixed.
Hi,

The fix is done. All that´s left is wrapping up the release which sometimes is more work that the programming itself (all libs, dlls, samples must be changed etc)...

I´m going on vacation tomorrow and will release it before I leave the office. I had some very strange issues with the DirectX bridge (spend an entire day on it), just to find out that it´s my GeForce card that behaves very odd if the laptop has been suspended (since it´s placed in a docking station)... :)

Basically there are only 2 modifications to 1.04.. The BMP reader + a minor improvement to FontMaker...

/Johan
Oh. I´ve switched to a Mac by the way (which is the reason for not logging in in my earlier post)..

I had to change my personal PC at home to a Mac with Apple´s purchase of Emagic, and at the same time I switched my main laptop at work for a Powerbook with OSX as well..

So.. Don´t be surprised to see a Linux/OSX port of GapiDraw in the near future... ;)

/Johan
Ah.. as long as you will continue supporting PocketPC and Windows :)
Actually, a OSX version would make things even more interesting I would say.