Mizux Seiha

Results 71 comments of Mizux Seiha

Code is a little bit outdated, last development can be found in https://github.com/Mizux/dotnet-native/blob/main/cmake/dotnet.cmake so just need to sync both code base ASAP... BUT during the refactor I've broken the macOS...

Good question ! To be honest, at Google, C++ exceptions are forbidden so I never dig into this topic, however AFAIK SWIG provide some macros (i.e. tooling) to deal with...

According to the [doc](http://www.swig.org/Doc4.0/SWIGDocumentation.html#SWIGPlus_exception_specifications) > Exceptions are automatically handled for methods with an exception specification. Similar handling can be achieved for methods without exception specifications through the `%catches` feature.

looking at the swig code: https://github.com/swig/swig/blob/master/Lib/typemaps/std_except.swg and https://github.com/swig/swig/blob/master/Lib/typemaps/exception.swg swig should be able to catch most standard exceptions hope to play with it soon ! e.g. adding in C++ Foo class...

```gdb (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007ffff7abe537 in __GI_abort () at abort.c:79 #2 0x00007ffff7abe40f in __assert_fail_base (fmt=0x7ffff7c27128 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555556147030 "idx >= 0 && idx...

@matbesancon friendly ping to reopen it and have some update from your side ;)

Does it means that our wrapper is wrong ? i.e. https://github.com/google/or-tools/blob/858fa626959f7e386153af82756384b79f983b5a/ortools/linear_solver/clp_interface.cc#L404-L512

after investigation this error is throw in this call: clp_->addRows(build_object); ref: https://github.com/google/or-tools/blob/45770b833997f827d322e929b1ed4781c4e60d44/ortools/linear_solver/clp_interface.cc#L380 note: before this call if adding a clp_->matrix() I get a null pointer i.e.there is no packed matrix...

First "bug": we have https://github.com/google/or-tools/blob/45770b833997f827d322e929b1ed4781c4e60d44/ortools/linear_solver/clp_interface.cc#L380 calling https://github.com/coin-or/Clp/blob/756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb/Clp/src/ClpModel.cpp#L1915 which contains https://github.com/coin-or/Clp/blob/756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb/Clp/src/ClpModel.cpp#L1968-L1972 line:1968 this will call `syncronizeMatrix()` internally then line:1971-1972 may increase the matrix i.e. **matrix.rows() > numberRows_ member** then the exception...

It throw again using this code path: https://github.com/google/or-tools/blob/45770b833997f827d322e929b1ed4781c4e60d44/ortools/linear_solver/clp_interface.cc#L453 calling https://github.com/coin-or/Clp/blob/756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb/Clp/src/ClpSolve.cpp#L848 calling https://github.com/coin-or/Clp/blob/756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb/Clp/src/ClpSolve.cpp#L975-L976 calling https://github.com/coin-or/Clp/blob/756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb/Clp/src/ClpPresolve.cpp#L103-L110 calling https://github.com/coin-or/Clp/blob/756ddd3ed813eb1fa8b2d1b4fe813e6a4d7aa1eb/Clp/src/ClpPresolve.cpp#L114-L115