Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
gjs
gjs
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 101
    • Issues 101
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 18
    • Merge Requests 18
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • gjsgjs
  • Issues
  • #201

Closed
Open
Opened Sep 12, 2018 by Matthew Hall@mjh

SelectionData.get_targets crashes with "Unable to resize vector"

I have been trying to implement drag and drop support, so have needed to get the targets from Gtk.SelectionData. When ever I call get_targets, the program crashes with an error message like

(gjs:4288): Gjs-ERROR **: 09:05:06.317: Unable to resize vector

I have produced a small example that demonstrates this issue:

const Gtk   = imports.gi.Gtk;


const app = new Gtk.Application();
app.connect('startup', () => {
    const window = new Gtk.ApplicationWindow({ application: app, default_height: 325, default_width: 720});

    const entry = new Gtk.Entry();

    entry.connect('drag-data-received', (entry, context, x, y, data) => {
        data.get_targets();
    });

    window.add(entry);
    window.show_all();
});

app.run([]);

Dragging and dropping a file onto the chat entry gives the error message. I am running Gjs 1.52.1

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/gjs#201