Bug 4009 - Java error when creating a project with invalid title
Summary: Java error when creating a project with invalid title
Status: RESOLVED FIXED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5.4
Assignee: Jessica
QA Contact:
URL:
Whiteboard:
Depends on: 4008
Blocks: 3539
  Show dependency tree
 
Reported: 2013-03-11 15:58 UTC by Alexandru Georgescu
Modified: 2014-12-04 00:09 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
err (119.64 KB, image/png)
2013-03-11 15:58 UTC, Alexandru Georgescu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Georgescu 2013-03-11 15:58:05 UTC
Created attachment 1111 [details]
err

eclipse-plugin:d18c45e0f5367979f7402380ee123242da2b57d5

STEPS TO REPRODUCE:
1. Install the eclipse-plugin into Eclipse Juno
2. Configure eclipse with Sysroot, toolchain, kernel, etc.
3. Try to create a new project with spaces in it's name, e.g. "PRJ ONE"

EXPECTED RESULTS
3. When pressing finnish, an error appears informing the user that the project name(s) cannot contain space(s).

ACTUAL RESULTS
4. The error appears, but after clicking OK to close the error, an additional error appear (see attachment)

The second error should not be present.
Comment 1 Ioana Grigoropol 2013-03-27 10:47:55 UTC
This error comes from inside  org.eclipse.cdt.internal.autotools.ui.wizards.AutotoolsBuildWizardHandler.createProject, where somehow the project seems to have a missing description.
The project is created by the CDT plugin, along with its definition. At the time we post process the templates, and throw the error for invalid project name, we must also delete the project created, and my guess is that somewhere between these two events, autotools is trying to create a project, that now has a missing description, and recovering from earlier versions fails.

The only fix that comes to my mind is to create a custom yocto wizard in which to put all the templates, which will give us the possibility to validate the project name as we go along, not at the end, when we do not have any chance of recovering.
Comment 2 Ioana Grigoropol 2013-03-27 15:27:56 UTC
After further investigation, I have realized that the problem here is the use of ProcessFailureException when we validate the project name.
It seems that in the upstream code, even if this error is thrown, after caching it, the process still continues and somehow manages to hit a point where the project configuration is null.
When using a different type of exception, such as OperationCanceledException, only one error message is shown, but whitout offering the possibility to configure the message shown(except for the details).
Comment 3 Andra Necula 2014-08-27 14:34:42 UTC
The bug is reproduced in eclipse kepler

poky: 52b788c6df9201764130ab744bf67b770b24b896
eclipse-poky-kepler: 4a167fd662262ebdaa3cf0d332ac0debb52d7904

Ubuntu 14.04, x86_64

Cheers! Andra N.