Page MenuHome

Can't get sound.factory on Windows
Closed, ResolvedPublic

Description

System Information
Operating system: Windows
Graphics card: unrelated

Blender Version
Broken: (2.80, any, master)

Short description of error
Running python "somesound.factory" on Windows ends with error:

OverflowError: Python int too large to convert to C long

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\blender-git\build_windows_Full_x64_vc16_Release\bin\Release\2.80\scripts\modules\bpy_types.py", line 543, in factory
    return aud._sound_from_pointer(self.as_pointer())
SystemError: <built-in function _sound_from_pointer> returned a result with an error set

I'm pretty sure the problem is in the file intern/audaspace/intern/AUD_PyInit.cpp , function AUD_getSoundFromPointer. long int lptr is of size 4 bytes, and I'm running 64bit system.

Exact steps for others to reproduce the error

  1. add any sound, for example in Video Sequencer
  2. run in scripting console: bpy.data.sounds[0].factory

Event Timeline

LazyDodo (LazyDodo) triaged this task as Confirmed, Medium priority.Fri, Apr 26, 5:16 PM

I can't repro the issue, but i can validate that sizeof(long int) = 4 on x64, so that's definitely not large enough for a 64 bit pointer.

@Joerg Mueller (nexyon) mind taking this one?

I can't reproduce either, but that commit should fix it. Feel free to reopen if it doesn't.

You are AWESOME! Thanks, this fixed the issue.

You're welcome. Thanks for reporting!