Skip to main content

GameCanvas not working properly in pMEA dual stack on Win Mobile 6

10 replies [Last post]
nordenberg
Offline
Joined: 2004-09-25

Hi all!

We've got an application that uses GameCanvas and our own thread that
pushes graphics to the display.

This doesn't work very well in pMEA dual stack on my Winodws Mobile 6 device.
The graphics we push to the screen is almost immediately overwritten with other graphics.
(Old menus and other previous frame buffer graphics it looks like.)

Also, focus is broken, ie I can drop down the windows start-menu, but it's overwritten
by graphics we push from our app.

We are now in the process to rewrite the application to use an ordinary Canvas,
and it seems to work much better, but if it is possible we would rather use
GameCanvas, as it works better on some SonyEricsson and Nokia devices.
(We've already rewritten it to use GameCanvas instead of Canvas once before!)

Any other ideas how to solve this issue???

/Mikael

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nordenberg
Offline
Joined: 2004-09-25

Hi again.

I've done some testing now. This is a minimal test midlet that's supposed to
render some text, moving it slightly downwards every two seconds.

It can be downloaded from here:
www.caymo.org/MIDlet/Minimal.jad
www.caymo.org/MIDlet/Minimal.jar

Source code (two very small classes):
www.caymo.org/MIDlet/Minimal.zip

When running this example on my device, the text "jumps" up and down
instead of the expected constantly moving down 5 pixels at a time.
Clicking the windows start menu puts focus on the menu, but it's overwritten
the next time gfx is pushed onto the screen.
Now It's quite clear that somehow old buffers are beeing flushed to the screen.

I also ran the test application you linked to, and it worked nicely.

(I guess your first thought will be "it's probably a simple user error again...",
but being able to draw over the start menu is an achievement :-), so try the
application for yourself and see if it can be reproduced.)

I also ran into another strange issue when developing the test application:
I got a "Can't read manifest file" along with a ZipException or something.
The same application ran flawlessly in Suns JVM (on my device), and the emulator.
Unfortunately the console closes too quickly to really see the error.
This error disappeared when I restructured the app some though...
(I still have the failing application if you are interested.)

I'd be really grateful for any help.

Best regards,
/Mikael

Davy Preuveneers

Hi,

I can confirm the bug. I have it too with this minimal test midlet, but only
with the dual stack implementation. With the MIDP stack of phoneME Feature, I
cannot reproduce the problem.

As the problem does not occur with a linux/x86 dual stack build, I assume it
is a WinCE specific bug. I cannot really tell what is wrong right now, but
will look into it if I have a little bit more time.

Thanks for the test example and bug report,
Davy

On Saturday 13 September 2008 00:37:32 phonemeadvanced@mobileandembedded.org
wrote:
> Hi again.
>
> I've done some testing now. This is a minimal test midlet that's supposed
> to render some text, moving it slightly downwards every two seconds.
>
> It can be downloaded from here:
> www.caymo.org/MIDlet/Minimal.jad
> www.caymo.org/MIDlet/Minimal.jar
>
> Source code (two very small classes):
> www.caymo.org/MIDlet/Minimal.zip
>
> When running this example on my device, the text "jumps" up and down
> instead of the expected constantly moving down 5 pixels at a time.
> Clicking the windows start menu puts focus on the menu, but it's
> overwritten the next time gfx is pushed onto the screen.
> Now It's quite clear that somehow old buffers are beeing flushed to the
> screen.
>
> I also ran the test application you linked to, and it worked nicely.
>
> (I guess your first thought will be "it's probably a simple user error
> again...", but being able to draw over the start menu is an achievement
> :-), so try the application for yourself and see if it can be reproduced.)
>
> I also ran into another strange issue when developing the test application:
> I got a "Can't read manifest file" along with a ZipException or something.
> The same application ran flawlessly in Suns JVM (on my device), and the
> emulator. Unfortunately the console closes too quickly to really see the
> error. This error disappeared when I restructured the app some though...
> (I still have the failing application if you are interested.)
>
> I'd be really grateful for any help.
>
> Best regards,
> /Mikael
> [Message sent by forum member 'nordenberg' (nordenberg)]
>
> http://forums.java.net/jive/thread.jspa?messageID=299159
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

