PySCIPOpt icon indicating copy to clipboard operation
PySCIPOpt copied to clipboard

model.freeTransform() breaks debugging in VsCode

Open Joao-Dionisio opened this issue 3 years ago • 1 comments

Using a simple example, diet.py when I introduce model.freeTransform() in line 98, the debugging in vscode starts to behave in unexpected ways. Placing a breakpoint between lines 97 and 102 works well for the first iteration of the loop, but for the second iteration the code stops at the breakpoint for a few tenths of a second, and the debugging console says something like "Error [1]: server disconnected unexpectedly". If I remove model.freeTransform(), this issue does not arise. I know that it does not make sense to use it here, but this is a behavior that I have encountered several times within my own code. This is important because it is not unusual that PySCIPOpt terminates without an error message, and so debugging is crucial. I am unsure if this is an issue with my computers (it happens in both), or with vscode itself, but it seems that freeTransform() is the culprit. Below you can find the code to, hopefully, reproduce the problem. Some pictures detail the error as well.

Here is the code. diet.py.zip

First iteration of the loop works fine

image

Second iteration we get this error

image

Joao-Dionisio avatar Jul 19 '22 14:07 Joao-Dionisio

@mmghannam here you go!

As context for other people, we discovered that the code broke as a result of a segmentation fault, so it is likely to be a problem with SCIP.

Joao-Dionisio avatar Sep 22 '23 12:09 Joao-Dionisio