Color Settings Exception

Issue #456 on hold
Robert Leach created an issue

USE CASE: WHAT DO YOU WANT TO DO?

Adjust the color settings.

STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)

I don't know if all these steps are necessary.

  1. Open a number of files in succession with different color settings/data ranges during a single TreeView3 instance, then open John Matese's 11.cdt file
  2. Quit Treeview
  3. Start treeview again and load the last file
  4. Select View->Color Settings

CURRENT BEHAVIOR

John's matrix, when I opened it was only in shades of red because the colors were set for a previous (i.e. the first) file opened in step 1. I get this exception upon trying to access the color settings in step 4:

No matching ColorSet found in ColorGradientChooser.setPresets()
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at ColorChooser.ColorPicker.loadPresets(ColorPicker.java:164)
    at ColorChooser.ColorChooserController.setConfigNode(ColorChooserController.java:68)
    at Controllers.TVController.openColorMenu(TVController.java:1055)
    at Controllers.MenubarController.execute(MenubarController.java:81)
    at Controllers.TVController$StackMenuListener.actionPerformed(TVController.java:254)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
    at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
    at java.awt.MenuItem.processEvent(MenuItem.java:628)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:351)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:339)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
    at java.awt.EventQueue.access$400(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.awt.EventQueue$3.run(EventQueue.java:691)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:719)
    at java.awt.EventQueue$4.run(EventQueue.java:717)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

EXPECTED BEHAVIOR

No exception.

Remembered color issues (e.g. all shades of red described above) should be fixed by PR62.

DEVELOPERS ONLY SECTION

SUGGESTED CHANGE (Pseudocode optional)

none

FILES AFFECTED (where the changes will be implemented) - developers only

unknown

LEVEL OF EFFORT - developers only

minor

COMMENTS

Comments (7)

  1. Robert Leach reporter

    This is how the matrix looked before I tried opening the color settings. Note, I had resized the window taller before trying to access the settings. Also note that when I just quit treeview and tried to reproduce the issue, it did happen again, but the "load last file" button had a different file there instead of John's 11.cdt file. It had the large_6kx6k.txt file.

    11cdt-color-settings-exception.png

  2. Robert Leach reporter

    Wow, in trying to reproduce this issue, I eventually happened upon a situation where there were continuous null pointer exceptions. However, it was when I tried to open one of the no labels files (either cols, rows, or both - can't remember). Maybe that's fixed with the current PR about the no labels issue. I had tried to catch one of the longer traces, but they were going by too fast and by the time I stopped the app, the only thing in the console was a ton of these errors: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException.

    So far, aside from that hiccup, I haven't yet been able to reproduce this specific issue, but let me try a couple more sequences of tries without loading a no labels file.

  3. Robert Leach reporter

    Found a new issue in testing this. I'll create it in BB in a sec. I had noticed that the example I pasted in the comments had both axes clustered and the colors were adjusted to be all red, but my current 11.cdt file had only rows clustered and mostly green, so I adjusted the colors, then went to cluster only columns and the resulting display switched the colors back to green. Clustering shouldn't change the colors...

  4. Robert Leach reporter

    After rigorous testing, I am unable to reproduce this issue. I did find out that the file I was using when the test happened had an errantly placed UID column in the middle of the file (see the column with the 2 green spots in the first image in the comments). At the time, I had renamed the file to faulty-UID-column-position-11.cdt. I recovered that file for testing to see if that had something to do with it. Still couldn't reproduce, so I am putting this issue on hold.

  5. Log in to comment