GNOME Bugzilla – Bug 144460
Invalid read of size 1 reported by valgrind
Last modified: 2004-12-22 21:47:04 UTC
==10332== Invalid read of size 1 ==10332== at 0x80A13E3: panel_profile_get_toplevel_by_id (in /usr/bin/gnome-panel) ==10332== by 0x8073BA2: (within /usr/bin/gnome-panel) ==10332== by 0x8074222: drawer_load_from_gconf (in /usr/bin/gnome-panel) ==10332== by 0x8071E3A: (within /usr/bin/gnome-panel) ==10332== by 0x692412: (within /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x68F051: (within /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x690147: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x69047F: (within /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x690AC2: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x977452: gtk_main (in /usr/lib/libgtk-x11-2.0.so.0.400.1) ==10332== by 0x80627DF: main (in /usr/bin/gnome-panel) ==10332== Address 0x3CD23730 is 0 bytes inside a block of size 1 free'd ==10332== at 0x3C023B95: free (vg_replace_malloc.c:131) ==10332== by 0x6958E3: g_free (in /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x80A4332: panel_profile_load_toplevel (in /usr/bin/gnome-panel) ==10332== by 0x8074145: drawer_load_from_gconf (in /usr/bin/gnome-panel) ==10332== by 0x8071E3A: (within /usr/bin/gnome-panel) ==10332== by 0x692412: (within /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x68F051: (within /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x690147: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x69047F: (within /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x690AC2: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.400.1) ==10332== by 0x977452: gtk_main (in /usr/lib/libgtk-x11-2.0.so.0.400.1) ==10332== by 0x80627DF: main (in /usr/bin/gnome-panel)
*** Bug 144467 has been marked as a duplicate of this bug. ***
This isn't really useful on its own - would need to know line number, more debugging info, your panel configuration etc. Effectively, you'll need to debug it to figure out what's being read and why its invalid.
This is a stock Fedora Core system with a bottom and a top panel. The error is generated when I add a drawer to the panel. I'll try to get more symbols but am having problems with -debuginfo packages and symbols not showing up even though they are installed...
Here we go with some more info (linenumbers etc.) ==4195== Invalid read of size 1 ==4195== at 0x80A0F3F: panel_profile_get_toplevel_by_id (panel-profile.c:226) ==4195== by 0x80736FA: drawer_load_from_gconf (drawer.c:564) ==4195== by 0x8071216: ??? (applet.c:743) ==4195== by 0x1BB4B5E0: ??? (gmain.c:3802) ==4195== by 0x1BB47E9A: g_main_context_dispatch (gmain.c:1942) ==4195== by 0x1BB49AC3: ??? (gmain.c:2573) ==4195== by 0x1BB49D89: g_main_loop_run (gmain.c:2777) ==4195== by 0x6DA6612: gtk_main (in /usr/lib/libgtk-x11-2.0.so.0.400.1) ==4195== by 0x80628F3: main (main.c:99) ==4195== Address 0x1C1969C0 is 0 bytes inside a block of size 1 free'd ==4195== at 0x1B904BB5: free (vg_replace_malloc.c:131) ==4195== by 0x1BB4EB91: g_free (gmem.c:186) ==4195== by 0x80A35F2: panel_profile_load_toplevel (panel-profile.c:1555) ==4195== by 0x8073634: drawer_load_from_gconf (drawer.c:731) ==4195== by 0x8071216: ??? (applet.c:743) ==4195== by 0x1BB4B5E0: ??? (gmain.c:3802) ==4195== by 0x1BB47E9A: g_main_context_dispatch (gmain.c:1942) ==4195== by 0x1BB49AC3: ??? (gmain.c:2573) ==4195== by 0x1BB49D89: g_main_loop_run (gmain.c:2777) ==4195== by 0x6DA6612: gtk_main (in /usr/lib/libgtk-x11-2.0.so.0.400.1) ==4195== by 0x80628F3: main (main.c:99)
Thanks Kjartan, this should fix it: 2004-07-06 Mark McLoughlin <mark@skynet.ie> Fixes "Invalid read of size 1" thrown up by valgrind. Report from Kjartan Maraas in bug #144460. * panel-profile.[ch]: (panel_profile_set_toplevel_id), (panel_profile_add_to_list), (panel_profile_load_toplevel), (panel_profile_load_and_show_toplevel), (panel_profile_load_object): make memory ownership easier to understand by making all these functions take a const string id. (panel_profile_create_toplevel), (panel_profile_load_added_ids), (panel_profile_delete_removed_ids), (panel_profile_load_list): free the ids in all the right places. * applet.[ch]: (panel_applet_queue_applet_to_load): similarily, make this take const sting ids and make a copy of them. * drawer.c, launcher.c, panel-action-button.c, panel-applet-frame.c, panel-compatibility.c, panel-menu-bar.c: free the ids in all the right places.
*** Bug 149151 has been marked as a duplicate of this bug. ***