gama-platform / gama

Main repository for developing the 2024+ versions of GAMA
https://gama-platform.org
GNU General Public License v3.0
11 stars 4 forks source link

Labels in agent inspector are not visible #189

Closed lesquoyb closed 2 weeks ago

lesquoyb commented 1 month ago

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