#7 Nullpointer in ExtensionalSupportSTR

closed-fixed
nobody
5
2011-04-27
2011-04-19
Andrea Rendl
No

Hello again,

On another instance we have another error: a Nullpointer when using an extensional constraint (ExtensionalSupportSTR). The exception does not occur when using ElementInteger instead of the extensional constraint.

Thanks for your help,
Andrea
(andrea.rendl@ait.ac.at)

java.lang.NullPointerException
at JaCoP.constraints.ExtensionalSupportSTR.queueVariable(ExtensionalSupportSTR.java:672)
at JaCoP.core.Store.addChanged(Store.java:499)
at JaCoP.core.IntVar.domainHasChanged(IntVar.java:463)
at JaCoP.core.SmallDenseDomain.in(SmallDenseDomain.java:569)
at JaCoP.core.SmallDenseDomain.inMax(SmallDenseDomain.java:1032)
at JaCoP.constraints.XplusYlteqZ.consistency(XplusYlteqZ.java:109)
at JaCoP.core.Store.consistency(Store.java:634)
at JaCoP.search.DepthFirstSearch.label(DepthFirstSearch.java:524)
at JaCoP.search.DepthFirstSearch.label(DepthFirstSearch.java:691)
at JaCoP.search.DepthFirstSearch.label(DepthFirstSearch.java:691)
at JaCoP.search.DepthFirstSearch.label(DepthFirstSearch.java:691)
at JaCoP.search.DepthFirstSearch.label(DepthFirstSearch.java:691)
at JaCoP.search.DepthFirstSearch.label(DepthFirstSearch.java:762)
at JaCoP.search.DepthFirstSearch.label(DepthFirstSearch.java:691)
at JaCoP.search.DepthFirstSearch.labeling(DepthFirstSearch.java:946)
at at.ac.ait.carelog.cpmodule.JacopCPModel.solve(JacopCPModel.java:197)

Discussion

  • Hi Andrea,

    A quick fix is to use ExensionalSupportVA, It is likely to be slower than STR but quicker than Element.

    The error can be caused by multiple reasons. Can you send me by email some code so that I can replicate the bug on my machine?

    This never has ocurred before, maybe your code violates some invariant and we have not checked it. It may be the problem with SmallDenseDomain which is relatively recent piece of code so that there may be some bugs that cause STR to fail because it assumes something which is not true.

    best,
    Radek

     
  • Andrea Rendl
    Andrea Rendl
    2011-04-27

    • status: open --> closed-fixed
     
  • Andrea Rendl
    Andrea Rendl
    2011-04-27

    Hej!

    I have fixed this bug and updated svn.

    /Kris