| Summary: | NPE on Mail Sample (Riena UI) on macosx 3.7RC4 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Riena | Reporter: | Cristiano Gaviao <cvgaviao> | ||||||
| Component: | UI | Assignee: | Steffen Kriese <steffen.kriese> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | christian.campo | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 4.0.0.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Cristiano Gaviao
Like mentioned before on riena-dev, this was probably caused by accidentally installed RAP bundles. We updated the Riena targetplatform installation documentation in our wiki, to prevent this from happening: http://wiki.eclipse.org/Riena_Downloads_%E2%80%93_Installation_%E2%80%93_Setup#Installation If this solved your problem, please let us know so we can close this bug. Created attachment 198083 [details]
My Target Platform Definition File
Hi, thanks for updating the docs, it will save some people from mistakes. But unfortunately this doesn't resolve the problem stated. I've mount another eclipse installation with a new workspace, without RAP bundles. I'm attaching the target definition file, so you can take a look what was installed on my mac. cheers Cristiano I've tested this on Mac and Windows and found out, that it's not specific to MacOs. It's just a bug in the SWTViewProvider.getSwtViewId(). There is an assert to check if the node is already registered, but the nodeId is null and therefore a NPE is raised. But I'm not sure why all our other applications didn't stumble upon this issue. I fixed the NPE in SWTViewProvider and cleaned up the code in the mail-demo. Created attachment 198173 [details]
Patch for Riena 3.0 to fix the NPE in the SwtViewProvider
To fix this you can either look for code in your application that creates a NavigationNode without a NavigationNodeId or apply the provided patch. To fix this in the Riena Mail Sample open the org.eclipse.riena.sample.app.client.mail.Application and replace the line 36:
final ISubApplicationNode subApp = new SubApplicationNode("Your Mail"); //$NON-NLS-1$
with this line
final ISubApplicationNode subApp = new SubApplicationNode(new NavigationNodeId("yourmail"), "Your Mail"); //$NON-NLS-1$ //$NON-NLS-2$
Doing the fix that you recommend I could open the client application.
Don't know if it related, but I'm still seeing a error on console:
Sat Jun 18 16:31:01 BRT 2011 INFO [Thread-1] null {org.eclipse.ui.IWorkbench}={service.id=50} ServiceEvent REGISTERED
2011-06-18 16:31:01.344 java[48388:903] ERROR: Can't have a toolbar in a window with <NSNextStepFrame: 0x1001da5e0> as it's borderview
cheers
Cristiano
Forget to ask...
New applications created by Riena Toolbox has the same problematic code than Email app.
I would like to know if with the patch that you provided its safe to use this sentence create by toolbox:
ISubApplicationNode subApplication = new SubApplicationNode("Customers");
or I do need to change for this syntax:
ISubApplicationNode subApplication = new SubApplicationNode(new NavigationNodeId("customers", "Customers"));
thanks
you should (In reply to comment #10) > Forget to ask... > > New applications created by Riena Toolbox has the same problematic code than > Email app. > > > I would like to know if with the patch that you provided its safe to use this > sentence create by toolbox: > > ISubApplicationNode subApplication = new > SubApplicationNode("Customers"); > > or I do need to change for this syntax: > > ISubApplicationNode subApplication = new SubApplicationNode(new > NavigationNodeId("customers", "Customers")); > > thanks you should change it to the later syntax. We'll look into the problem with the toolbox on monday. Until then Its a good idea to manually change to code to create a SubApplicationNode based on a NavigationNodeId rather than just based on a string. |