|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Debugging the Java Heap
One of my plugins is eating all of the Java Heap and I'm having difficulty tracking down the bug. Is there a way to see what Objects are in the Java Heap?
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#2
|
||||
|
||||
What you are looking for is a Java Profiler. I've never run one with sagetv before, but you may be able to start here...
http://java.sun.com/developer/techni...ing/HPROF.html And then see, if perhaps, your IDE has any profiling tools. I used to use JRat a long time ago as well... but I haven't actually used any recent ones (I think eclipse that TPTP?? Testing and Performance something). Netbeans has something as well. Typically, if you are running out heap space... you might have an endless loop condition. I use the FindBugs plugin a lot to help me "clean" up my code. It finds all sorts of little programming gotchas... it's pretty easy to use, and you can run it from eclipse, against a project (which is what I do)... you might want to run it first, to see what it finds. i recommend running it anyways.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#3
|
|||
|
|||
I second Stuckless's recommendation of using FindBugs - it is a great static analysis tool.
I can recommend JProbe as well, JDB is a great start - but since you are not invoking the JVM - I am not sure how you are going to attach any tool to the running VM. There are tools for analyzing heapdumps - If you are on windows, I am not sure how you can force sage to create a heapdump either. On linux, you might be able to send a kill command and create a heapdump - depending on the JVM. You can attach with JConsole - but I don't think that will give you any details about memory usage. Do you have any idea what might be causing it? Could share that part of the code and I am sure others could look for some unintended object retention. |
#4
|
||||
|
||||
Sean, broconne,
Thanks for the suggestions. I'm using Netbeans as an IDE so I'll see what tools I can find there. I have no idea what code is causing the out of memory error, but I think it's an endless loop somewhere because there is a slight delay before things blow up. It might also be caused by my caching of data in memory. I remove all references to the data when I'm done so the GC can reclaim the memory but maybe it's taking a long time to cleanup? Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#5
|
|||
|
|||
Quote:
Thanks, Jeff |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Java Heap Size | rickgillyon | SageTV Beta Test Software | 48 | 12-14-2011 04:47 AM |
Java Heap Size | craigap | SageTV Media Extender | 21 | 03-27-2010 10:53 AM |
HD-PVR and java heap | dead_ferrets | Hardware Support | 11 | 12-10-2009 09:54 AM |
Java Heap help | gibsonpa | SageTV Software | 3 | 08-06-2008 03:11 PM |
Java Heap in vista | hellsingfan | SageTV Software | 3 | 06-29-2008 06:57 PM |