• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with program hanging

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure why it is freezing up. I know where, but not why. Here is the code where the problem is coming from. I have the line of code that is causing the problem commented out right now. The first one is where it is being called the second is what it is calling. Also if you want to look at all the code you can from http://student.cns.uni.edu/~pulsj/assign9.zip If anyone can help at all I would be very greatful. Thanks!

jessie





Again thanks.
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We don't see your GameBoard, nor its method connection().
But I got an idea.

Perhaps the GuiGameWindow get's invalid during your calls, and the trailing 'repaint ()' command in the Handler trys to operate on this invalid one?
 
jessie puls
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually I fixed the problem..I should have been creating a new thread instead of just trying to call play again. If you wanted to see the rest of the code though there is a link in my previous message to download it in a zip file. Anyway I got it fixed now and it works right. Now I just want to make my computer player a little bit smarter because as it is right now it just picks an open spot randomly. anyway thanks for the input. This is an assignment for a class and we haven't really covered threading yet, so I messed that up, but I was approaching the assignment slightly differently than most of my classmates who were doing the bulk of their work in action listeners on buttons. I didn't really like the way that looked so I decided not to do it that way ( which I believe is what the teacher originally intended since we haven't covered threading in any great detail yet ). Thanks again.

jessie
 
reply
    Bookmark Topic Watch Topic
  • New Topic