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

pytest segfault #22

Closed
bbbart opened this issue Mar 27, 2021 · 13 comments · Fixed by #47
Closed

pytest segfault #22

bbbart opened this issue Mar 27, 2021 · 13 comments · Fixed by #47

Comments

@bbbart
Copy link
Contributor

bbbart commented Mar 27, 2021

Running pytest on my system (Linux 64bit) with the latest libfmod libraries (version 2.1) results in some failed tests:

  • tests/test_channel.py:25
  • tests/test_channel_group.py:33

but, most notably, in a consistent segfault on

  • tests/test_geometry.py:33

The exact line where it segfaults is

_dll.FMOD_Geometry_SetPolygonVertex(self._gptr, self.index, index, vvec)

I suspect this is a problem with FMOD and not with pyfmodex, but I'm wondering if others are facing the same issue?

@tyrylu
Copy link
Owner

tyrylu commented Mar 28, 2021

Not on Windows 10 64-bit with Fmod 2.01 (latest download as of yesterday) under Python 3.9. I am not getting this test failures either, i get one expected skip and and everything else succeeds except for the custom rolloff, but i suspect that this particular thing is broken, but i am not sure why.

@bbbart
Copy link
Contributor Author

bbbart commented Mar 31, 2021

That's interesting. Here's what I'm getting, in more detail:

  • tests/test_channel.py::test_cone_orientation fails with the following message:
    E assert [1.7410261011..., 1601833.125] == [0.0, 1.0, 1.0]
    E At index 0 diff: 1.7410261011059725e-19 != 0.0
    E Full diff:
    E - [0.0, 1.0, 1.0]
    E + [1.7410261011059725e-19, 1.4074957596177471e-14, 1601833.125]
  • tests/test_channel_group.py: test_cone_orientation fails as well, with the exact same message (makes sense, I guess)
  • tests/test_geometry.py::test_polygon results in a segfault

I reckon the segfault is a bug at FMOD's end in their 64bit Linux libraries.

The differing cone orientations are stranger. After reasonable (?) rounding, it looks like on 64bit Linux the orientation is noted at [0, 0, infty] instead of [0, 1, 1].

Not sure what that's supposed to mean. Perhaps also a question for the FMOD forum? I don't think it's a problem with the Python bindings as such.

@bbbart
Copy link
Contributor Author

bbbart commented Mar 31, 2021

ah, yes, I'm testing with version 2.1 of libfmod and libfmodstudio

@tyrylu
Copy link
Owner

tyrylu commented Mar 31, 2021

I would think that these are in Fmod as well, because cone_orientation is rather straightforward to bridge.

@bbbart
Copy link
Contributor Author

bbbart commented Mar 31, 2021

yes, so maybe not a bug, but a breaking API change? perhaps we should ask FMOD directly then?

@bbbart
Copy link
Contributor Author

bbbart commented Apr 1, 2021

@tyrylu
Copy link
Owner

tyrylu commented Apr 1, 2021

Not sure, i was only able to find 2.01, if that's the one then yes, otherwise i can't see the download.

@bbbart
Copy link
Contributor Author

bbbart commented Apr 1, 2021

apologies, I do mean 2.01 as referred to on the FMOD download page as well. In the documentation however, FMOD itself refers to a version 2.1. That's why I got confused.

@tyrylu
Copy link
Owner

tyrylu commented Apr 1, 2021

Then yes, i'm running the tests under the same version and the cone related ones definitely work.

@bbbart
Copy link
Contributor Author

bbbart commented Apr 7, 2021

https://qa.fmod.com/t/different-cone-orientation-on-linux-and-windows/16972/2 <- this is interesting

perhaps @tyrylu, you could have a look at this? I'd be happy to test.

@tyrylu
Copy link
Owner

tyrylu commented Apr 8, 2021

Try if the current master works. Yes, i know, we should have the CI infracture, but the current masters thesis work takes too much time.

@bbbart
Copy link
Contributor Author

bbbart commented Apr 8, 2021

I'll test soon. Don't worry about the time; we're all doing this in our limited spare time. :-)

@bbbart
Copy link
Contributor Author

bbbart commented Apr 8, 2021

Yes! That indeed fixes it. How great. :-)

Now, we got a bit off topic here of course. The segfault is still there, but the cone_orientation stuff testing passes just fine now.

I'm leaving this open to track the segfault. I'm opening a new issue to track other failing tests. Perhaps they have an equally easy fix to them.

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

Successfully merging a pull request may close this issue.

2 participants