This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization 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
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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: 5774
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: 64115
215
  • 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 )

 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!