| Summary: | [All diagrams] Multiple exceptions "Received wrong transfer data" during drag&drop | ||
|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Ansgar Radermacher <ansgar.radermacher> |
| Component: | Core | Assignee: | Project Inbox <mdt-papyrus-inbox> |
| Status: | REOPENED --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthieu.perin, ronan.barrett, rschnekenburger |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Ansgar Radermacher
Is related to bug 302065 (should we mark it a duplicate?) Cannot reproduce on the current version (0.10M6). I close the task This bug is still reproducible, but probably specific to SWT/GTK (on unix?). As stated in bug 327892, it's is very likely not a Papyrus bug. *** Bug 425746 has been marked as a duplicate of this bug. *** Roman found a good hint (thanks) in http://www.eclipse.org/forums/index.php/t/201875/ The error is caused by a check in the JFace function LocalSelectionTransfer.nativeToJava(transferData). The culprit is that the attribute "pValue" within transferData is 0. According to the documentation, pValue is: Pointer to the data being transferred. (Warning: This field is platform dependent) IMPORTANT: This field is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms and should never be accessed from application code. Thus, LocalSelectionTransfer should not raise an exception if pValue is 0. It seems to be a JFace bug. However, it might be necessary to enable the following workaround (as indicated in the forum entry above): replace the nativeToJava call with getSelection. The respective call is in function initializeGraphicalViewer() of class UMLDiagramEditor of each Papyrus diagram (need to change the template). replace return LocalSelectionTransfer.getTransfer().nativeToJava(data); with return LocalSelectionTransfer.getTransfer().getSelection(); Should be fixed with commit d2ecee698a8bd9839d7685bfc6d12b616d26751b. Roman, can you please verify. Confirmed fixed on 1.0.0.v201402030925 Now all diagram editors use the method getSelection instead of nativeToJava Hi, I am experiencing the exact same bug : Lots of "Received wrong transfer data" from jface as soon as I tried to Drag&Drop an element from tree view into a diagram (input pin into an activity in an activity diagram in my case). I am running the 32bit linux version using both Luna (1.0.2.v201508261054) and Mars (1.1.1.201508071204) version with same result. Do not hesitate to ask me if you need more info. |