This program works, but it has the following issues:
(Note: This post was deleted and re-submitted in order to update the
file list. There is now in the troublshooting folder, a listing of the
Object_tracking log, which was missing from the original posting.)
See the Screenshot photo in the topmost folder for how I use this app.
Also, the screenshot
shows the System Monitor, with two of these apps running, the one
highlighted has run for hours and uses 126.5 MiB of memory, where as the
instance that was just started uses 95.3 MiB of memory, but the memory
usage can increase by 10 MiB in just a minute or two.
The app is doing nothing by refreshing the window every minute. It is
not doing anything that should require more memory as it runs.
Also, several times the app has caused my computer to go to 100% on one
processor core for what has been as short as a couple of minutes, to
well over ten minutes (after which I “killed” the program, as it would
not respond or close). I don’t know if JRuby was doing a massive garbage
collection, or if the program had crashed. On at least one occasion, the
app was still operational after it went back to normal CPU usage, except
that the clock display incremented late, by twenty seconds, as though
the program had stopped for twenty seconds.
Problem 1:
The app starts with about 92 MiB, and quickly increases its memory usage
up to almost 150 MiB. What can I change in my program to keep the memory
usage from running away?
In the “Troubleshooting” folder, are some memory dumps.
Problem 2:
When I am using the Google Chromium web browser, and working on one
particular site, the behavior of my JRuby GUI becomes erratic, and even
crashes. I have only experienced this with one particular website:
I typically have four tabs with this same webpage open at once, where I
type in a word that I want the website dictionary to look up for me.
Eventually, the website stops responding, and my JRuby app has
malfunctioned, or crashed. Could it be that the Chromium web browser is
sharing memory with Java or JRuby, and somehow the shared memory is
getting corrupted?
My System Monitor shows that 1.5 GiB of 3.7 GiB of RAM is typically
being used at these times.
In the “Troubleshooting” folder, are some memory dumps.
Problem 3:
This is not a critical issue (the above issues are). However, when I use
JWindow for my GUI, it operates in an “always on top” fashion from a
display point of view, meaning that I can “type right through it” to the
underlying editor applicaton. JWindow is ignoring everything but
right-clicks, which is what I want, but it is remaining on top of the
other apps that have the focus. I found on the Internet a comment that
this was a bug unique to Gnome, but that was a several year old comment,
and it said that the bug had been fixed. I have not tried my app on
Windows, so I don’t know whether this is a Gnome issue or not.
Explanation relative to the window type:
In searching the Internet for how to produce a window that:
- has no border (undecorated)
- has no taskbar icon
- is not “always on top”
I was frustrated by the lack of answers of how to create such a window,
and especially the most common remark was: “Well why would anyone want
to do that?”
So I will explain why now. If you look at my screenshot, you will see
exactly that kind of window, except that it does have a taskbar icon. I
don’t want a task bar icon, because I will often have many of these
borderless windows running at the same time and I don’t want to fill up
my taskbar with icons for these windows. I don’t need a border or
taskbar icon for this type of window, since I control everything through
my right-click menu.
I can get two of three of these requirements (so far). The JWindow does
not produce the taskbar icon, but it seems to be stuck “always on top”.
The doc’s say that it does not have to be “always on top”, so I assume
that it has a bug now.
JDialog was suppose to not have a taskbar icon, but it does. JFrame and
JDialog work perfectly for my application, but they produce a taskbar
icon. If I could “turn off” the taskbar icon for either of these, then I
would have what I had when I used wxRuby.
Why no border? I use these windows as “keep me informed” images on my
desktop. I may group several of them together, or separately in various
parts of the screen. The border just wastes screen space. These windows
are not being worked with, they are just “background information” lying
there on my screen, waiting for me to notice them. Most of the time,
they are covered up by the windows that I am working with.
My computer:
Sony Vaio VPCZ1, Intel quad-core, 2.5GHz, 4GB Ram, SolidState Hard Drive
Screen: 1600 x 900, The top 25 pixels are the only system area, for
the panel.
Ubuntu 11.04 Desktop 64 bit, running Gnome (not Unity).
Java from Ubuntu repository: sun-java6-jdk (6.26-1natty1)
JRuby-1.6.3 installed by RVM. (RVM + Bundler configuration)
Rails is not installed.
NetBeans 7.0 IDE