# Mopidy crashes with free(): invalid pointer

**URL:** https://discourse.mopidy.com/t/mopidy-crashes-with-free-invalid-pointer/4466
**Category:** Misc
**Created:** [November 16, 2020, 7:12pm UTC](https://discourse.mopidy.com/t/mopidy-crashes-with-free-invalid-pointer/4466 "2020-11-16T19:12:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jetze\_Mellema](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jetze_mellema/32/1786_2.png) [@Jetze\_Mellema](https://discourse.mopidy.com/u/Jetze_Mellema)
#### Post date: [November 16, 2020, 7:12pm UTC](https://discourse.mopidy.com/t/mopidy-crashes-with-free-invalid-pointer/4466/1 "2020-11-16T19:12:31Z")

</div>

Latest Mopidy on latest Raspbian on Pi 4. After a few hours the server crashes with these lines in the log:

> Nov 16 19:01:40 pi4 mopidy[1617]: free(): invalid pointer  
> Nov 16 19:01:40 pi4 systemd[1]: mopidy.service: Main process exited, code=killed, status=6/ABRT  
> Nov 16 19:01:40 pi4 systemd[1]: mopidy.service: Failed with result ‘signal’.

Pretty vanilla install, but here’s my config:

> [raspberry-gpio]  
> enabled = true  
> bcm24 = play\_pause,active\_low,250  
> bcm16 = volume\_down,active\_low,250  
> bcm6 = next,active\_low,250  
> bcm5 = volume\_up,active\_low,250
> 
> [file]  
> enabled = true  
> media\_dirs = /home/pi/Music  
> show\_dotfiles = false  
> excluded\_file\_extensions =  
> .directory  
> .html  
> .jpeg  
> .jpg  
> .log  
> .nfo  
> .pdf  
> .png  
> .txt  
> .zip  
> follow\_symlinks = false  
> metadata\_timeout = 1000
> 
> [pidi]  
> enabled = true  
> display = st7789  
> rotation = 270
> 
> [mpd]  
> hostname = 0.0.0.0
> 
> [http]  
> hostname = 0.0.0.0
> 
> [audio]  
> mixer\_volume = 20  
> output = alsasink device=hw:sndrpihifiberry
> 
> [spotify]  
> enabled = true  
> username = 112155299  
> password = Oa581I4r#5mJ  
> client\_id = ea32b8de-aaa0-49de-b7b1-b5b30d40a52e  
> client\_secret = Wckptdt0L9Gj6l76eHwMK-EQy-aSuFsEqjaJBiUoezI=  
> bitrate = 320
> 
> [iris]  
> enabled = true  
> country = NL  
> locale = en\_US

Please let me know if more information is required.

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [November 16, 2020, 8:19pm UTC](https://discourse.mopidy.com/t/mopidy-crashes-with-free-invalid-pointer/4466/2 "2020-11-16T20:19:17Z")

</div>

So far all of these crashes people have reported here are due to mopidy-pidi. I’d suggest disabling the plugin and verifying the crashing stops. Then report the issue on the mopidy-pidi bug tracker.

---

<div class="post-metadata">

### Author: ![kokos](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/kokos/32/2035_2.png) [@kokos](https://discourse.mopidy.com/u/kokos)
#### Post date: [May 25, 2021, 4:10pm UTC](https://discourse.mopidy.com/t/mopidy-crashes-with-free-invalid-pointer/4466/3 "2021-05-25T16:10:23Z")

</div>

Hi both!

I have exactly same issue. Pi zero + pirateaudio + mopidy-pidi onboard as well. Is there any way to ensure this is an issue with mopidy-pidi other than elimination by disabling this extension?

//edit: I found this thread: [Mopidy crashes when pidi is enabled · Issue #12 · pimoroni/mopidy-pidi · GitHub](https://github.com/pimoroni/mopidy-pidi/issues/12)  
I’ve just updated spidev running: sudo python3 -m pip install --upgrade spidev  
Let’s see whether it helps… @Jetze_Mellema, any chance you already did that?

Thanks.

---

<div class="post-metadata">

### Author: ![kokos](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/kokos/32/2035_2.png) [@kokos](https://discourse.mopidy.com/u/kokos)
#### Post date: [May 26, 2021, 7:24am UTC](https://discourse.mopidy.com/t/mopidy-crashes-with-free-invalid-pointer/4466/4 "2021-05-26T07:24:40Z")

</div>

OK, so upgrading spidev to 3.5 definitely helps. 3.4 is faulty.
