NSAutoResizingMaskLayoutConstraint errors with selectInput (Processing 3.0, MacOSX)

I'm getting a bunch of NSAutoResizingMaskLayoutConstraint error messages when I use selectInput in my sketch. I can get it to run, but I get a whole bunch of errors in the console.

Here's a simplified sketch based off the selectInput example on the Processing 3.0 / Changes page (scroll to section on selectInput).

File selectedFile = null;
void setup(){
  size(800, 200);
  selectInput("Pick File", "fileSelected");
}

void draw(){
  if(selectedFile == null){
    background(0);
  } else {
    background(255);
    fill(50);
    textSize(20);
    textAlign(CENTER);
    text("File Loaded!", width/2, height/2);
  }
}


public void fileSelected(File selection) {
  if (selection == null) {
    println("Window was closed or the user hit cancel."); 
  } else {
    println("User selected " + selection);
    selectedFile = selection;
  }
}

And this is the error message I get in the console.

2015-10-15 06:53:31.484 java[1236:46855] Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x7f97eaef5bb0 h=--& v=--& V:[FI_TBrowserBackgroundView:0x7f97eaf82640(0)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x7f97eaef55c0 h=-&- v=-&- V:|-(0)-[FI_TListScrollView:0x7f97eaf56690]   (Names: '|':FI_TBrowserBackgroundView:0x7f97eaf82640 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x7f97eaef5570 h=-&- v=-&- V:[FI_TListScrollView:0x7f97eaf56690]-(0)-|   (Names: '|':FI_TBrowserBackgroundView:0x7f97eaf82640 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x7f97eaef2e30 h=-&- v=-&- V:[NSClipView:0x7f97eaf562a0]-(15)-|   (Names: '|':FI_TListScrollView:0x7f97eaf56690 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x7f97eaef2de0 h=-&- v=-&- V:|-(0)-[NSClipView:0x7f97eaf562a0]   (Names: '|':FI_TListScrollView:0x7f97eaf56690 )>"
)

Will attempt to recover by breaking constraint 
<NSAutoresizingMaskLayoutConstraint:0x7f97eaef2e30 h=-&- v=-&- V:[NSClipView:0x7f97eaf562a0]-(15)-|   (Names: '|':FI_TListScrollView:0x7f97eaf56690 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.

I googled NSAutoresizingMaskLayoutConstraintVisualizeMutuallyExclusiveConstraints to YES and the answers all seem to be XCode related.

I tried the command below in Terminal (based on this StackOverflow answer) and it now draws a purple box around my file-loader GUI but doesn't actually remove the errors.

defaults write -globalDomain NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints YES
# Turn this back off with "NO" in place of "YES" above

Any help would be much appreciated!

(I am on MacOSX Yosemite 10.10.1, running Processing 3.0)

Answers

  • Apologies for a 'me too' post with no solution, but I can confirm that I'm seeing the same errors using Processing 3.1 and MacOS 10.10.5.

    There are a couple of bug posts (https://bugs.openjdk.java.net/browse/JDK-8139171 and https://bugs.openjdk.java.net/browse/JDK-8074185) on the Open JDK site with the same issue, but both have been closed as 'cannot reproduce', which is frustrating since I can reproduce the error every time I use my Processing app.

    Interestingly, the test code you posted above doesn't initially trigger the error for me. However, when I moved the selectInput() call to within mouseReleased(), I get the error every time the file dialogue is opened, except the first time; Each subsequent click triggers the error.

Sign In or Register to comment.