nordenberg
Offline
Joined: 2004-09-25

Hi again Davy.

Any chance this issue will be adressed any time soon?

The reason I ask is that this is the only stopping issue for us right now,
and I want to know if we need to work around the issue / try to fix it,
or if we can expect an update in pMEA in a near future.

Thanks,

Mikael

Davy Preuveneers

On Saturday 04 October 2008, phonemeadvanced@mobileandembedded.org wrote:
> Hi again Davy.
>
> Any chance this issue will be adressed any time soon?
>
> The reason I ask is that this is the only stopping issue for us right now,
> and I want to know if we need to work around the issue / try to fix it,
> or if we can expect an update in pMEA in a near future.
>
> Thanks,
>
> Mikael
> [Message sent by forum member 'nordenberg' (nordenberg)]

Hi Mikael

I still do not know what is going on. I compared the various MIDP builds in
phoneME Feature (pMEF) and phoneME Advanced (pMEA) and what I have noticed is
that:

-pMEF compiled with eVC4 causes no flickering.
-pMEF compiled with VS2005 causes no flickering.
-Dual stack in pMEA with eVC4 causes no flickering.
-Dual stack in pMEA compiled with VS2005 causes the flickering!

Could you tell me whether the drawing issue also occurs with the pMEA dual
stack build for Windows Mobile 2003 (compiled with eVC4)?

I am well aware that companies and J2ME application developers are looking
into using my phoneME builds as a free virtual machine to run their
applications and that there are WinCE specific bugs in the builds. However, I
can only work on the port in my spare time and try to update the builds
regularly, but I cannot say when a bug will be resolved. I do log the bug
reports and look into them when I have time. That's the best I can do for
something you get for free. I hope you understand.

Thanks,
Davy

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

Davy Preuveneers

Ah well, I spent some time investigating the problem and ... there appeared to
be no bug in the code itself.

As all 4 MIDP builds relied on the same blitting code, but only the pMEA dual
stack for WM5 was having issues, there had be something going on with the
graphics backend. It turned out that the latter was using DirectDraw to paint
the frames, even if I did specify with USE_DIRECTDRAW=false and changing some
configuration files not to use it (the blitting code can use DirectDraw, the
Game API or plain GDI).

I modified the code a bit and now the GameCanvas seems to be doing what it is
supposed to. The other drawing and focus issues mentioned in your first post
in this thread should be resolved now too. I have put new builds of b90
online. I am interested to hear what kind of application you are working on
and how the build is working out for you.

Cheers,
Davy

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

nordenberg
Offline
Joined: 2004-09-25

Hi Davy.

I've just tested the new build, and it works nicely! :-)

I must say that you've been very helpful, and we really do appreciate the time
you've spent done to address our issues.

(I'm also certain that this will benefit the phoneME project as a whole,
and I think that's important because we all need a robust and coherent JVM
that can be run on multiple platforms.)

The application (or system) we're working on is called "Blueflow Fuel".
It measures fuel consumption for motor boats, and presents the information
on the mobile phone or PC (along with other useful information, such as speed,
course, trip meter, GPS coordinates etc...)
We use your pMEA dual stack along with Bluecove for wireless communication.
If your interested, visit our site at:
http://www.blueflow.se

Thanks again!

Cheers,
Mikael

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> ...
> The application (or system) we're working on is called "Blueflow Fuel".
> It measures fuel consumption for motor boats, and presents the information
> on the mobile phone or PC (along with other useful information, such as speed,
> course, trip meter, GPS coordinates etc...)
> We use your pMEA dual stack along with Bluecove for wireless communication.
> If your interested, visit our site at:
> http://www.blueflow.se
>

