Portugol-Studio icon indicating copy to clipboard operation
Portugol-Studio copied to clipboard

Erro numero 9ae1c63d31cb003f6265e2cf1dffd8b84ba80f78 v2.7.5

Open Clauber-DEV opened this issue 1 year ago • 0 comments

Esta issue foi gerada automaticamente

br.univali.ps.nucleo.ExcecaoAplicacao: java.lang.ArrayIndexOutOfBoundsException: -2 at br.univali.ps.nucleo.TratadorExcecoes.uncaughtException(TratadorExcecoes.java:145) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1057) at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1052) at java.awt.EventDispatchThread.processException(EventDispatchThread.java:227) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:219) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: java.lang.ArrayIndexOutOfBoundsException: -2 at javax.swing.text.AbstractDocument$BranchElement.getElement(AbstractDocument.java:2350) at br.univali.ps.ui.rstautil.PortugolParser.adicionarErroAviso(PortugolParser.java:257) at br.univali.ps.ui.rstautil.PortugolParser.notificarErrosAvisos(PortugolParser.java:168) at br.univali.ps.ui.rstautil.PortugolParser.parse(PortugolParser.java:229) at org.fife.ui.rsyntaxtextarea.ParserManager.actionPerformed(ParserManager.java:157) at javax.swing.Timer.fireActionPerformed(Timer.java:313) at javax.swing.Timer$DoPostEvent.run(Timer.java:245) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) ... 5 more

Código do Erro: programa { /* M04 Aula 13 * Método para encontrar um valor em MATRIZES */

inclua biblioteca Util --> ut
funcao inicio()
{
	inteiro matriz1[4][4], // matriz
	l, c, // linha e coluna
	sl = 0, // soma dos valores da linha
	sc = 0  // soma dos valores da coluna

	// percursor para atribuir valor a MATRIZ
	para(l = 0; l < ut.numero_linhas(matriz1); l++){
		para(c = 0; c < ut.numero_colunas(matriz1); c++){
			matriz1[l][c] = sorteia(100, 999)
		}
	}
	// percursos para exibir os valores da linha da MATRIZ
	escreva("Linha da Matriz\n")
	para(c = 0; c < ut.numero_linhas(matriz1); c++){
			escreva(matriz1[2][c], "\t")
			sl +=
			ut.aguarde(300)		
	}
	// Percurss para exibir os valores da coluna da MATRIZ
	escreva("\n\nColuna da Matriz\n")
	para(l = 0; l < ut.numero_colunas(matriz1); l++){
		escreva(matriz1[l][2], "\t")
		ut.aguarde(300)
		escreva("\n")
	}
	escreva("\nFIM!")
}

}

Clauber-DEV avatar Sep 22 '22 19:09 Clauber-DEV