Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Lost contents on a BufferedImage?  (Read 917 times)
0 Members and 1 Guest are viewing this topic.
Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


« Posted 2004-08-26 00:05:12 »

Another problem... I blit a cursor to the screen, and hide the real one.  It's a little square BufferedImage.  After a few alt-tabs, I found that the little square had turned to a solid white square.  That sucks!  I thought only VolatileImages could lose their contents, but aparantly my BufferedImage has too!  Can someone explain this?

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline woogley
« Reply #1 - Posted 2004-08-26 00:23:04 »

hm.. strange problem. maybe the BufferedImage didnt lose its contents, myabe the window lost the ability to draw transparent pixels? can the application draw any other transparent pixels?
Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


« Reply #2 - Posted 2004-08-26 00:42:48 »

yup, it draws the menu beneath it with transparent pixels.  Nothing else seemed affected.

But that reminds me, on Mac's I can't have translucent images being translated with AffineTransforms.  The translucent area beneath them turns opaque black.  I've never found a solution for that, nor have I ever asked about it... so I will now.  What can I do about that?

Edit: I tried alt-tabbing more and found that more random BufferedImages would turn to white.  Very strange!

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline trembovetski

Senior Member




If only I knew what I'm talking about!


« Reply #3 - Posted 2004-08-27 03:05:34 »

This sounds like a bug. Which java version are you using? Have you tried 1.5beta3?

If you can still reproduce it on the latest bits, please file a bug (and post a test case here).

Please include info on your hw/drivers setup (video board, drivres version, os, etc)
Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


« Reply #4 - Posted 2004-09-01 05:14:58 »

I can't get the BufferedImages to mess up using Balls.jar, but as far as I can tell I create and use them in the same way.  Frustrating to not find consistency, but at least I have hope that I can change something in the code to help the problem.  Maybe memory is getting swapped out and never back in?

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline trembovetski

Senior Member




If only I knew what I'm talking about!


« Reply #5 - Posted 2004-09-02 04:11:10 »

This kind of situations is supposed to be handled under the hood for managed images. If it's not happening, it's a bug.

A reproducible testcase would help, of course, and the configuration info.

Have you tried your app on some other systems? Do you see the same problem? It could be a driver problem..
Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


« Reply #6 - Posted 2004-09-02 13:28:34 »

I have tried it on another system with a really good and modern graphics card and was able to reproduce the results.  I haven't come up with a test case for it because the only test case I have right now is my 4 meg game  Grin  However I have a hunch that that might be part of the key to the problem.  The only difference I can find between my game and Balls.jar (which doesn't display this problem) is the fact that my game uses so much more memory, which says to me this may be tied to video memory holding this images being tossed aside for other use because it's so full already.

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (84 views)
2013-05-17 21:29:12

alaslipknot (92 views)
2013-05-16 21:24:48

gouessej (123 views)
2013-05-16 00:53:38

gouessej (115 views)
2013-05-16 00:17:58

theagentd (127 views)
2013-05-15 15:01:13

theagentd (114 views)
2013-05-15 15:00:54

StreetDoggy (158 views)
2013-05-14 15:56:26

kutucuk (180 views)
2013-05-12 17:10:36

kutucuk (180 views)
2013-05-12 15:36:09

UnluckyDevil (187 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.098 seconds with 20 queries.