Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Tabitem dispose in Linux - possible bug
icon5.gif  Tabitem dispose in Linux - possible bug [message #1715170] Thu, 19 November 2015 18:58 Go to next message
Massimo Rabbi is currently offline Massimo RabbiFriend
Messages: 29
Registered: November 2010
Location: Padova
Junior Member
Hi all,
I wanted a confirmation about a possible bug related to TabItem.
I always understood that in order to show/hide a tabitem inside a tabfolder, you dispose it and just in case you re-create it when needed (i.e: there is a button regulating the behavior): the associated control is not affected.
See also ref here: http://www.eclipsezone.com/eclipse/forums/t28246.html

It appears that there has been a change in SWT (maybe?) in the last Eclipse versions: not sure starting from which version. The problem appears in Linux platform. It seems that when you dispose the TabItem, also the associated control is disposed.
I verified this issue in our RCP product that is now based on Eclipse 4.5.1 platform while testing on Ubuntu 14.04. We never had such issue with the previous product versions based on Eclipse 3.8.2.
Moreover the expected behavior is still the same in Windows and Mac OS X platforms.

Am i getting this wrong, or as I think it's a real bug that should reported to Bugzilla? I think it's quite severe too.

Regards,
Massimo.

[Updated on: Thu, 19 November 2015 18:59]

Report message to a moderator

Re: Tabitem dispose in Linux - possible bug [message #1715309 is a reply to message #1715170] Sat, 21 November 2015 16:22 Go to previous messageGo to next message
Massimo Rabbi is currently offline Massimo RabbiFriend
Messages: 29
Registered: November 2010
Location: Padova
Junior Member
Created bug entry: https://bugs.eclipse.org/bugs/show_bug.cgi?id=482756

[Updated on: Sat, 21 November 2015 16:22]

Report message to a moderator

Re: Tabitem dispose in Linux - possible bug [message #1715329 is a reply to message #1715170] Sun, 22 November 2015 10:53 Go to previous messageGo to next message
Marco Maccaferri is currently offline Marco MaccaferriFriend
Messages: 136
Registered: July 2009
Senior Member
Il 19/11/2015 19:58, Massimo Rabbi ha scritto:

> It appears that there has been a change in SWT (maybe?) in the last
> Eclipse versions: not sure starting from which version. The problem
> appears in Linux platform. It seems that when you dispose the
> TabItem, also the associated control is disposed. I verified this
> issue in our RCP product that is now based on Eclipse 4.5.1 platform
> while testing on Ubuntu 14.04. We never had such issue with the
> previous product versions based on Eclipse 3.8.2. Moreover the
> expected behavior is still the same in Windows and Mac OS X
> platforms.


Look at the source code, there is an explanation for the new behaviour,
and it is related to GTK3 only. You can try to run your product with
GTK2 by setting the environment variable SWT_GTK3=0, this should fix
your problem. CTabFolder/CTabItem doesn't seems to have this issue,
maybe you can use that instead of the native control if you can't run
with GTK2.

> Am i getting this wrong, or as I think it's a real bug that should
> reported to Bugzilla. I think it's quite severe too.


I agree, this is an inconsistency that should be fixed.

Bye,
Marco.
Re: Tabitem dispose in Linux - possible bug [message #1715388 is a reply to message #1715329] Mon, 23 November 2015 08:44 Go to previous messageGo to next message
Massimo Rabbi is currently offline Massimo RabbiFriend
Messages: 29
Registered: November 2010
Location: Padova
Junior Member
Thanks for the information. The trick you mentioned works fine.
Unfortunately it's not a viable option. We move to 4.5.x platform because it solved a lot of problems with browser compatibility and we use a lot internal browser preview with the Browser widget.
And using GTK2 approach introduce the browser-problem back.

We will try to move to CTabFolder/CTabItem.
Where is the comment in the code you mentioned?

Regards,
Massimo.
Re: Tabitem dispose in Linux - possible bug [message #1715394 is a reply to message #1715388] Mon, 23 November 2015 09:44 Go to previous messageGo to next message
Marco Maccaferri is currently offline Marco MaccaferriFriend
Messages: 136
Registered: July 2009
Senior Member
Il 23/11/2015 09:44, Massimo Rabbi ha scritto:

> We will try to move to CTabFolder/CTabItem. Where is the comment in
> the code you mentioned?

It is in the TabItem class, setControl method.

Bye,
Marco.
Re: Tabitem dispose in Linux - possible bug [message #1715401 is a reply to message #1715394] Mon, 23 November 2015 10:32 Go to previous message
Massimo Rabbi is currently offline Massimo RabbiFriend
Messages: 29
Registered: November 2010
Location: Padova
Junior Member
Thank you very much Marco!

Regards,
Massimo.

P.S: pretty sure we will move to CTabFolder/CTabItem for now.
Previous Topic:Tooltips for disabled Buttons
Next Topic:OSGI bundle version of SWT 4.4.2
Goto Forum:
  


Current Time: Mon Dec 11 23:01:39 GMT 2017

Powered by FUDForum. Page generated in 0.02014 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software