Bug 540444 - Error parser plugin shutdown not called at end of build
Summary: Error parser plugin shutdown not called at end of build
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: Next   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-24 11:51 EDT by Marcel Kanter CLA
Modified: 2020-09-04 15:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Kanter CLA 2018-10-24 11:51:17 EDT
I've implemented a simple error parser following the description at IBMs site. Its a dummy that simply does nothing than writing messages to the console.

public class GenericErrorParser implements IErrorParser, IErrorParser2, IErrorParser3 {
/*...*/
	@Override
	public void shutdown() {
		System.out.println("shutdown");
		
	}

}

It works fine and I can see all the messages from starting from the Activator start and stop, constructor, processLine and so on.

BUT At the end of the build there is not message from shutdown().

The build output is:

17:46:04 **** Incremental Build of configuration Default for project parsertest ****
make all 
Error:1
Test

17:46:05 Build Finished (took 213ms)

The output of the plugin is lacking the shutdown:

getProcessLineBehaviour
processLine: make all
getProcessLineBehaviour
processLine: Error:1
getProcessLineBehaviour
processLine: Test


I had a look into the source of ErrorParserManager and there is no contitional execution of shutdown. So my guess is that shutdown is not called.

To test the problem a makefile project or an Cross GCC project can be used.
Version info:
  C/C++ Development Tools	9.4.3.201802261533	org.eclipse.cdt.feature.group	Eclipse CDT
  C/C++ GCC Cross Compiler Support	9.4.3.201802261533	org.eclipse.cdt.build.crossgcc.feature.group	Eclipse CDT
  C/C++ GDB Hardware Debugging	9.4.3.201802261533	org.eclipse.cdt.debug.gdbjtag.feature.group	Eclipse CDT
  C/C++ Memory View Enhancements	9.4.3.201802261533	org.eclipse.cdt.debug.ui.memory.feature.group	Eclipse CDT
  Eclipse Platform	4.7.1.M20171009-0410	org.eclipse.platform.ide	Eclipse.org
  Eclipse Plug-in Development Environment	3.13.4.v20180330-0640	org.eclipse.pde.feature.group	Eclipse.org
  Git integration for Eclipse	4.8.0.201706111038-r	org.eclipse.egit.feature.group	Eclipse EGit
  GNU MCU C/C++ ARM Cross Compiler	2.5.2.201711101735	ilg.gnumcueclipse.managedbuild.cross.arm.feature.feature.group	Liviu Ionescu
  GNU MCU C/C++ Generic Cortex-M Project Template	1.4.3.201711101735	ilg.gnumcueclipse.templates.cortexm.feature.feature.group	Liviu Ionescu
  GNU MCU C/C++ OpenOCD Debugging	4.2.1.201711101735	ilg.gnumcueclipse.debug.gdbjtag.openocd.feature.feature.group	Liviu Ionescu
  GNU MCU C/C++ STM32Fx Project Templates	2.6.3.201711101735	ilg.gnumcueclipse.templates.stm.feature.feature.group	Liviu Ionescu
  PHP Development Tools (PDT)	5.3.0.201803070838	org.eclipse.php.feature.group	Eclipse PDT
Comment 1 Marc-André Laperle CLA 2018-10-31 22:07:58 EDT
I modified RegexErrorParser to implement IErrorParser3 and shutdown gets called correctly from ErrorParserManager.shutdown(). Perhaps you could do the same and then compare with the behaviour when using GenericErrorParser?
Comment 2 Marcel Kanter CLA 2018-11-07 14:09:00 EST
Ok. I'll try this, but then I need to get the CDT source and build the CDT completely with the modified RegexErrorParser, right? Is there a simple howto for that?
Another question arise: When get the shutdown method in ErrorParserManager called? 

I'm experienced in Java, C, ... but not much with the Eclipse stuff.