Bug#1843: crash on selecting Tools [22:56,29.08.99]

Frank frank.bauer at nikocity.de
Sun Aug 29 21:03:20 UTC 1999


Package: kdevelop
Version: 1.0beta2
Severity: grave

Bugreport ID : 22:56,29.08.99

Originator	: Frank Bauer
E-Mail	: frank.bauer at nikocity.de

Subject : crash on selecting Tools

Error Class	: software bug
Error Location: I don´t know
Priority	: medium
Bug Description ---------------------------

When choosing a tool from the Tool-menu and _not_ having
a project open, kdevelop crashes imediately.
Well, it is not such an important thing though, but IMHO 
it should be possible to use the tools even without a 
project. Or, at least, it shouldn´t crash. 

How to repeat the error -------------------

start kdevelop and choose any tool from the menu

Bugfix or Workaround ----------------------

well, not really a fix, but a workaround. 
If there would be a test of "argument" in
CKDevelop::slotToolsTool(int tool), the crash could be avoided
at least:

void CKDevelop::slotToolsTool(int tool){
/*    switch(tool){
    case ID_TOOLS_KDLGEDIT:
	return;
	break;
    case ID_KDLG_TOOLS_KDEVELOP:
	return;
	break;
    }*/
    if(!CToolClass::searchProgram(tools_exe.at(tool)) ){
	return;
    }
    if(!bKDevelop)
	switchToKDevelop();

    showOutputView(false);

//**********
//290899 FB: Error message QGList::locate: Index xx out of range
//  QStrList seems still empty. Not using "argument" prevents us from
//  crashing at least
    QString argument=tools_argument.at(tool);
		if (!argument) {
				return;
  	}
//**********

		// This allows us to replace the macro %H with the header file name, %S with the source file name
		// and %D with the project directory name.  Any others we should have?
    argument.replace( QRegExp("%H"), header_widget->getName() );
   argument.replace( QRegExp("%S"), cpp_widget->getName() );
    argument.replace( QRegExp("%D"), prj->getProjectDir() );



System Information ------------------------

KDevelop version	: 1.0beta2
KDE version		: 1.1
QT version		: 1.44 ?
OS/Distribution	: Linux 2.2.9 (based on SuSE 6.1)
Compiler		: egcs-2.91.66




More information about the KDevelop-devel mailing list