Skip to content

segfault after adding scip.addConsDisjunction #1055

@dcurrie

Description

@dcurrie

Describe the bug
After adding a pair of scip.addConsDisjunction calls the solver gets a segfault.

To Reproduce
Umm... I'm not sure, just hoping the stack trace below will help narrow down the problem.

For what it's worth the constraints added were:

        scip.addConsDisjunction([vars['aTax_unrlz'][y-1] <= 0,
                                 vars['fm_aTax_unrlz'][y] <= vars['aTax_unrlz'][y-1]])
        scip.addConsDisjunction([vars['aTax_unrlz'][y-1] >= 0,
                                 vars['fm_aTax_unrlz'][y] >= vars['aTax_unrlz'][y-1]])

Expected behavior
no segfaults

System

  • OS: macOS
  • Version 15.6
  • SCIP version pyscipopt==5.5.0
  • Install pyscipopt using pip requirements.txt

Additional context

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000108
Exception Codes:       0x0000000000000001, 0x0000000000000108

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [46805]

VM Region Info: 0x108 is not in any region.  Bytes before following region: 4336451320
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      102790000-102794000    [   16K] r-x/r-x SM=COW  /opt/homebrew/*/Python.framework/Versions/3.13/Resources/Python.app/Contents/MacOS/Python

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libscip.9.2.dylib             	       0x113854060 SCIPgetDepth + 4
1   libscip.9.2.dylib             	       0x113468510 createCons + 104
2   libscip.9.2.dylib             	       0x113466fec consCopyNonlinear + 240
3   libscip.9.2.dylib             	       0x1136fbee8 SCIPconsCopy + 104
4   libscip.9.2.dylib             	       0x113821eb4 SCIPgetConsCopy + 340
5   libscip.9.2.dylib             	       0x11340b1c0 consCopyDisjunction + 272
6   libscip.9.2.dylib             	       0x1136fbee8 SCIPconsCopy + 104
7   libscip.9.2.dylib             	       0x113821eb4 SCIPgetConsCopy + 340
8   libscip.9.2.dylib             	       0x113822164 SCIPcopyConss + 452
9   libscip.9.2.dylib             	       0x11382391c doCopy + 1104
10  libscip.9.2.dylib             	       0x113823b40 SCIPcopyConsCompression + 60
11  libscip.9.2.dylib             	       0x113724318 SCIPcopyLargeNeighborhoodSearch + 356
12  libscip.9.2.dylib             	       0x1135a7eb8 setupAndSolveSubscip + 220
13  libscip.9.2.dylib             	       0x1135a7ca0 SCIPapplyRens + 1168
14  libscip.9.2.dylib             	       0x1135a9008 heurExecRens + 436
15  libscip.9.2.dylib             	       0x113721ab0 SCIPheurExec + 164
16  libscip.9.2.dylib             	       0x11387c59c SCIPprimalHeuristics + 544
17  libscip.9.2.dylib             	       0x113881ae0 SCIPsolveCIP + 10204
18  libscip.9.2.dylib             	       0x1138497f4 SCIPsolve + 1104
19  scip.cpython-313-darwin.so    	       0x112078504 __pyx_pw_9pyscipopt_4scip_5Model_433optimize + 116
20  Python                        	       0x102f98360 PyObject_Vectorcall + 92
21  Python                        	       0x1030c14cc _PyEval_EvalFrameDefault + 8680
22  Python                        	       0x102fb4018 gen_send_ex2 + 196
23  Python                        	       0x102fb2bd4 gen_iternext + 36
24  Python                        	       0x1030bbb3c builtin_next + 72
25  Python                        	       0x1030c38fc _PyEval_EvalFrameDefault + 17944
26  Python                        	       0x102f9ada0 method_vectorcall + 324
27  Python                        	       0x102f98360 PyObject_Vectorcall + 92
28  Python                        	       0x1030c0db0 _PyEval_EvalFrameDefault + 6860
29  Python                        	       0x102fb4018 gen_send_ex2 + 196
30  _asyncio.cpython-313-darwin.so	       0x10376e28c task_step_impl + 444
31  _asyncio.cpython-313-darwin.so	       0x10376e05c task_step + 64
32  _asyncio.cpython-313-darwin.so	       0x10376f2e4 task_wakeup + 232
33  Python                        	       0x102ff48e0 cfunction_vectorcall_O + 104
34  Python                        	       0x1030ebc4c _PyObject_VectorcallTstate + 88
35  Python                        	       0x1030ebb3c context_run + 164
36  Python                        	       0x102ff46bc cfunction_vectorcall_FASTCALL_KEYWORDS + 88
37  Python                        	       0x1030c4984 _PyEval_EvalFrameDefault + 22176
38  Python                        	       0x1030bf068 PyEval_EvalCode + 200
39  Python                        	       0x1030ba2a0 builtin_exec + 440
40  Python                        	       0x102ff46bc cfunction_vectorcall_FASTCALL_KEYWORDS + 88
41  Python                        	       0x102f98360 PyObject_Vectorcall + 92
42  Python                        	       0x1030c0db0 _PyEval_EvalFrameDefault + 6860
43  Python                        	       0x103153f34 pymain_run_module + 228
44  Python                        	       0x103153318 Py_RunMain + 204
45  Python                        	       0x103153c10 pymain_main + 304
46  Python                        	       0x103153cb0 Py_BytesMain + 40
47  dyld                          	       0x194f9eb98 start + 6076

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions