Opening a file with fewer label headers than the one that was selected in the previous file throws an exception

Issue #283 closed
Robert Leach created an issue

USE CASE: WHAT DO YOU WANT TO DO?

Open a second new file that has fewer label headers than the number of the selected label header in the currently open file.

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

  1. Open John Matese's 11.cdt file
  2. Select View->Labels...
  3. Select the last label for rows and columns & click OK(?)
  4. Type command-o to open a new file
  5. Select the 6kx6k test file and click open(?)

CURRENT BEHAVIOR

Exception is thrown and load hangs.

EXPECTED BEHAVIOR

A new file is opened successfully.

DEVELOPERS ONLY SECTION SUGGESTED CHANGE (Pseudocode optional)

Short-term: Check to make sure the label header is present. If there aren't that many label headers, revert to the last available. Long-term suggested change: save the selected label type per file and check to make sure it's present. If there aren't that many label headers, revert to the last available.

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

HeaderSummary

LEVEL OF EFFORT - developers only

medium

COMMENTS

This is loosely related to issue #282 and #252 and was found coincidentally after fixing #282 by accident while working on an unrelated issue (because John Matese's file was already open).

Comments (6)

  1. Robert Leach reporter

    I have averted the exception and hang by re-initializing the headersummaries' included data member. I'm not sure I yet understand what the included data member holds, but I see that it must have something to do with selections. I will submit another commit request for the fix, but after getting past this issue, I ran into another. The data loads, but the colors are way off (all green). I'll be creating issues related to that as well.

  2. Robert Leach reporter

    Committed the fix to master. I'd have waited for the CCB Librarian approval, but since I did it on my local copy of master, I needed to commit & push before moving on. in the future, I will branch all changes so that I can do concurrent/subsequent work.

  3. Log in to comment