<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 220: remove_event_detect() may produce a memory access error - system exit</title><link href="https://sourceforge.net/p/raspberry-gpio-python/tickets/220/" rel="alternate"/><link href="https://sourceforge.net/p/raspberry-gpio-python/tickets/220/feed.atom" rel="self"/><id>https://sourceforge.net/p/raspberry-gpio-python/tickets/220/</id><updated>2024-12-13T15:41:38.655000Z</updated><subtitle>Recent changes to 220: remove_event_detect() may produce a memory access error - system exit</subtitle><entry><title>remove_event_detect() may produce a memory access error - system exit</title><link href="https://sourceforge.net/p/raspberry-gpio-python/tickets/220/" rel="alternate"/><published>2024-12-13T15:41:38.655000Z</published><updated>2024-12-13T15:41:38.655000Z</updated><author><name>Oliver Maye</name><uri>https://sourceforge.net/u/omaye/</uri></author><id>https://sourceforge.netb6ad8f72c1a12b20006b0f95de4b7375a6ab5bad</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;After ramping up and running a GPIO pin in input direction and using interrupts, the sutdown procedure terminates abruptly when calling move_event_detect() with nothing more than "Memory access error" ("Speicherzugriffsfehler") written on the console.&lt;/p&gt;
&lt;p&gt;I suggests focussing on py_gpio.c#py_remove_event_detect() around line #760. It seems as if the callback memory structures are free'd (in line #767) way before actually muting the interrupt through a call of remove_edge_detect() (in line #777). If an interrupt happens to occur right in between, the remaining code may refer to memory, that is actually released, already.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>