question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python error: deallocating None

See original GitHub issue

Hi,

First, let me thank you for sharing this great tool with the community. I’m using the room impulse response tool to generate a large amount of RIRs to perform data augmentation. Each time I run my script, I get this error at the 19208th call of the function compute_rir():

Current thread 0x00007f0e73bf3700 (most recent call first):
  File "[...]/.local/lib/python3.5/site-packages/numpy/core/_internal.py", line 477 in Stream
  File "[...]/.local/lib/python3.5/site-packages/numpy/core/_internal.py", line 449 in _dtype_from_pep3118
  File "[...]/.local/lib/python3.5/site-packages/numpy/ctypeslib.py", line 436 in as_array
  File "/usr/local/lib/python3.5/dist-packages/pyroomacoustics/room.py", line 652 in image_source_model
  File "/usr/local/lib/python3.5/dist-packages/pyroomacoustics/room.py", line 683 in compute_rir
  File "/usr/local/lib/python3.5/dist-packages/pydsp/simulator.py", line 33 in rir
  File "../batches/rooms_simultator.py", line 67 in <module>
  Fatal Python error: deallocating None

From my understanding, this error might be due to bad deallocation of memory in the C/C++ routine (I know pyroom uses C optimized code to generate RIR faster). Have you ever encounter this issue before?

Thank you,

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
fakufakucommented, Mar 23, 2018

Thanks! Because I could write my own unit test for this and check it failed before and doesn’t fail with bugfix, I’m pretty sure something was fixed. So I pushed a new release (0.1.17). So no need to go through the procedure above, just upgrade through pip (if that is what you use).

I’ll close that for now, but feel free to reopen it in case it didn’t actually fix the problem.

1reaction
fakufakucommented, Mar 21, 2018

Thanks for the details. I’m trying to see if the bug happens for a test case I wrote based on this template.

I am also aware that I am doing some sketchy things with memory allocation in the C extension. I will try to fix this, but it might take a few days. Please hang on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I need help with a "deallocating none" error
I get the feeling though that something in my code is corrupting a pointer within Python scope. This error is pretty repeatable -...
Read more >
Fatal Python error: deallocating None · Issue #11
This issue seems to be correlated with #10. Py_None is freed too many times because each node tries to Py_DECREF its own value,...
Read more >
multiBigwigSummary - Fatal Python error: deallocating None
Hi, Using deeptools 2.0.1 (but same pb since 2.0.0), multiBigwigSummary fails for anything >4 bigwigs with the error: Fatal Python error: deallocating None...
Read more >
Issue 6674: Fatal error: deallocating None
I'm using the megahal mh_python module to make a bot instance learn from a several 100 files. The code works as it should...
Read more >
Fatal Python error: deallocating None by Dmitry Kovalevskiy
Hey Dmitry it sounds like an out of ram error. Deallocation is releasing a variable normally during a garbage collection. If there was...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found