RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Fri Jan 09, 2009 8:55 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Any java programmers?
PostPosted: Sun Apr 09, 2006 2:26 am 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
I'm having trouble with a memory leak in the current version of RomRaider. I've looked through pretty comprehensively and I can't find what the problem is. Basically, when you close a file, it's removing it from the GUI but seems to be remaining in memory. Apparantly there's a reference to the rom that I haven't been able to spot. If anyone reading this is a decent Java programmer, I'd really appreciate it if you could take a peak and hopefully figure out what I've missed.

More info here:
http://www.romraider.com/forum/viewtopic.php?t=170

Source here:
http://www.romraider.com/forum/viewtopic.php?t=158

I'd start by looking in ECUEditorMenuBar.openImage() and ECUEditor.closeImage()

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Sun Apr 09, 2006 12:06 pm 
Offline
Experienced
User avatar

Joined: Thu Mar 30, 2006 11:00 am
Posts: 233
Is the leak affecting anything? lol I guess this sounds ghetto, but if it doesn't hurt anything then maybe just leave it? :lol:


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 09, 2006 9:55 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
Well, it depends really.. For most people, you'll open your image, close it and be done. But if you're working on ECU definitions, it can eat up a ton of memory. I got it up to 100mb or so while I was testing.

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 3:32 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
I'm a Java programmer, I'll have a look as soon as I get some free time (maybe this weekend?) unless you fix it first. :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 3:33 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
That'd be great.. I actually have a friend that said he'd take a look at it this weekend too, but the more eyes the better.

Would you be interested in helping out in other ways too? ;)

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 3:35 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
Definitely. I just need to get a Tactrix cable so I can really do some testing, but need to figure out how to get the wife to approve it. :D


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 3:38 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
Thats why me and my wife have seperate checking accounts. ;) Just remind her how much the "other options" cost.

There are a few things I want to add, not sure if you'd be interested in doing some of them.. I'd like to add ECU Flash tools (I think we can just use Colby's, but I haven't looked in to it much yet) and logging (we could peak through Calvin's code for help here). A hex viewer would be nice, too, and I haven't found a GPL library to do that.

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue May 09, 2006 2:42 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
I finally had a chance to look at the source and using some of the heap dumping tools in Java 6 beta I've got some ideas on where the memory leak is.

Just some comments on what would make it easier for others interested in development to jump in:

I had to download 3 external java libs to get things to compile. They're found in the lib dir of the binary distribution, but knowing what they were would help. ;)

A sticky in the Source Code forum listing what external libs are used with a link to the home page so that API docs could be found. I'd write it myself but I'm at work now and don't have the links handy. :) Perhaps a README file in the source files as well?

Code looks fairly clean, so that's good!


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 2:49 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
That's a good idea, I'll try to write something up tonight. I bet a comment or 2 would probably help other people contribute, too.. :) I've been meaning to go back and do that, as well. I'll go ahead and schedule that for right after 1.0 is released.

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed May 10, 2006 3:47 am 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
BTW, I've got the memory leak fixed. I'll clean it up and post up a diff tomorrow, for now I need to sleep. :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 7:47 am 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
Awesome! Thanks! What was the problem?

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed May 10, 2006 2:35 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
Just missing some clean up to the references to the Rom and RomTreeNode which was leaving tons of DataCell objects in the heap that the JVM didn't know how to get rid of.

After the fix the JVM memory sits around 40MB where before it would climb steadily with each image refresh until it locked up as the JVM ran out of memory.

How do you prefer to get the update? Upload each updated java file? Diff/Patches?

I did a bit of cleanup with some other warnings that Eclipse was bugging me about at the same time, do you want me to split those changes out?

Weren't you planning on getting the source hosted by SourceForge or something?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 2:48 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
drees wrote:
How do you prefer to get the update? Upload each updated java file? Diff/Patches?

Good question.. I'm open to suggestions. Version control software (like sourceforge) would probably be the best but it's going to be a real pain to set up (I think), and I'm sure it's blocked here at work so I wouldn't be able to do much here. I dunno..

_________________
jared.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed May 10, 2006 3:44 pm 
Offline
RomRaider Developer
User avatar

Joined: Thu Mar 23, 2006 5:21 am
Posts: 454
Location: San Diego, CA
Well, just because it's blocked at work doesn't mean that you can't queue up any fixes for later when you get home, does it?

I'm used to using diffs/patches for updates, but that's mainly because I usually do my development on a mix of Unix/Windows. Whatever works for for you works for me since you control the source. :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 3:48 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 1770
Location: Palo, IA
I've never used CVS before and don't know the first thing about doing it with sourceforge. Have you done it?

_________________
jared.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl
phpBB SEO