Bug 569647 - [GTK] Memory leak related to Gestures
Summary: [GTK] Memory leak related to Gestures
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.19 M1   Edit
Assignee: Alexandr Miloslavskiy CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-12-10 18:28 EST by Alexandr Miloslavskiy CLA
Modified: 2021-05-04 11:38 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Miloslavskiy CLA 2020-12-10 18:28:41 EST
There is a memory leak related to OS.g_signal_connect(). To reproduce, it's sufficient to run code like this:

  for (int i = 0; i < 100; i++) {
    Shell item = new Shell(display);
    item.dispose();
  }

I'm currently investigating.
Comment 1 Eclipse Genie CLA 2020-12-10 20:00:25 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/173684
Comment 2 Alexandr Miloslavskiy CLA 2020-12-10 20:04:46 EST
Eventually I was able to track this leak with Valgrind (after struggling to make it work with Java).

In its leak report, I saw numerous leaks from:
* Java_org_eclipse_swt_internal_gtk_OS_g_1signal_1connect
* Java_org_eclipse_swt_internal_gtk_GTK_gtk_1gesture_1drag_1new
* Java_org_eclipse_swt_internal_gtk_GTK_gtk_1gesture_1zoom_1new
* Java_org_eclipse_swt_internal_gtk_GTK_gtk_1gesture_1drag_1new
* Java_org_eclipse_swt_internal_gtk_GTK_gtk_1gesture_1rotate_1new

With the patch, these leaks are gone.
Comment 3 Andrey Loskutov CLA 2021-01-01 13:28:29 EST
Regression from bug 482018.
Comment 5 Alexandr Miloslavskiy CLA 2021-01-06 07:57:45 EST
Thanks for reviewing!