Log in

View Full Version : Smart Dashboard - SquareTrackerExtension quit unexpectedly


detruby
30-01-2012, 15:53
Running Smart Dashboard extension (example) SquareTrackerExtension - after a short time dashboard crashes with

quit unexpectedly while using the libopencv_code.2.3.dylib plugin.

I am running on mac OSX. I have attached the osx crash report.

basicxman
30-01-2012, 22:33
[speculation based on an observation from my last meeting that I never got around to investigating]

Could you run it and monitor your memory usage? I think the SmartDashboard has a memory leak. If so you should notice some very drastic accumulating memory usage.

EDIT: Could be reading the crash report wrong, but I think I might be right:

Physical Memory: Page Size = 4k, Total = 4096M, Free = 9M
<snipped>
TOTAL 1.4G

detruby
31-01-2012, 16:13
I started the osx activity monitor and then ran the smart dashboard. after adding the SquareTracker widget to the dashboard - virtual memory continued to climb until it ran out - then crashed. From watching the memory while changing what the camera sees - it appears to only climb while objects are found (red border is drawn). I am attaching the photo (I hold a color print out in this front of the camera) and the SquareTracker source (I made a couple changes so it tracks better with the photo).

PS. before doing the test above, I deleted all libraries and source I was using and re-downloaded to make sure I had the latest versions of the smart dashboard (and the internally related projects) and wpilibjava. For all lines of java I changed in SquareTrackerExtension.java, I left the original line (commented out) - if that helps.

Dave Truby, team 4145 mentor

detruby
10-02-2012, 08:01
I see a fix was committed to the trunk. I updated from the trunk, re-built and tested. It runs a lot longer before running out of memory.

Dave Truby