Skip to content

NullPointerException when checking the consistency of a violated NoGood expressed over singleton variables #78

Description

@thomasleaute

The following piece of code:

Store store = new Store ();
		
IntVar[] x = new IntVar[] { 
		new IntVar (store, "x1", 1, 1),
		new IntVar (store, "x2", 2, 2),
};
		
store.impose(new NoGood (x, new int[] { 1, 2 }));
		
System.out.println(store.consistency());

returns:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.jacop.core.IntVar.dom()" because "this.firstWatch" is null
	at org.jacop.constraints.NoGood.consistency(NoGood.java:162)
	at org.jacop.core.Store.consistency(Store.java:552)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions