Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels in agent inspector are not visible #189

Closed
lesquoyb opened this issue Jun 3, 2024 · 0 comments
Closed

Labels in agent inspector are not visible #189

lesquoyb opened this issue Jun 3, 2024 · 0 comments
Labels
About UI This is an UI-related issue or request 😱 Bug The issue reveals a bug in GAMA

Comments

@lesquoyb
Copy link
Contributor

lesquoyb commented Jun 3, 2024

Describe the bug
Since recently the inspect view of an agent doesn't display the name of inspected variables:
image
the left column should contain the names but it's empty.
The tooltip is work though:
image

In the console I have this error stack, but it is right when I run the simulation, before opening the inspector view, I don't know if it's related. No new error message when I open the inspector:

!ENTRY org.eclipse.jface.text 4 0 2024-06-03 14:14:12.718
!MESSAGE java.lang.NullPointerException: Cannot invoke "String.replace(char, char)" because "label" is null
!STACK 0
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "String.replace(char, char)" because "label" is null
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NullPointerException: Cannot invoke "String.replace(char, char)" because "label" is null
	at org.eclipse.ui.internal.editors.text.codemining.annotation.AnnotationCodeMining.sanitizeLabel(AnnotationCodeMining.java:57)
	at org.eclipse.ui.internal.editors.text.codemining.annotation.AnnotationCodeMining.<init>(AnnotationCodeMining.java:51)
	at org.eclipse.ui.internal.editors.text.codemining.annotation.AnnotationCodeMiningProvider.createCodeMining(AnnotationCodeMiningProvider.java:287)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:200)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:400)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:528)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622)
	at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627)
	at org.eclipse.ui.internal.editors.text.codemining.annotation.AnnotationCodeMiningProvider.createCodeMinings(AnnotationCodeMiningProvider.java:274)
	at org.eclipse.ui.internal.editors.text.codemining.annotation.AnnotationCodeMiningProvider.lambda$0(AnnotationCodeMiningProvider.java:224)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	... 6 more
Key released: 	

when closing the simulation with this view still open I get this message, which may or may not be linked but it also seem like a (minor) bug:

An internal error has occurred.
Cannot invoke "gama.core.kernel.simulation.SimulationClock.getCycle()" because the return value of "gama.core.runtime.IScope.getClock()" is null

To Reproduce
Steps to reproduce the behavior:

  1. open any model with agents
  2. open the inspector on one agent of the simulation
  3. See error

Expected behavior
We see the labels as it was the case before

@lesquoyb lesquoyb added 😱 Bug The issue reveals a bug in GAMA About UI This is an UI-related issue or request labels Jun 3, 2024
lesquoyb added a commit that referenced this issue Jun 13, 2024
@lesquoyb lesquoyb moved this from Todo to To Test in GAMA 2024-11 Jun 13, 2024
lesquoyb added a commit that referenced this issue Jun 18, 2024
@github-project-automation github-project-automation bot moved this from To Test to Done in GAMA 2024-11 Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
About UI This is an UI-related issue or request 😱 Bug The issue reveals a bug in GAMA
Projects
Status: Done
Development

No branches or pull requests

1 participant