Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Crashes on linux gtk

In the most general sense of API, it can be considered an API change, but for an Eclipse API, it's not a change.

http://help.eclipse.org/neon/topic/org.eclipse.platform.doc.isv/reference/misc/api-usage-rules.htmlexplains:
"Do not pass null as a parameter to an API method unless the parameter is explicitly documented as allowing null."

Since the API didn't allow null before, the change is just a clarification.

More information about APIs in Eclipse: https://wiki.eclipse.org/Eclipse/API_Central

Markus



From:        Daniel Megert/Zurich/IBM@IBMCH
To:        "Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
Date:        2016-08-10 10:12
Subject:        Re: [platform-swt-dev] Crashes on linux gtk
Sent by:        platform-swt-dev-bounces@xxxxxxxxxxx




Hi Leo

It's changing the API but in a binary compatible way. I'm fine with this.


Dani




From:        
Leo Ufimtsev <lufimtse@xxxxxxxxxx>
To:        
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
Date:        
09.08.2016 18:01
Subject:        
Re: [platform-swt-dev] Crashes on linux gtk
Sent by:        
platform-swt-dev-bounces@xxxxxxxxxxx




Hello,

I added null checks around the public API that could potentially lead to a null  target. (see gerrit review in bug).  This way we could tell what adds null objects before they lead to a crash.
This also allows clients to put the addRelation() and removeRelation() calls into try/catch clauses to prevent crashes.

I'm not sure if this can be classified as api change. This may be an *implicit* api change, in that it throws an unchecked exception:

https://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html
I.e, previous code doesn't have to be modified, but new code can add try/catch around a call to that api. Does anyone know if this is considered api change?

Thank you

Leo


On Tue, Aug 9, 2016 at 6:29 AM, Gurmeen Bindra <
gurmeen.bindra@xxxxxxxxx> wrote:


Hi,

I am seeing Null Pointer exceptions causing my applications using SWT to crash for 4.3 to 4.5 versions of SWT linux gtk 64 bit (ubuntu 16.04 gnome).
This happens in instances when I try to dispose widgets or getClipboard types.

java.lang.NullPointerException
       at org.eclipse.swt.accessibility.AccessibleObject.addRelation(Unknown Source)
       at org.eclipse.swt.accessibility.Accessible.addRelations(Unknown Source)
       at org.eclipse.swt.accessibility.AccessibleFactory.atkObjectFactory_create_accessible(Unknown Source)
       at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
       at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(Unknown Source)
       at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)


Anyone has any idea on how to fix this ?

I note that there is a bug open for this but no updates.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=312451

Thanks,
Gurmeen
_______________________________________________
platform-swt-dev mailing list

platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Leo Ufimtsev | Associate Software Engineer @ Red Hat
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top