Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 562653

Summary: an internal error occurred during: "Launching XXX Debug."
Product: [Eclipse Project] Platform Reporter: Matthias Garzke <matthias_garzke>
Component: DebugAssignee: Paul Pazderski <paul-eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jacob.luojie, loskutov, paul-eclipse, sarika.sinha
Version: 4.15   
Target Milestone: 4.16 M3   
Hardware: PC   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=558489
https://git.eclipse.org/r/161818
https://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=4296b4127e2e3b8549f5733c4c7d8f2f24a4b891
https://bugs.eclipse.org/bugs/show_bug.cgi?id=562724
Whiteboard:

Description Matthias Garzke CLA 2020-04-30 05:50:14 EDT
Hi together, 

I'm a beginner in using Microcontrollers and want to explore the whole spectrum of possibilities.
Unfortunately i encountered a problem lately when it comes to debugging.

I'm currently using a new STM32F407 Discovery Board and the latest eclipse 2020 version.

When i try to start debugging, a window shows up with the following message:

An internal error occurred during: "Launching stm32f4-test Debug".
org.eclipse.debug.internal.core.StreamsProxy.<init>(Ljava/lang/Process;Ljava/lang/String;)V

I can show you the latest log-file entry of the .metadata folder:

!MESSAGE An internal error occurred during: "Launching stm32f072b-disco-test Debug".
!STACK 0
java.lang.NoSuchMethodError: org.eclipse.debug.internal.core.StreamsProxy.<init>(Ljava/lang/Process;Ljava/lang/String;)V
	at fr.ac6.mcu.debug.openocd.processanalyzer.logger.OpenOCDStreamsProxy.<init>(OpenOCDStreamsProxy.java:20)
	at fr.ac6.mcu.debug.openocd.processanalyzer.logger.OpenOCDRuntimeProcess.createStreamsProxy(OpenOCDRuntimeProcess.java:268)
	at fr.ac6.mcu.debug.openocd.processanalyzer.logger.OpenOCDRuntimeProcess.<init>(OpenOCDRuntimeProcess.java:105)
	at fr.ac6.mcu.debug.launching.MCUGdbProcessFactory.newProcess(MCUGdbProcessFactory.java:46)
	at org.eclipse.debug.core.DebugPlugin.newProcess(DebugPlugin.java:802)
	at fr.ac6.mcu.debug.launching.MCUGdbLaunch.addOpenOCDProcess(MCUGdbLaunch.java:131)
	at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:315)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:860)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:719)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1017)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1220)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)


As you can see, I am using the ac6 workbench. Also I am using the SPL  Library, since i began to learn with it and it seems a little more intuitive for me.

I tried to completely reinstall eclipse, but this did not solve the problem.
Please excuse me, if i'm missing informations.
I hope that anyone could help me with this problem since i'm despairing.
Thanks in advance!
Comment 1 Andrey Loskutov CLA 2020-04-30 05:59:25 EDT
fr.ac6.mcu.debug.openocd.processanalyzer.logger.OpenOCDRuntimeProcess.createStreamsProxy(OpenOCDRuntimeProcess.java:268) uses internal API that is changed via bug 558489.

Whoever provides fr.ac6.mcu.debug.openocd.processanalyzer should update the code and do not use internal API.

@Paul: would it make sense to provide old StreamsProxy(Process process, String encoding) constructor that re-directs to the new one StreamsProxy(Process process, Charset encoding)?
Comment 2 Paul Pazderski CLA 2020-04-30 07:44:38 EDT
(In reply to Andrey Loskutov from comment #1)
> @Paul: would it make sense to provide old StreamsProxy(Process process,
> String encoding) constructor that re-directs to the new one
> StreamsProxy(Process process, Charset encoding)?

Yes. Would not hurt us to restore the method. I'll make a patch.
Comment 3 Eclipse Genie CLA 2020-04-30 08:03:48 EDT
New Gerrit change created: https://git.eclipse.org/r/161818
Comment 4 Matthias Garzke CLA 2020-04-30 08:10:06 EDT
Thanks for the quick response and effort!

Is there any action needed to be done by myself?
Comment 5 Andrey Loskutov CLA 2020-04-30 08:42:18 EDT
(In reply to Paul Pazderski from comment #2)
> (In reply to Andrey Loskutov from comment #1)
> > @Paul: would it make sense to provide old StreamsProxy(Process process,
> > String encoding) constructor that re-directs to the new one
> > StreamsProxy(Process process, Charset encoding)?
> 
> Yes. Would not hurt us to restore the method. I'll make a patch.

Have you found the code for the client? If it uses even more internal API?

(In reply to Matthias Garzke from comment #4)
> Thanks for the quick response and effort!
> 
> Is there any action needed to be done by myself?

Find out the code for that tool or find out the authors and ask if the proposed patch makes their code happy again. Google just found this: https://www.openstm32.org/forumthread8134 for me.
Comment 6 Paul Pazderski CLA 2020-04-30 09:03:07 EDT
(In reply to Andrey Loskutov from comment #5)
> (In reply to Paul Pazderski from comment #2)
> > (In reply to Andrey Loskutov from comment #1)
> > > @Paul: would it make sense to provide old StreamsProxy(Process process,
> > > String encoding) constructor that re-directs to the new one
> > > StreamsProxy(Process process, Charset encoding)?
> > 
> > Yes. Would not hurt us to restore the method. I'll make a patch.
> 
> Have you found the code for the client? If it uses even more internal API?

No, that's why I restored all three constructors changed in bug 558489. If it breaks on other internal api changes, well there is a known risk on using internals.

The product is probably this [1] but I found no code and apart from the forum thread you linked only this related thread [2] which describes the same error Matthias posted.

[1] https://www.ac6-tools.com/content.php/content_SW4MCU/lang_en%5fUS.xphp
[2] https://www.openstm32.org/forumthread8137
Comment 7 Matthias Garzke CLA 2020-04-30 09:46:58 EDT
If this may helps you:

http://www.ac6-tools.com/Eclipse-updates/org.openstm32.system-workbench.update-site-v2/ 

This is the source from where i obtain the workbench.
Comment 9 Andrey Loskutov CLA 2020-05-10 01:54:48 EDT
*** Bug 563007 has been marked as a duplicate of this bug. ***