Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 418478 - Apply & delete profiles has stopped working.
Summary: Apply & delete profiles has stopped working.
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Camille Letavernier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-02 05:05 EDT by Toni Siljamäki CLA
Modified: 2014-03-13 14:27 EDT (History)
3 users (show)

See Also:


Attachments
Pop-up error message (20.12 KB, image/jpeg)
2013-10-02 05:05 EDT, Toni Siljamäki CLA
no flags Details
The error log (8.22 KB, application/octet-stream)
2013-10-02 05:07 EDT, Toni Siljamäki CLA
no flags Details
Updated error log (20.65 KB, application/octet-stream)
2013-10-02 05:35 EDT, Toni Siljamäki CLA
no flags Details
Reproducible test case (35.65 KB, application/x-zip-compressed)
2013-10-02 10:53 EDT, Toni Siljamäki CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toni Siljamäki CLA 2013-10-02 05:05:22 EDT
Created attachment 236029 [details]
Pop-up error message

At some point the possibility to apply profiles stopped working.
Right now I'm using the Sept 30 release of Papyrus.

Local profiles can no longer be applied.
I have a model with two applied local profiles.

What I can do with this model is to switch one local profile
to the runtime version (registered) of the same profile,
so that new (but incomplete) function seem to work.

But I cannot apply this local profile again.
I cannot even delete/remove the applied profile. Nothing happens.

I have also created a small test profile in Papyrus, as a model.
When I copy the .profile.uml file to the project and tries to apply this
test profile as a local profile I get the attached error message.

Why do I get this error message? It could be an existing UML Profile
from a different tool that I try to reuse as is.

When I try to apply the runtime profiles shipped with Papyrus
like MARTE, SysML, UML Realtime etc. nothing happens.

There is no popup error message when this nothing happens.
This bug need to be fixed a.s.a.p.
Comment 1 Toni Siljamäki CLA 2013-10-02 05:07:29 EDT
Created attachment 236030 [details]
The error log

Here is the error log with two errors in it.
One is from an attempt to apply a proprietary runtime profile
and one is from an attempt to apply the MARTE profile.
Comment 2 Toni Siljamäki CLA 2013-10-02 05:35:30 EDT
Created attachment 236031 [details]
Updated error log

Here is an updated error log.
It has two more error messages for an attempt to apply a profile.
The last error is from an attempt to delete an applied local profile.
Comment 3 Camille Letavernier CLA 2013-10-02 09:01:20 EDT
I cannot reproduce the issue on the latest nightly build (Kepler SR1 + Papyrus Nightly 10/02)

Do you have more information about your current installation? Maybe some prior errors in the log, when starting Eclipse?
Comment 4 Toni Siljamäki CLA 2013-10-02 10:53:17 EDT
Created attachment 236041 [details]
Reproducible test case

The bug is found, quite time consuming to debug and locate...
Attached is a plug-in project containing some profiles and a test model.

 1) Generate the profiles plugin.
 2) Restart.
 3) Open the model in the "model" folder.
    It has an applied local XYZProfile (the same as in the generated plugin).
 4) Open the Error Log view and clear it.
 5) Apply the runtime XYZProfile. Works fine.
    This profile does not have any Papyrus-style version,
    because it is based on an existing legacy profile.
 6) Remove the newly applied XYZProfile. Works fine too.
 7) Apply the PPPProfile. Works fine too.
 8) Check the Error Log - There should be no errors in it.
 9) Apply the ABCProfile = crash! ...and no profile applied.
    Now there is an error message in the log.
10) Remove the appplied PPPProfile - crash! ...and no profile removed.
    Now there's another error message in the log.

From here and on there will be an "Unhandled event loop exception"
for every attempt to add or remove a profile. The only way out
from this crash-situation is to close the model and re-open it.

The only reason why it crashes, from what I have found, is that the
ABCProfile does not have a Papyrus-style version defined, which is
a bit strange, since the XYZProfile does not have it either.

When trying to apply the ABCProfile.profile.uml as a local profile
there will be a pop-up error message (like the attached) complaining
that the ABCProfile does not have a defined "PapyrusVersion".

Well... It should be up to the user to decide if the profile should have
a defined version or not = not enforced by Papyrus, and the XYZProfile
does not have a "PapyrusVersion" and works fine without it.

Papyrus should not crash if a runtime profile to apply does not
have a version defined. It should simply ignore if it doesn't.

NOTE: If you double-click on the profile in the Properties.Profile view
there will always be an "Unhandled event loop exception" in the Error Log.
Comment 5 Camille Letavernier CLA 2013-10-02 11:26:58 EDT
Hi,

Just a quick comment, as I hadn't had time to try your test case yet: Papyrus doesn't complain about the "Version", but about the "Definition".

The version is not required. The definition is (And this is an Eclipse UML2 requirement, so it is most likely the same in all other Eclipse UML2-based tools, although they might hide this)

Before applying a Profile, Papyrus checks whether it is defined. It never checks for a "Papyrus version". However, an invalid definition might lead to exceptions. I will investigate (later on) from your test case.

Thanks
Comment 6 Toni Siljamäki CLA 2013-10-02 14:50:13 EDT
Ciao.
When I say version I also mean definition, as the only way to
create a new formal version of the profile is to "define" it.

I'm not capable enough for making an archeologigal investigation of
the obfuscated legacy profile XYZProfile.profile.uml to check wheter
or not it has a version/definition defined.

Don't know what to look for in the 1400+ lines of text...
But it doesn't have a "PapyrusVersion", that's for sure.
Comment 7 Camille Letavernier CLA 2013-10-02 16:08:09 EDT
I will check that. I just wanted to be sure about the terminology
Comment 8 Camille Letavernier CLA 2014-03-13 14:27:05 EDT
I've fixed some recent regressions in e6d3972 (Related to the new profile/package loading policy).

For the attached project, the profile "ABC" is not defined. Profiles need to be defined before they can be applied.