Comment 47 for bug 372103

Revision history for this message
In , Mozbugz (mozbugz) wrote :

Thank you, Jan.

The way gdk_selection_property_get() is meant to work for atom property types
is that it fills |data| with GdkAtoms. These GdkAtoms come from
gdk_x11_xatom_to_atom_for_display(), which should return either a valid
GdkAtom, or on failure GDK_NONE (which is also a valid GdkAtom).

gtk_selection_data_get_targets() should only return true if the selection data
contains GdkAtoms.

The "`ATOM_TO_INDEX (atom) < virtual_atom_array->len' failed" assertion in
attachment 402344 indicates that the GdkAtoms are not valid, so something has
gone wrong in this process before the gdk_atom_name() call.

I haven't been able to reproduce here, so I'd appreciate it if someone can work out why these GdkAtoms are not valid. I would start with a break point in gdk_selection_property_get() and checking that the elements of atoms_dest are all less than virtual_atom_array->len.