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

FFI interface not used properly in ngspice shared mode #24

Closed
orjan-i-nilsson opened this issue Nov 8, 2016 · 2 comments
Closed

FFI interface not used properly in ngspice shared mode #24

orjan-i-nilsson opened this issue Nov 8, 2016 · 2 comments
Labels
bug ISSUE

Comments

@orjan-i-nilsson
Copy link

examples/ngspice-shared/voltage-divider.py crashes in simulation.
Ubuntu 14.04, PySpice 0.3.0, cffi.version=='1.8.3', ngspice revision 24

Shared.py:360 (called from ngspiceshared-imp)
self = ffi.from_handle(user_data) <<<<< says something about garbage data

Change(Shared.py:335)
self_c = ffi.new_handle(self) <<<<< local variable! will be garbage collected when method returns
to
self.self_c = ffi.new_handle(self)

and
ngspice_id_c = ffi.new('int *', self._ngspice_id)
to
self.ngspice_id_c = ffi.new('int *', self._ngspice_id)

@FabriceSalvaire FabriceSalvaire added the bug ISSUE label Nov 8, 2016
@FabriceSalvaire
Copy link
Collaborator

Indeed this code must be checked and with the latest CFFI release.

@FabriceSalvaire
Copy link
Collaborator

Still missing something ???

Shared.py:360 (called from ngspiceshared-imp)
self = ffi.from_handle(user_data) <<<<< says something about garbage data

FabriceSalvaire added a commit that referenced this issue Jun 4, 2017
FabriceSalvaire added a commit that referenced this issue Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ISSUE
Projects
None yet
Development

No branches or pull requests

2 participants