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

segmentation fault with class constructors #23

Open
raksharuia opened this issue May 31, 2022 · 2 comments
Open

segmentation fault with class constructors #23

raksharuia opened this issue May 31, 2022 · 2 comments

Comments

@raksharuia
Copy link

If I create an object and then pass the object separately as a constructor for another class in another line, everything seems to be fine.

m=Material(1.2)
r=Planar(m)
r.N()
1

r.core()
Isotropic n=(1.2,0)

However, if I try to create and call both classes in the same command (as follows)

t=Planar(Material(1.2))
print(t)
TE (inf,nan) Theta nan

t.N()
1

t.core()
zsh: segmentation fault python

I get this Seg.. fault error. Stranger is that the error does not appear at the time of creating but when calling some function of the class. and the error does not appears for all. Here, N() function worked but the core() function caused the error.

@demisjohn
Copy link
Owner

demisjohn commented May 31, 2022

@jsenellart here’s another SegFault.
good find isolating to passing a “Material” constructor, I’d never tried combing/separating them.

@jsenellart
Copy link
Collaborator

working on it !

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

3 participants