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

Crash (null pointer) when calling functions without a valid solution #56

Open
PMeira opened this issue Apr 10, 2019 · 4 comments
Open
Milestone

Comments

@PMeira
Copy link
Member

PMeira commented Apr 10, 2019

Many functions require a valid/initialized state or otherwise will crash. For example, any function that calls cktelement.GetCurrents should crash.

This happens both in official COM and C-API, so it's not urgent.

We need to select the proper places to check this. Checking ActiveCircuit.IsSolved might be enough for the general circuit, checking if cktelement.NodeRef is not null seems enough for individual circuit elements.

@PMeira PMeira added this to the 0.11 milestone Apr 10, 2019
@PMeira
Copy link
Member Author

PMeira commented Mar 4, 2020

I noticed the Topology interface can also crash without a valid solution, while testing it to reply to this thread: https://sourceforge.net/p/electricdss/discussion/beginners/thread/9add05221d/

@PMeira
Copy link
Member Author

PMeira commented Jul 30, 2020

ActiveCircuit.IsSolved needs a converged solution, which is not ideal.
I added some checks for NodeV (for the system), probably will need more in both the interface and internal code. NodeRef (each CktElement has an array) might be useful.

@PMeira
Copy link
Member Author

PMeira commented May 15, 2021

I haven't received any crash reports recently. v0.12 adds more error messages, let's see how it goes.

@PMeira
Copy link
Member Author

PMeira commented Oct 12, 2021

I noticed some reports (DSS commands show, export) can also segfault, so we should check those too before closing this even if the basic API calls are OK-ish now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant