Blank Load on Ubuntu
USE CASE: WHAT DO YOU WANT TO DO?
Open a large file on Ubuntu
STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)
- Run an Ubuntu VM with 4G memory
- Run treeview (latest master as or 5/26/2017)
- Open the large_6kx6k_average_4.cdt file (with atr and gtr files next to it)
- Open the small_133x133.txt file
- Open the large_6kx6k_average_4.cdt file again
CURRENT BEHAVIOR
The first time you run treeview, step 3 results in a blank white matrix loading and only the row row and left-most column's label is shown on hover. Step 4 produces a normal matrix with no problems. Step 5 again loads a blank matrix, but the label panes work normally and you can select, navigate and zoom.
Also, the following is printed in the terminal:
Checking if preferences exist for the new file.
Target node not found. Could not copy data.
Using import dialog.
Painting repaint call 2324
Resetting model.
Adding data to model...
Calculating mean.
Calculating median.
Truncating sorted data array.
Resetting MapContainers and DendroView components.
Could not find or create MapContainer node because parentNode was null.
Could not find or create MapContainer node because parentNode was null.
Could not find or create MapContainer node because parentNode was null.
Could not find or create MapContainer node because parentNode was null.
Could not find or create ColorPresets node because parentNode was null.
Could not find or create MatrixViewController node because parentNode was null.
Error: Could not find or create ArrayameViewnode because parentNode was null.
Error: Could not find or create ColumnLabelView node because parentNode was null.
No old node was found when trying to copy old preferences. Aborting import attempt.
Found Existing node in MRU list for /home/robleach/host/large_6kx6k_average_4.cdt
Creating subNode File1495837871278
Creating new fileset /home/robleach/host/large_6kx6k_average_4.cdt
Restoring components states.
Successfully loaded: /home/robleach/host/large_6kx6k_average_4.cdt
EXPECTED BEHAVIOR
File opens as normal.
DEVELOPERS ONLY SECTION
SUGGESTED CHANGE (Pseudocode optional)
I'm not sure what's happening here, so I'm not sure where to start. Since it complains about preferences nodes, I tried resetting preferences. I tried moving the jar and the files out of the shared folder from the host system.
FILES AFFECTED (where the changes will be implemented) - developers only
unknown
LEVEL OF EFFORT - developers only
medium
COMMENTS
Comments (5)
-
reporter -
reporter - changed status to open
Starting work.
-
reporter - changed status to resolved
This resolves issue 547 - blank load on Ubuntu for large data files.
There were 2 issues:
-
An out of memory exception was silently occurring in a SwingWorker thread and the main thread proceeded without realizing that the data was not fully loaded.
-
2 copies of the large data matrix were being created, which was unnecessary. While it may be unnecessary to create any copies, I eliminated the need for the second copy by retrieving the array index of the first occurrence of a NaN or infinite value and then using that value to get the median from the un-truncated array.
I also noted that when the failure occurs, the user is "returned" to the openFile dialog, even if they used the "Open Last File" button. I will create an issue for that.
→ <<cset a9965a3735f7>>
-
reporter The problem turned out to be an exception happening in a swingworker that slips by completely unnoticed. The parent thread moves on without ever knowing that the load failed. I added a flag in TVController that the worker sets to true as it's last line of code and that allows the main thread to know something went wrong (if it's not true).
I also reduced the amount of memory needed for finding the median which avoids the exception all together, resulting in a successful load.
Also included a warning to the user.
I will be adding a catch for the exception.
-
reporter - changed status to closed
Merged to master
- Log in to comment
On the first open of a file (which has actually been opened before but for which prefs weren't [fully?] saved):