Win a copy of Head First Go this week in the Go forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Java graphics program freezes my entire pc!  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone I'm a beginner at coding Java, and I encountered this problem :

The code I'm trying to execute is tested by other people with no problems.
When I execute it, it's supposed to open a black canvas and show a white square moving to the right side till it's gone. Simple right?
Problem is when I execute the code my whole computer starts to seriously freeze. But the weird thing is the sounds, and the cursor works OK.  Also the FPS counter I have for the code shows that the FPS are ok although every other second it shows "FPS : 1"  then back to normal FPS.

I tried checking CPU or RAM problems with VisualVM but as I said I don't really know how to use it and I couldn't find anything unusual .


Everyone who helps is VERY appreciated  , this problem won't let me keep learn my Java Game Tutorial..

(I will check frequently the post to reply,  and sorry if my English are bad )
 
Bartender
Posts: 5652
56
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without seeing the code my best guest would be that you've got an infinite loop somewhere.

Please post the code so that we can see, and be sure to UseCodeTags.
 
Marshal
Posts: 63489
207
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and welcome to the Ranch
 
Tato Mata
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carey Brown.
The Code is big and it consists of 5 classes I don't think it's a good idea to post it here.

But I wanna ask: My program never exits by itself if I dont close it, this may be consider an infinite loop but.. it's suppose to be a game so that's ok.

Moreover, to other people it works fine...
 
Tato Mata
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tato Mata wrote:Hello everyone I'm a beginner at coding Java, and I encountered this problem :

The code I'm trying to execute is tested by other people with no problems.
When I execute it, it's supposed to open a black canvas and show a white square moving to the right side till it's gone. Simple right?
Problem is when I execute the code my whole computer starts to seriously freeze. But the weird thing is the sounds, and the cursor works OK.  Also the FPS counter I have for the code shows that the FPS are ok although every other second it shows "FPS : 1"  then back to normal FPS.

I tried checking CPU or RAM problems with VisualVM but as I said I don't really know how to use it and I couldn't find anything unusual .


Everyone who helps is VERY appreciated  , this problem won't let me keep learn my Java Game Tutorial..
Also my OS is Kali Linux. It may have to do with the problem.

(I will check frequently the post to reply,  and sorry if my English are bad )

 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!