Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359054

Summary: [Link] NullPointerException in LCA after deserialization when running in cluster
Product: [RT] RAP Reporter: Florian Waibel <fwaibel>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ruediger.herrmann
Version: unspecified   
Target Milestone: 1.5 M3   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 341761    
Attachments:
Description Flags
Extension of the test cast SessionSerialization_Test
none
Complete patched JUnit test SessionSerialization_Test.java ruediger.herrmann: iplog+

Description Florian Waibel CLA 2011-09-27 09:09:07 EDT
Using a Link widget in a clustered RWT application results in a NPE:

Exception in thread "qtp1148428095-32" java.lang.NullPointerException
	at org.eclipse.swt.internal.widgets.linkkit.LinkLCA.getTextObject(LinkLCA.java:108)
	at org.eclipse.swt.internal.widgets.linkkit.LinkLCA.renderText(LinkLCA.java:82)
	at org.eclipse.swt.internal.widgets.linkkit.LinkLCA.renderChanges(LinkLCA.java:70)
	at org.eclipse.rwt.lifecycle.AbstractWidgetLCA.render(AbstractWidgetLCA.java:36)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA$RenderVisitor.render(DisplayLCA.java:71)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA$RenderVisitor.doVisit(DisplayLCA.java:55)
	at org.eclipse.swt.internal.widgets.WidgetTreeVisitor$AllWidgetTreeVisitor.visit(WidgetTreeVisitor.java:30)
	at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:66)
	at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:55)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.renderShells(DisplayLCA.java:173)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.render(DisplayLCA.java:146)
	at org.eclipse.rwt.internal.lifecycle.Render.execute(Render.java:29)
	at org.eclipse.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:34)
	at org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:127)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:77)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:55)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:45)
	at org.eclipse.rwt.internal.service.ServiceManager$HandlerDispatcher.service(ServiceManager.java:34)
	at org.eclipse.rwt.internal.engine.RWTDelegate.handleValidRequest(RWTDelegate.java:62)
	at org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelegate.java:41)
	at org.eclipse.rwt.internal.engine.RWTDelegate.doGet(RWTDelegate.java:33)
Comment 1 Florian Waibel CLA 2011-09-27 09:11:14 EDT
Created attachment 204073 [details]
Extension of the test cast SessionSerialization_Test

The modified test reproduces the reported NPE.
Comment 2 RĂ¼diger Herrmann CLA 2011-09-27 13:40:02 EDT
(In reply to comment #1)
> Created attachment 204073 [details]
> Extension of the test cast SessionSerialization_Test
> The modified test reproduces the reported NPE.
I am afraid, the patch doesn't apply. Could you provide a working patch? Please make sure to select 'workspace' as the root of the patch
Comment 3 Florian Waibel CLA 2011-09-27 14:35:29 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > Created attachment 204073 [details]
> > Extension of the test cast SessionSerialization_Test
> > The modified test reproduces the reported NPE.
> I am afraid, the patch doesn't apply. Could you provide a working patch? Please
> make sure to select 'workspace' as the root of the 

I can apply the patch without any errors against the current git mirror of RAP with:

> git apply 0001-NPE-in-link-widget.patch

commit aa848df6d77114f62c8a39f30c0491ca4bbc6dc8
Author: ifurnadjiev <ifurnadjiev>
Date:   Mon Sep 26 18:54:00 2011 +0000

I'll add the patched file for convenience.
Comment 4 Florian Waibel CLA 2011-09-27 14:37:34 EDT
Created attachment 204114 [details]
Complete patched JUnit test SessionSerialization_Test.java
Comment 5 RĂ¼diger Herrmann CLA 2011-09-28 04:03:06 EDT
The WidgetAdapter for the Display wasn't serialized. This prevented the widget properties from being preserved after read-data. The WidgetAdapter is now being serialized.
Changes are in CVS HEAD.