SwiftSplines icon indicating copy to clipboard operation
SwiftSplines copied to clipboard

Sometimes it crashes on ios on certain data

Open evekeen opened this issue 3 years ago • 3 comments

Could you help me fixing this issue?

Crashed: com.apple.main-thread 0 libSparse.dylib 0x1b98da1bc _SparseTrap + 3442 1 acetrace 0x102de4350 closure #1 in closure #1 in static Spline.computeDerivatives(from:boundaryCondition:) + 1093 (SolveImplementationTyped.h:1093) 2 acetrace 0x102de3ea0 closure #1 in static Spline.computeDerivatives(from:boundaryCondition:) + 4373708448 (:4373708448) 3 acetrace 0x102de07f8 SparseMatrix.use(calculate:) + 50 (SparseMatrix.swift:50) 4 acetrace 0x102de3c08 static Spline.computeDerivatives(from:boundaryCondition:) + 44 (Spline+Computation.swift:44) 5 acetrace 0x102de57a4 Spline.init(arguments:values:boundaryCondition:) + 55 (Spline.swift:55)

evekeen avatar Jul 28 '21 12:07 evekeen

@Bersaelor I'm desperate here... Maybe you could at least point me in a right direction, so I'd fix that myself?

evekeen avatar Aug 06 '21 14:08 evekeen

_SparseTrap is a tricky error, it's not like a normal swift error where some pointer is null.

(1) could you make a minimal Unit test of your problem? This way we can share the data and compare algorithm implementations. (2) Are you sure your initial conditions aren't degenerate, i.e. the determinante is 0? It could be the system is over or underdefined.

Sorry for not having much time for this atm, I'm already working on too many other things these days...

Bersaelor avatar Aug 06 '21 14:08 Bersaelor

Thank you for reaching back! The determinant might be 0, is there a way for me to run a check? Right now I’m checking if points are on a line, because I’ve figured that causes a crash as well. I’ll try to create a unit test. The problem is that it’s something I see in the crash reports from users of my app, and I haven’t reproduced it myself yet.

Thanks, Alexander.

On Aug 6, 2021 at 10:42:07 AM, Konrad Feiler @.***> wrote:

_SparseTrap is a tricky error, it's not like a normal swift error where some pointer is null.

(1) could you make a minimal Unit test of your problem? This way we can share the data and compare algorithm implementations. (2) Are you sure your initial conditions aren't degenerate, i.e. the determinante is 0? It could be the system is over or underdefined.

Sorry for not having much time for this atm, I'm already working on too many other things these days...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Bersaelor/SwiftSplines/issues/3#issuecomment-894308829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5FIQAMCDIHTDWHBESBXXDT3PYD7ANCNFSM5BEJLUBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

evekeen avatar Aug 06 '21 15:08 evekeen