Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350889 - Null pointer exception caused by solver attribute initialized not correctly modeled as transient
Summary: Null pointer exception caused by solver attribute initialized not correctly m...
Status: CLOSED FIXED
Alias: None
Product: STEM
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: 1.1.2   Edit
Assignee: Stefan Edlund CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 18:36 EDT by James Kaufman CLA
Modified: 2011-07-18 21:47 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Kaufman CLA 2011-06-30 18:36:35 EDT
The ecore model for a solve has an attribute "initialized" that is not set to Transient. This causes a null pointer exception for newly created scenarios.
To reproduce, create a new scenario using the finite difference solver and try to run it. 
The first attempt to run it will cause a null pointer exeption in the FiniteDifferenceImpl class line 74
This happens because the partitioner is null
the Partitioner is null because the newly created scenario (see the xml code) has "initialized=true"

I think the fix is to change the emf model so that initialized is transient. It already has an EDefault of false but this is not enough because the creation process initializes it.
Question for Stefan: Should not ALL solver components be transient by default? Even decorators etc.... ?

After the first attempt fails to run with a null pointer, subsequent attempts will run ok.
Comment 1 James Kaufman CLA 2011-06-30 18:37:26 EDT
Assigning to Stefan
Comment 2 Stefan Edlund CLA 2011-07-06 19:46:56 EDT
Thanks for reminding me about this EMF bug, I remember seeing it some time ago but looks like it was never fixed. You're right, all components should be transient in the solvers.
Comment 3 James Kaufman CLA 2011-07-18 21:47:33 EDT
Complete