pyfmodex icon indicating copy to clipboard operation
pyfmodex copied to clipboard

pytest segfault

Open bbbart opened this issue 3 years ago • 13 comments

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 https://github.com/tyrylu/pyfmodex/blob/f813ae98ced3f9d57cdaeb629bd59b27ed70faeb/pyfmodex/geometry.py#L99

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

bbbart avatar Mar 27 '21 20:03 bbbart

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.

tyrylu avatar Mar 28 '21 16:03 tyrylu

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 avatar Mar 31 '21 12:03 bbbart

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

bbbart avatar Mar 31 '21 12:03 bbbart

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

tyrylu avatar Mar 31 '21 19:03 tyrylu

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

bbbart avatar Mar 31 '21 20:03 bbbart

forwarded the issue to FMOD: https://qa.fmod.com/t/different-cone-orientation-on-linux-and-windows/16972

bbbart avatar Apr 01 '21 06:04 bbbart

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

tyrylu avatar Apr 01 '21 07:04 tyrylu

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.

bbbart avatar Apr 01 '21 08:04 bbbart

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

tyrylu avatar Apr 01 '21 08:04 tyrylu

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.

bbbart avatar Apr 07 '21 20:04 bbbart

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.

tyrylu avatar Apr 08 '21 11:04 tyrylu

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

bbbart avatar Apr 08 '21 18:04 bbbart

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.

bbbart avatar Apr 08 '21 19:04 bbbart