Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ResourceException Marker id not found when calling BreakpointManager.removeBreakpoints()

Aperta
#2,217 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #2218 di @trancexpress — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
devtools

Direzione di ricerca

Inizia con org.eclipse.debug.internal.core.BreakpointManager.removeBreakpoints(IBreakpoint[], boolean) e confronta la gestione delle regole del workspace con il bug 540132 e il commit indicato. Riproduci la sequenza che coinvolge JavaDebugOptionsManager.updateBreakpointMessages(IBreakpoint[]) e marker.setAttribute; il lavoro è concluso quando la rimozione dei breakpoints non produce più lo stack trace ResourceException relativo al marker non trovato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564872

During one of our tests we observed the following exception:

org.eclipse.core.internal.resources.ResourceException: Marker id 1332 not found.
	at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:63)
	at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:260)
	at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager$2.run(JavaDebugOptionsManager.java:894)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
	at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.updateBreakpointMessages(JavaDebugOptionsManager.java:906)
	at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.breakpointsChanged(JavaDebugOptionsManager.java:965)
	at org.eclipse.debug.internal.core.BreakpointManager$BreakpointsNotifier.run(BreakpointManager.java:1104)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.debug.internal.core.BreakpointManager$BreakpointsNotifier.notify(BreakpointManager.java:1124)
	at org.eclipse.debug.internal.core.BreakpointManager.fireUpdate(BreakpointManager.java:975)
	at org.eclipse.debug.internal.core.BreakpointManager.access$4(BreakpointManager.java:962)
	at org.eclipse.debug.internal.core.BreakpointManager$BreakpointManagerVisitor.update(BreakpointManager.java:788)
	at org.eclipse.debug.internal.core.BreakpointManager.resourceChanged(BreakpointManager.java:699)
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:305)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:295)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:158)
	at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:366)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:157)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!SUBENTRY 1 org.eclipse.core.resources 4 376 2020-06-30 21:21:07.013

Upon investigation, the exception coincides with a call to org.eclipse.debug.internal.core.BreakpointManager.removeBreakpoints(IBreakpoint[], boolean) from our test. The code in BreakpointManager.removeBreakpoints() deletes a breakpoint marker without specifying a rule, and so can cause race condition (and e.g. cause the error stack trace above).

As in bug 540132 (https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=897972b60a60c5bd9d0b8138d5be9b07addfcaf5), the breakpoints operation should specify a workspace modification rule if there is no matching outer rule.

To reproduce:

  1. Debug Eclipse.
  2. In the debuggee Eclipse, set a breakpoint at the System.out.println() in this snippet:
package test;

public class TestClass {

	public static void main1(String[] args) {
		System.out.println("hello world");
	}

}
  1. Set a breakpoint at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.updateBreakpointMessages(IBreakpoint[]), at:
marker.setAttribute(IMarker.MESSAGE, type + info);
  1. Set a breakpoint at the start of: org.eclipse.debug.internal.core.BreakpointManager.removeBreakpoints(IBreakpoint[], boolean)
  2. Change the main method name to main1 (simply by typing, no need for refactor rename) and save. This hits the breakpoint at JavaDebugOptionsManager.updateBreakpointMessages.
  3. Remove all breakpoints with the respective Breakpoints view action, this hits the breakpoint at BreakpointManager.removeBreakpoint().
  4. Resume first the thread in BreakpointManager (twice), then the thread in JavaDebugOptionsManager.
Lingua principale
Java
Stelle
165
Fork
174
Merge medio
2g 17h
PR unite (30g)
43

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-platform/eclipse.platform

Tutte le issue di eclipse-platform/eclipse.platform

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.