Bug 569468 - [GTK3] SWT/GTK3 crash when using GTKLookAndFeel in Swing

Swing GTKLookAndFeel relies on the deprecated GDK lock to synchronize
GTK function calls from the Event Dispatch Thread.

To avoid data races, memory corruption and chrashes when using
GTKLookAndFeel, SWT also has to synchronize with the GDK lock.
Use GTK event loop functions that perform the necessary locking and
unlocking automatically.

To allow Swing objects to be created on the main thread, GTK lock has
to be reentrant. Since the default lock isn't, replace it with GRecMutex.

With GDK locking in place, EventQueue.invokeAndWait called from
the main thread is very likely to deadlock and should be avoided.

Change-Id: I3b217037f515cb695c1c3ef63387d218b559a617
Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
27 files changed
tree: 3834f82ad938f85e84d46287a59483c88ee99173
  1. bundles/
  2. container/
  3. examples/
  4. features/
  5. local-build/
  6. tests/
  7. .gitignore
  8. CONTRIBUTING
  9. LICENSE
  10. NOTICE
  11. pom.xml
  12. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Contact:

Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!