This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Testing an app in the emulator


Testing an app in the emulator

Postby Nacho84 » Aug 5, 2008 @ 3:37am

Hi! I'm making a simulation game using edgelib and, since I don't own a PocketPC myself, I'm developing it in Visual C++ Express 2005 and compiling the project from time to time in embedded Visual C++ 4 and testing it in an emulator (the Professional VGA that comes bundled with the Windows Mobile 6 SDK).

Anyway, during my last tests I've noticed that when I draw text using the DrawFont method from E2DSurface I get weird results in the emulator, although I get a correct output in the Windows desktop version. I'm attaching an image that shows the emulator's output on the left and the Win32 desktop's output on the right so that you can see what I mean.

I'd like to ask you if you have experienced any kind of incompatibility when running your edgelib's applications in the Windows Mobile 6 emulators and, if you did, how did you solve them.

Thanks in advance for your answers,

--Nacho
Attachments
PocketPCvsWin32Desktop.rar
(19.01 KiB) Downloaded 542 times
Nacho84
pm Member
 
Posts: 82
Joined: Dec 15, 2007 @ 12:00pm
Location: Buenos Aires, Argentina


Postby edge » Aug 6, 2008 @ 11:25am

Hi,

When I look at the attached picture, it's strange that only 'GOALS' is written in an odd kind of way. Are the other texts (that display correctly) also written using DrawFont?

Does the bug also appear on the Windows Mobile 5 emulator?
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Nacho84 » Aug 6, 2008 @ 1:27pm

Nacho84
pm Member
 
Posts: 82
Joined: Dec 15, 2007 @ 12:00pm
Location: Buenos Aires, Argentina


Postby Nacho84 » Aug 6, 2008 @ 6:11pm

Nacho84
pm Member
 
Posts: 82
Joined: Dec 15, 2007 @ 12:00pm
Location: Buenos Aires, Argentina


Postby edge » Aug 8, 2008 @ 8:38am

Hi,

I think the error is caused by memory corruption (such as writing to a NULL pointer, an uninitialized pointer, or writing out of bounds). This is usually the case when errors seem appear randomly.

Maybe it's a good idea to make a few tests using the helloworld sample. Also test if the error only appear when using certain font images.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Nacho84 » Aug 9, 2008 @ 9:15pm

Hi edge,

I've reviewing the helloworld sample and the source code of Blastar. Unfortunately, the helloworld sample writes directly to the screen buffer and I'm writing to an intermediate surface, so it kinda doesn't apply to my current problem.

Nonetheless, one thing I've noticed in Blastar's source code is that all the surfaces are stored as E2DSurfaces. In my project, I store everything as E2DSurfaces * and call the new operator in the class' constructor.

So, I modified my GUIStaticText class and replaced every E2DSurface* by an E2DSurface and it seems to be working correctly now. Since I cannot make that same replacement in all my game classes (because the amount of surfaces per widget is not fixed), should I call an E2DSurface method after creating the surface with the new operator and before calling EDisplay::CreateSurface?

I perused the documentation and found that there's a method named Clear, so I tried invoking it right after using the new operator and it crashed the application (as I expected, because the surface hadn't been created by ClassEDisplay::CreateSurface).

Thanks again for all your help,

--Nacho
Nacho84
pm Member
 
Posts: 82
Joined: Dec 15, 2007 @ 12:00pm
Location: Buenos Aires, Argentina


Postby Nacho84 » Aug 10, 2008 @ 1:08pm

Nacho84
pm Member
 
Posts: 82
Joined: Dec 15, 2007 @ 12:00pm
Location: Buenos Aires, Argentina


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron