Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Loss of Mouse events and OBSCURED widgets
icon13.gif  Loss of Mouse events and OBSCURED widgets [message #489296] Fri, 02 October 2009 09:45 Go to next message
Thomas SZADEL is currently offline Thomas SZADELFriend
Messages: 36
Registered: July 2009
Member
Hi all,

I'm currently developing an RCP application (Eclipse 3.4.1 on Linux Redhat 5).

Basically, I need a view that contains a grid of buttons (let's say 4 rows x 6 columns).
These buttons need to be big, flat and with a solid color.
They are created at the begining and never destroyed.
Each time the user clicks on a button, the whole grid is repainted and the buttons can have a different color, visibilty and or text.

Problem: after up to 1h30, the buttons are slowly dying one after the others... They no more receive any mouse event.

In debug mode, I have seen that the Display#runDeferredEvents does not receive any event when the mouse is over them.
The widget that is related to the button has its state sets to SWT.OBSCURED.

At the begining, I used a "custom" button built on a Composite (SWT.BORDER) with a child label (SWT.CENTER) and a mouse listener.
==> The problem appears after 30 min

I have seen in the doc that the SWT.CENTER flag may cause an OBSCURED state under Linux.
Thus, I have removed all the Labels and now, I draw the text (thanks to a PaintListener)
==> The problem appears after 1h / 1h30

I have replaced the Composite by a Canvas: same result
I have replaced the Canvas by a real SWT button: same result

Finally, I have removed all the buttons and replaced them by a single Canvas on which I paint all the buttons by myself.
==> it seems to works Smile

... but unfortunately, I have another view that contains a button, a table and labels... and sometimes the problem occurs Sad

... and I can't redraw by hand the whole application!!!

So, can anybody help me???

Thanks!!
Re: Loss of Mouse events and OBSCURED widgets [message #489706 is a reply to message #489296] Mon, 05 October 2009 15:34 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

I have not heard of a problem like this before. When you say the whole grid
is repainted, do you just mean you invoke
setForeground()/setVisible()/setText() on some/all of the Buttons? The
symptoms give the impression of running out of memory, so maybe there's a
leak in swt? Are you able to provide a snippet based on your app that shows
the problem happening (ideal template:
http://www.eclipse.org/swt/faq.php#whatisasnippet )? Also, are you able to
try with eclipse 3.5.1 (
http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1- 200909170800/index.php )
?

Grant


"Thomas SZADEL" <thomas.szadel@atosorigin.com> wrote in message
news:ha4i3h$7tj$1@build.eclipse.org...
> Hi all,
>
> I'm currently developing an RCP application (Eclipse 3.4.1 on Linux Redhat
5).
>
> Basically, I need a view that contains a grid of buttons (let's say 4 rows
x 6 columns).
> These buttons need to be big, flat and with a solid color.
> They are created at the begining and never destroyed.
> Each time the user clicks on a button, the whole grid is repainted and the
buttons can have a different color, visibilty and or text.
>
> Problem: after up to 1h30, the buttons are slowly dying one after the
others... They no more receive any mouse event.
>
> In debug mode, I have seen that the Display#runDeferredEvents does not
receive any event when the mouse is over them.
> The widget that is related to the button has its state sets to
SWT.OBSCURED.
>
> At the begining, I used a "custom" button built on a Composite
(SWT.BORDER) with a child label (SWT.CENTER) and a mouse listener.
> ==> The problem appears after 30 min
>
> I have seen in the doc that the SWT.CENTER flag may cause an OBSCURED
state under Linux.
> Thus, I have removed all the Labels and now, I draw the text (thanks to a
PaintListener)
> ==> The problem appears after 1h / 1h30
>
> I have replaced the Composite by a Canvas: same result
> I have replaced the Canvas by a real SWT button: same result
>
> Finally, I have removed all the buttons and replaced them by a single
Canvas on which I paint all the buttons by myself.
> ==> it seems to works :)
>
> .. but unfortunately, I have another view that contains a button, a table
and labels... and sometimes the problem occurs :(
>
> .. and I can't redraw by hand the whole application!!!
>
> So, can anybody help me???
>
> Thanks!!
Re: Loss of Mouse events and OBSCURED widgets [message #489834 is a reply to message #489706] Tue, 06 October 2009 08:03 Go to previous messageGo to next message
Thomas SZADEL is currently offline Thomas SZADELFriend
Messages: 36
Registered: July 2009
Member
Thanks Grant for your response Wink

Grant Gayed wrote on Mon, 05 October 2009 11:34
When you say the whole grid
is repainted, do you just mean you invoke
setForeground()/setVisible()/setText() on some/all of the Buttons?

That's it: I can change the foreground/background, the text, the visibility... but the button is no more responding to the mouse events...

Grant Gayed wrote on Mon, 05 October 2009 11:34
The symptoms give the impression of running out of memory, so maybe there's a leak in swt?
This is what I thought... but it's not Sad
The application uses 16Mb (heap - measure done with jconsole) and up to 256 Mb are allowed.


Grant Gayed wrote on Mon, 05 October 2009 11:34
Are you able to provide a snippet based on your app that shows
the problem happening (ideal template:
http://www.eclipse.org/swt/faq.php#whatisasnippet )? Also, are you able to
try with eclipse 3.5.1 (
http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1- 200909170800/index.php )
?

I have already tried with eclipse 3.5 SR1... no success... is there a important change with the 3.5.1?

Unfortunaltely, I can't give you a snipped... as I can only reproduce the bug on my customer platform :\
Here is the operating system: Linux RedHat 2.6.18-128.el5 / gtk2-2.10.4-20.el5 / xorg-x11-server 1.1.1-48.52.el5 / jdk 1.6.07
My customer has informed me that its window manager is a custom one (based on wm2)... perhaps it is related...?!
Re: Loss of Mouse events and OBSCURED widgets [message #489919 is a reply to message #489834] Tue, 06 October 2009 13:42 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
> I have already tried with eclipse 3.5 SR1... no success... is there a
important change with the 3.5.1?

Nothing specific related to this problem, later versions just generally work
better than earlier ones.

> Unfortunaltely, I can't give you a snipped... as I can only reproduce the
bug on my customer platform :\
> Here is the operating system: Linux RedHat 2.6.18-128.el5 /
gtk2-2.10.4-20.el5 / xorg-x11-server 1.1.1-48.52.el5 / jdk 1.6.07
> My customer has informed me that its window manager is a custom one (based
on wm2)... perhaps it is related...?!

Perhaps, or related to the gtk version. Are they able to try on their same
machine with a more standard window manager? Or, if there's a snippet that
fails on their machine, it may be reproducable on another machine with
gtk-2.10.4. It looks like they're on RHEL5, probably with 1+ rounds of
updates applied (base RHEL5 comes with gtk2-2.10.4-16.el5, which is pretty
close) . Do you have access to a RHEL5 install?

Grant
Re: Loss of Mouse events and OBSCURED widgets [message #489922 is a reply to message #489919] Tue, 06 October 2009 14:03 Go to previous messageGo to next message
Thomas SZADEL is currently offline Thomas SZADELFriend
Messages: 36
Registered: July 2009
Member
Grant Gayed wrote

Perhaps, or related to the gtk version. Are they able to try on their same machine with a more standard window manager?

I have asked them to try with Gnome... test is in progress Smile

Grant Gayed wrote
Do you have access to a RHEL5 install?
No, I don't. That's their usual installation... and I don't think they are ready to change!

Now, I'm trying to rebuild the application with swt-motif (I know, it is a *testing version only*...)... hope it will work Confused
Re: Loss of Mouse events and OBSCURED widgets [message #489961 is a reply to message #489922] Tue, 06 October 2009 15:50 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Substituting motif should work since it's a totally different code base.
Don't worry about the *testing only* comment, it's > 99% identical to swt's
AIX and HPUX implementations. Just worry about the ugliness ;-).

Back to the GTK problem, if they still see the problem when using Gnome then
try to make a snippet (ideal template:
http://www.eclipse.org/swt/faq.php#whatisasnippet ) that makes the problem
happen for them, and log a report with SWT (
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT ).
There are RHEL5 installs available here to try this on.

Grant


"Thomas SZADEL" <thomas.szadel@atosorigin.com> wrote in message
news:hafio9$m07$1@build.eclipse.org...
> Grant Gayed wrote
> > Perhaps, or related to the gtk version. Are they able to try on their
same machine with a more standard window manager?
> I have asked them to try with Gnome... test is in progress :)
>
> Grant Gayed wrote
> > Do you have access to a RHEL5 install?
> No, I don't. That's their usual installation... and I don't think they
are ready to change!
>
> Now, I'm trying to rebuild the application with swt-motif (I know, it is a
*testing version only*...)... hope it will work :?
Previous Topic:Is it the same Command?
Next Topic:Automatically refresh of a viewer after a perspective switch
Goto Forum:
  


Current Time: Fri Apr 19 18:03:51 GMT 2024

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

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

Back to the top