Hi Mikael,

That's really cool use of phoneME Advanced! Please make sure to mention
our project (phoneME Advanced) for your wireless version and give a URL
link to our project if you have the chance.

https://phoneme.dev.java.net

(And, make sure to credit Davy too!) ;-)

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

Terrence Barr - Senior Technologist and Ambassador

Mikael,

I'd like to feature your app in the community. Do you have a
paragraph or two describing the application and a picture?

Please contact me directly at evangelist[at]mobileandembedded.org

Best,

-- Terrence

Hinkmond Wong wrote:
> phonemeadvanced@mobileandembedded.org wrote:
>> ...
>> The application (or system) we're working on is called "Blueflow Fuel".
>> It measures fuel consumption for motor boats, and presents the
>> information
>> on the mobile phone or PC (along with other useful information, such
>> as speed,
>> course, trip meter, GPS coordinates etc...)
>> We use your pMEA dual stack along with Bluecove for wireless
>> communication.
>> If your interested, visit our site at:
>> http://www.blueflow.se
>>
>
> Hi Mikael,
>
> That's really cool use of phoneME Advanced! Please make sure to mention
> our project (phoneME Advanced) for your wireless version and give a URL
> link to our project if you have the chance.
>
> https://phoneme.dev.java.net
>
> (And, make sure to credit Davy too!) ;-)
>
>
> Hinkmond
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>
>
[terrence_barr.vcf]
---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

Davy Preuveneers

Hi Mikael,

I don't have any games to play with, but I have tested the demo application of
microemu:

http://www.microemu.org/microemu-examples/microemu-demo/microemu-demo.jad
http://www.microemu.org/microemu-examples/microemu-demo/microemu-demo.jar

One of the test options also uses the GameCanvas, and that seems to work OK on
my device. I can select the windows start menu and the "game" continues in
the background.

If you compiled the pMEA dual stack yourself, which graphics backend do you
use? DirectDraw, GameAPI, or plain GDI?

Regards,
Davy

On Friday 12 September 2008 10:38:17 phonemeadvanced@mobileandembedded.org
wrote:
> Hi all!
>
> We've got an application that uses GameCanvas and our own thread that
> pushes graphics to the display.
>
> This doesn't work very well in pMEA dual stack on my Winodws Mobile 6
> device. The graphics we push to the screen is almost immediately
> overwritten with other graphics. (Old menus and other previous frame buffer
> graphics it looks like.)
>
> Also, focus is broken, ie I can drop down the windows start-menu, but it's
> overwritten by graphics we push from our app.
>
> We are now in the process to rewrite the application to use an ordinary
> Canvas, and it seems to work much better, but if it is possible we would
> rather use GameCanvas, as it works better on some SonyEricsson and Nokia
> devices. (We've already rewritten it to use GameCanvas instead of Canvas
> once before!)
>
> Any other ideas how to solve this issue???
>
> /Mikael
> [Message sent by forum member 'nordenberg' (nordenberg)]
>
> http://forums.java.net/jive/thread.jspa?messageID=298992
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net

--
Davy Preuveneers
K.U.Leuven - http://www.kuleuven.be
Department of Computer Science - http://www.cs.kuleuven.be
DistriNet - http://www.cs.kuleuven.be/~distrinet
Celestijnenlaan 200A, B-3001 Heverlee (Leuven), Belgium
Room: 02.152
Phone: (+32) (0)16 327853
E-Mail: Davy.Preuveneers@cs.kuleuven.be
Web: http://www.cs.kuleuven.be/~davy
[signature.asc]

nordenberg
Offline
Joined: 2004-09-25

No, i'm not compliling it myself. I'm using your builds.

I'll try this evening (swedish time :-) to make a minimal MIDlet that
shows the issue, and see if you can reproduce.

At the same time I'll also test the example that works or you,
to see if it's a problem with my device.

I'll keep you posted...

/Mikael