Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Create new managed C++ Project crashes with new tooldefinition (see bug 100572)

Hi Norbert,

>From what I saw in the latest cvs HEAD sources, the check for the null
supper-class in already added for the ToolChain.getTools().
The CDT M7 build also contains that check.
Please try using M7 build (or later) and let me know if the issue
persists for you.

Thanks,
Mikhail

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Ploett Norbert
Sent: Friday, June 24, 2005 12:09 PM
To: CDT General developers list.
Subject: [cdt-dev] Create new managed C++ Project crashes with new
tooldefinition (see bug 100572)

 
Hello folks,

I tried to define a new project type which contains an additional new
tool (which does not have a superclass). When trying a new project from
the type I get error messages (see details and samples to reproduce the
problem in bugzilla 100572).

I tracked the problem and I think I found the cause and the solution in
the fact that the code of
org.eclipse.cdt.managedbuilder.internal.core.ToolChain.getTools()
assumes that the call to
org.eclipse.cdt.managedbuilder.internal.core.Tool.getSuperClass() never
returns null. (Which is the case with my newly defined tool). See the
code snippet from getTools():

getTools()
702: 				for (j = 0; j < tools.length; j++) {
					if
(tool.getSuperClass().getId().equals(tools[j].getId())) {
						tools[j] = tool;
						break;
					}

The problem is easily fixed by guarding the call to getId() with another
condition in the if statement:

getTools()
702: 				for (j = 0; j < tools.length; j++) {
					if ((tool.getSuperClass()!=null)
&&
	
(tool.getSuperClass().getId().equals(tools[j].getId()))) {
						tools[j] = tool;
						break;
					}

With this fix my new tool also works. I have posted more details and the
patches in bugzilla 100572. What I would like to know is:

- Is this fix acceptable? Who will evaluate my patch? Can I go ahead and
publish my patches in cdt-patch? 
- Is there a chance that this fix will be included in the CDT 3.0
release? (need not be RC1).

Regards


Norbert

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top