Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > OS X Java Problem... any help?

OS X Java Problem... any help?
Thread Tools
Forum Regular
Join Date: Apr 1999
Location: Edmonton, AB, Canada
Status: Offline
Reply With Quote
Nov 6, 2001, 01:33 PM
 
First off, I'm not really a developer, but I have some knowleadge of programming and of the code for the particular app that is affected.

We have written a Java app that works properly on Windows, Linux and Solaris, but fails on OS X. The problematic part of the app is a section where the program reads in a set of approx. 60,000 data points (X-Y coords, where the X coord increases by one everytime) and is supposed to draw lines between them all in order (creating essentially a line graph). When the app tries to do this, it seems to go into an infinite loop of some sort, where it maxes out the CPU, and never finishes the process. The app compiles properly and launches properly, but fails here.

Does anyone know why this might be happening? Is there a known bug in a class that's likely being called that might be the culprit? Can anyone suggest a workaround?

I realize that I'm not providing a whole lot of information, and I'll try to gather more and post it, but in the meantime, any help will be really appreciated.

Cheers!
     
Dedicated MacNNer
Join Date: Oct 2000
Location: Pasadena, CA, USA
Status: Offline
Reply With Quote
Nov 7, 2001, 10:59 AM
 
Can we look at the source code? It would help tremendously.
     
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Nov 7, 2001, 05:08 PM
 
Your first goal should be to track down the infinte loop. You can do that pretty easily be adding System.out.println()'s all over the place. Then you can figure out what code is being reached correctly and what code is never reached, and by process of elimination and multiple trials figure out why an infinite loop is occuring.

HTH,
F-bacher

P.S. Source code would help
     
Senior User
Join Date: Oct 2001
Status: Offline
Reply With Quote
Nov 8, 2001, 02:20 PM
 
On what IDE did you develop it? If it's one that is available on the Mac (like NetBeans or JBuilder), just fire up the debugger and debug with breakpoints.


Stink different.
     
naepstn  (op)
Forum Regular
Join Date: Apr 1999
Location: Edmonton, AB, Canada
Status: Offline
Reply With Quote
Nov 8, 2001, 06:23 PM
 
Thanks for the suggestions, guys.

It's on the to-do list to create a JBuilder project for this app using the OSX beta version of JB. I managed to track the problem down to the point I have by using log.debug(breakpoint)-type calls all over the place, running the app and seeing what the last breakpoint listed in the log file is.

I'll see about maybe posting the relevant portion of the source code here, but I'd have to ask people much higher up first.

I'll post back when I've got the problem narrowed down a bit more.

Thanks again. Cheers!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2