2021-10-27 12:59 AM
Good afternoon, I wrote a program for controlling the railway scoreboard in Python 3 for the STM32MP157A-DK1 board. I have a problem. It is described by the link https://bugs.launchpad.net/ubuntu /+source/gnome-control-center/+bug/1264368
Troubleshooting:
Warning: Source ID *** was not found when attempting to remove it.
I have a question which boards from the STM32MP157 family do not have this problem?
Sincerely, Alexander.
2021-10-29 05:18 AM
Hi @Vlaty.1 ,
All what I could read regarding this error seems to point that root cause come from your application trying to release a resource already release.
See comment in glib function itself "cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/usr/src/debug/glib-2.0/1_2.62.6-r0/glib-2.62.6/glib/gmain.c" :
/**
* g_source_remove:
* @tag: the ID of the source to remove.
*
* Removes the source with the given ID from the default main context. You must
* use g_source_destroy() for sources added to a non-default main context.
*
* The ID of a #GSource is given by g_source_get_id(), or will be
* returned by the functions g_source_attach(), g_idle_add(),
* g_idle_add_full(), g_timeout_add(), g_timeout_add_full(),
* g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and
* g_io_add_watch_full().
*
* It is a programmer error to attempt to remove a non-existent source.
*
* More specifically: source IDs can be reissued after a source has been
* destroyed and therefore it is never valid to use this function with a
* source ID which may have already been removed. An example is when
* scheduling an idle to run in another thread with g_idle_add(): the
* idle may already have run and been removed by the time this function
* is called on its (now invalid) source ID. This source ID may have
* been reissued, leading to the operation being performed against the
* wrong source.
*
* Returns: For historical reasons, this function always returns %TRUE
**/
Confirmed by comment in this post :
This isn't a bug in your code, and it's not a crash either. It's actually just a warning that
g_source_remove()
was called to disconnect a certain event handler that was already disconnected, in this case, in code that is part of gtk.
The warning itself was introduced in glib 2.39, in this commit, and seems like only arch linux users are affected by it because other distros haven't updated yet.
In most cases this is completely harmless, and only an annoyance. Might be worth a look if it originates with a
g_source_remove()
call in your own code.
Set a breakpoint on g_log to find what's causing it
Hope it help,
Olivier