Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infeasible problems cause R to crash #29

Closed
travis-leith opened this issue Aug 2, 2022 · 4 comments
Closed

Infeasible problems cause R to crash #29

travis-leith opened this issue Aug 2, 2022 · 4 comments

Comments

@travis-leith
Copy link

R version 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid"
Package osqp version 0.6.0.5

When I run the following infeasible problem, R crashes.

rm(list = ls())

library(osqp)
## example, adapted from OSQP documentation
library(Matrix)

P <- Matrix(c(11., 0.,
              0., 0.), 2, 2, sparse = TRUE)
q <- c(3., 4.)
A <- Matrix(c(-1., 0., -1., 2., 3.,
              0., -1., -3., 5., 4.)
            , 5, 2, sparse = TRUE)
u <- c(0., 0., -15., 100., 80)
l <- u + 1

settings <- osqpSettings(verbose = TRUE)

# Solve with OSQP
res <- solve_osqp(P, q, A, l, u, settings)
res$x
@bnaras
Copy link
Collaborator

bnaras commented Nov 10, 2022

Ah, I do confirm this on osqp 0.6.0.7 as well. (My initial reply was wrong.)

@travis-leith
Copy link
Author

This problem still exists with R4.2.2. Would be awesome if we could get it fixed.

@travis-leith
Copy link
Author

problem still exists with R4.3.0

If I had the skills to fix this, would love to. Sadly, I do not know enough about c++

@bnaras
Copy link
Collaborator

bnaras commented Oct 3, 2023

I'm closing this issue as addressed in version 0.6.3 with a check at the R side. So an error will be thrown rather than a crash.

@bnaras bnaras closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants