Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312220 - [Xtext] Serialization raises NPE when processing rule with hidden terminal rules
Summary: [Xtext] Serialization raises NPE when processing rule with hidden terminal rules
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: RC1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-10 04:48 EDT by Johan Wannheden CLA
Modified: 2017-09-19 16:13 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: helios+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Wannheden CLA 2010-05-10 04:48:20 EDT
Build Identifier: 20100218-1602

The following grammar with rule for root object contains a rule defining the header of a model instance. No terminal rules are hidden and thus WS is explicitly given, a model instance must contain the exact text "[mydsl 1.0]" with arbitrary numbers.

MyDsl :
    header=MyDslHeader
    'mydls' name=ID
    ...
;

MyDslHeader hidden() : 
    '[' 'mydsl' WS majorVersion=INT '.' minorVersion=INT ']'
;

When serializing a model instance (using Xtext 1.0.0 M7) an NPE is raised in

org.eclipse.xtext.validation.impl.ConcreteSyntaxConstraintProvider.createElement

on line 336 because "ele" is null.

Reproducible: Always
Comment 1 Moritz Eysholdt CLA 2010-05-10 05:02:15 EDT
I'll take a look at this shortly.
Comment 2 Moritz Eysholdt CLA 2010-05-10 08:10:30 EDT
This is actually the ConcreteSyntaxConstraintProvider having trouble to digest unassigned rule calls.
Comment 3 Moritz Eysholdt CLA 2010-05-10 08:20:33 EDT
Fixed in HEAD.
Comment 4 Karsten Thoms CLA 2017-09-19 16:13:45 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.