platform issueshttps://gitlab.simantics.org/simantics/platform/-/issues2024-03-28T21:33:47Zhttps://gitlab.simantics.org/simantics/platform/-/issues/1101WriteGraphImpl.denyValue(s,p) implementation tries to remove value from s, no...2024-03-28T21:33:47ZTuukka LehtonenWriteGraphImpl.denyValue(s,p) implementation tries to remove value from s, not from the actual value resourceSee [WriteGraphImpl.java#L1095](https://gitlab.simantics.org/simantics/platform/-/blob/ce692db4f99b7404f4e80b0b43b4364c6fc9cf60/bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/WriteGraphImpl.java#L1095)See [WriteGraphImpl.java#L1095](https://gitlab.simantics.org/simantics/platform/-/blob/ce692db4f99b7404f4e80b0b43b4364c6fc9cf60/bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/WriteGraphImpl.java#L1095)1.60.0Antti VillbergAntti Villberghttps://gitlab.simantics.org/simantics/platform/-/issues/1100Removing a model containing a diagram that is open in an editor does not clos...2024-03-26T14:42:15ZTuukka LehtonenRemoving a model containing a diagram that is open in an editor does not close the diagram editor1. A model with a diagram exists in the database and the diagram is open in the standard diagram editor
2. The user deletes the model
Expected result:
The editor is automatically closed, regardless of how the model is technically remov...1. A model with a diagram exists in the database and the diagram is open in the standard diagram editor
2. The user deletes the model
Expected result:
The editor is automatically closed, regardless of how the model is technically removed.
What happens:
The diagram editor confusingly stays open for the diagram that has been moved into the trash bin.
By default the implementation is `TrashBinRemover` which only moves the model into the trash bin. This still keeps a valid URI for the model.
The editor's input validator only checks if the diagram still has a valid URI or not.
----
Possible fixes:
1. Change [TrashBinRemover](https://gitlab.simantics.org/simantics/platform/-/blob/ce692db4f99b7404f4e80b0b43b4364c6fc9cf60/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/impl/TrashBinRemover.java) to remove `L0.HasName` from the removed entity to avoid giving it a valid URI. The name can be moved to `L0.HasLabel` if the entity does not already have `L0.HasLabel`.
* Does this cause problems for the trash bin emptying domain resolution logic or not?
* Doesn't look like that ATM
* This will also cause Variables to go invalid which is kind of a good thing since we don't want for data in the trashbin to actually look like it still works.
2. Other ideas?1.60.0Antti VillbergAntti Villberghttps://gitlab.simantics.org/simantics/platform/-/issues/1099Option to disable selection rendering globally2024-03-20T10:18:00ZJussi KoskelaOption to disable selection rendering globallyEach node type has currently it's own way of disabling selection rendering. This leads to dirty code in which the caller is responsible for disabling the selection rendering for each node type case by case. With a global hint the impleme...Each node type has currently it's own way of disabling selection rendering. This leads to dirty code in which the caller is responsible for disabling the selection rendering for each node type case by case. With a global hint the implementation can be moved to node's local render method.
Also currently the Path node did not hide its selection when using the Copy as SVG feature.1.60.0Jussi KoskelaJussi Koskelahttps://gitlab.simantics.org/simantics/platform/-/issues/1098RCP 2022-03 and Java17 suffer from Eclipse bug #5782212024-03-19T21:53:45ZTuukka LehtonenRCP 2022-03 and Java17 suffer from Eclipse bug #578221See [Eclipse bug 578221](https://bugs.eclipse.org/bugs/show_bug.cgi?id=578221#c7).
The problem causes the Eclipse help system to produce this page:
```
HTTP ERROR 500 org.apache.jasper.JasperException: PWC6033: Error in Javac compilati...See [Eclipse bug 578221](https://bugs.eclipse.org/bugs/show_bug.cgi?id=578221#c7).
The problem causes the Eclipse help system to produce this page:
```
HTTP ERROR 500 org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6197: An error occurred at line: 41 in the jsp file: /index.jsp PWC6199: Generated servlet error: System cannot be resolved
URI: /help/index.jsp
STATUS: 500
MESSAGE: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6197: An error occurred at line: 41 in the jsp file: /index.jsp PWC6199: Generated servlet error: System cannot be resolved
SERVLET: org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet-59574129
CAUSED BY: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6197: An error occurred at line: 41 in the jsp file: /index.jsp PWC6199: Generated servlet error: System cannot be resolved
Caused by:
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP
PWC6197: An error occurred at line: 41 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
System cannot be resolved
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
at org.eclipse.equinox.jsp.jasper.JspServlet.service(JspServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:183)
at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.service(HttpServiceRuntimeImpl.java:1457)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:159)
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:67)
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:118)
at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.dispatch(ProxyServlet.java:147)
at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.preprocess(ProxyServlet.java:115)
at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:104)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:308)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:508)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1372)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1294)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
at org.eclipse.jetty.server.Server.handle(Server.java:562)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:406)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:663)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:398)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:101)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:190)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
at java.base/java.lang.Thread.run(Thread.java:833)
Powered by Jetty:// 10.0.6
```
There is a workaround, which is to include `org.eclipse.jdt.core` (another 6-7 MB) to the product. I tested this to work.
The better fix would probably be to update the RCP once again.Tuukka LehtonenTuukka Lehtonenhttps://gitlab.simantics.org/simantics/platform/-/issues/1097DB purge destroys the entire database2024-03-19T07:19:07ZTuukka LehtonenDB purge destroys the entire databaseJust trying to do a simple:
1. Create a new model
2. Delete model
3. Empty trashbin & purge DB
can often result in something like this where the purge logic ends up destroying the entire database, i.e. pretty much all snapshot directori...Just trying to do a simple:
1. Create a new model
2. Delete model
3. Empty trashbin & purge DB
can often result in something like this where the purge logic ends up destroying the entire database, i.e. pretty much all snapshot directories in under `<workspace>/db/`, effectively rendering a workspace beyond repair.
```
INFO [2024-03-13 14:03:59,757] fi.vtt.apros.experiment.AprosModel: loadInitialCondition: model http://Projects/Development%20Project/MyModel
INFO [2024-03-13 14:03:59,758] fi.vtt.apros.experiment.AprosModel: loadInitialCondition: ic http://Projects/Development%20Project/MyModel/5ae5462b-2803-4b02-bbde-649a868b1945
INFO [2024-03-13 14:03:59,760] fi.vtt.apros.experiment.AprosModel: loadInitialCondition: modelRevision {mostSignificant = -6819394304540785868, leastSignificant = -5167601166972638010}
INFO [2024-03-13 14:03:59,761] fi.vtt.apros.experiment.AprosModel: loadInitialCondition: icRevision {mostSignificant = -6819394304540785868, leastSignificant = -5167601166972638010}
INFO [2024-03-13 14:04:00,139] fi.vtt.apros.dll.AprosDll: Setting Apros library path: C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\resources\model-679937\apros\lib
INFO [2024-03-13 14:08:14,114] org.simantics.acorn.ClusterManager: makeSnapshot: start with 1 files
TODO: implement return value for syncRequest(AsyncMultiRead, AsyncMultiProcedure)
INFO [2024-03-13 14:08:33,910] org.simantics.acorn.ClusterManager: makeSnapshot: start with 7 files
WARN [2024-03-13 14:08:43,534] org.simantics.utils.datastructures.file.DirectorySizeTracker: Failed to visit file C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\tempFiles
java.nio.file.NoSuchFileException: C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\tempFiles
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsDirectoryStream.<init>(WindowsDirectoryStream.java:86)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newDirectoryStream(WindowsFileSystemProvider.java:535)
at java.base/java.nio.file.Files.newDirectoryStream(Files.java:482)
at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:301)
at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:323)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2804)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
at org.simantics.utils.datastructures.file.DirectorySizeTracker.track(DirectorySizeTracker.java:128)
at org.simantics.utils.datastructures.file.DirectorySizeTracker.processEvents(DirectorySizeTracker.java:315)
at org.simantics.utils.datastructures.file.DirectorySizeTracker.run(DirectorySizeTracker.java:374)
at java.base/java.lang.Thread.run(Thread.java:833)
INFO [2024-03-13 14:08:43,594] org.simantics.db.layer0.util.DomainProcessor3: Unexpected INTERNAL preStatus in DomainProcessor3 [id=$679938]
WARN [2024-03-13 14:08:45,011] org.simantics.diagram.adapter.DiagramContentRequest: Most likely diagram is being removed and therefore ordered list can not be found for [id=$778241]
WARN [2024-03-13 14:08:45,059] org.simantics.diagram.adapter.TypeGroup: Most likely after deleting a diagram or something therefore no ordered set can be found for [id=$778241]
WARN [2024-03-13 14:08:45,060] org.simantics.diagram.adapter.TypeGroup: Most likely after deleting a diagram or something therefore no ordered set can be found for [id=$778241]
WARN [2024-03-13 14:08:45,060] org.simantics.diagram.adapter.TypeGroup: Most likely after deleting a diagram or something therefore no ordered set can be found for [id=$778241]
WARN [2024-03-13 14:08:45,063] org.simantics.diagram.adapter.TypeGroup: Most likely after deleting a diagram or something therefore no ordered set can be found for [id=$778241]
INFO [2024-03-13 14:08:45,111] org.simantics.acorn.ClusterManager: makeSnapshot: start with 0 files
WARN [2024-03-13 14:08:45,113] org.simantics.acorn.lru.LRU: Retry mutex acquire
WARN [2024-03-13 14:08:45,150] org.simantics.acorn.lru.LRU: Retry mutex acquire
WARN [2024-03-13 14:08:45,171] org.simantics.acorn.lru.LRU: Retry mutex acquire
INFO [2024-03-13 14:08:45,359] org.simantics.acorn.ClusterManager: makeSnapshot: start with 0 files
INFO [2024-03-13 14:08:45,372] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\db
INFO [2024-03-13 14:08:45,372] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\0
INFO [2024-03-13 14:08:45,372] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\0
INFO [2024-03-13 14:08:45,441] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\1
INFO [2024-03-13 14:08:45,441] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\1
INFO [2024-03-13 14:08:45,446] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\10
INFO [2024-03-13 14:08:45,446] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\10_baseline
INFO [2024-03-13 14:08:45,446] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\11
INFO [2024-03-13 14:08:45,446] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\2
INFO [2024-03-13 14:08:45,446] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\2
INFO [2024-03-13 14:08:45,447] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\3
INFO [2024-03-13 14:08:45,447] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\3
INFO [2024-03-13 14:08:45,451] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\4
INFO [2024-03-13 14:08:45,451] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\4
INFO [2024-03-13 14:08:45,453] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\5
INFO [2024-03-13 14:08:45,453] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\5
INFO [2024-03-13 14:08:45,454] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\6
INFO [2024-03-13 14:08:45,454] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\6
INFO [2024-03-13 14:08:45,456] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\7
INFO [2024-03-13 14:08:45,456] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\7
INFO [2024-03-13 14:08:45,461] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\8
INFO [2024-03-13 14:08:45,462] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\8
INFO [2024-03-13 14:08:45,464] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\9
INFO [2024-03-13 14:08:45,464] org.simantics.acorn.FileStore: purge deletes C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\9
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: WatchKey not registered: sun.nio.fs.WindowsWatchService$WindowsWatchKey@22ec4ec2
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.9a.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.9a.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a4.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a4.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a6.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a6.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a7.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a7.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a8.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a8.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a9.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a9.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.aa.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.aa.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.ab.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.ab.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.ac.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.ac.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.ad.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.ad.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.ad_1.extFile
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.ad_1.extFile
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: clusterStream
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: clusterStream
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: RESET KEY RETURNED: false
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: WatchKey not registered: sun.nio.fs.WindowsWatchService$WindowsWatchKey@4d9071bb
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: RESET KEY RETURNED: false
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: WatchKey not registered: sun.nio.fs.WindowsWatchService$WindowsWatchKey@68eef8db
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a8.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a8.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.ab.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.ab.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.ae.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.ae.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: clusterStream
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: clusterStream
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: RESET KEY RETURNED: false
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: WatchKey not registered: sun.nio.fs.WindowsWatchService$WindowsWatchKey@1b621c6d
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a6.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a6.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a7.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a7.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a8.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a8.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: clusterStream
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: clusterStream
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: RESET KEY RETURNED: false
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: WatchKey not registered: sun.nio.fs.WindowsWatchService$WindowsWatchKey@5b38cb9d
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: RESET KEY RETURNED: false
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: WatchKey not registered: sun.nio.fs.WindowsWatchService$WindowsWatchKey@15eb74e8
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a7.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a7.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: 0.a8.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: 0.a8.cluster
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: clusterStream
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: clusterStream
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: cssi
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_MODIFY: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: MISSED EVENT: ENTRY_DELETE: head.state
ERROR [2024-03-13 14:08:45,465] org.simantics.utils.datastructures.file.DirectorySizeTracker: RESET KEY RETURNED: false
INFO [2024-03-13 14:08:45,471] fi.vtt.apros.project.AprosProjectFeature: Database has been purged, scheduling temporary resource cleanup
ERROR [2024-03-13 14:08:45,483] fi.vtt.simantics.procore.internal.ClusterTable: Load cluster failed
java.nio.file.NoSuchFileException: C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\6\0.a7.cluster
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
at org.simantics.acorn.FileIO.readBytes(FileIO.java:74)
at org.simantics.acorn.lru.LRUObject.readFile(LRUObject.java:207)
at org.simantics.acorn.lru.ClusterInfo.clone(ClusterInfo.java:83)
at org.simantics.acorn.ClusterManager.clone(ClusterManager.java:541)
at org.simantics.acorn.GraphClientImpl2.clone(GraphClientImpl2.java:207)
... 18 common frames omitted
Wrapped by: org.simantics.db.exception.DatabaseException: java.nio.file.NoSuchFileException: C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\6\0.a7.cluster
at org.simantics.acorn.GraphClientImpl2.clone(GraphClientImpl2.java:210)
at fi.vtt.simantics.procore.internal.ClusterTable.load2(ClusterTable.java:1128)
at fi.vtt.simantics.procore.internal.ClusterTable.load2(ClusterTable.java:1036)
at fi.vtt.simantics.procore.internal.ClusterTable.checkedGetClusterByResourceKey(ClusterTable.java:990)
at fi.vtt.simantics.procore.internal.QuerySupportImpl.ensureLoaded(QuerySupportImpl.java:1370)
at org.simantics.db.impl.graph.ReadGraphImpl.ensureLoaded(ReadGraphImpl.java:6455)
at org.simantics.db.impl.query.Objects.computeForEach(Objects.java:610)
at org.simantics.db.impl.query.QueryCache.runnerObjects(QueryCache.java:74)
at org.simantics.db.impl.query.QueryProcessor.getSingleObject(QueryProcessor.java:2652)
at org.simantics.db.impl.graph.ReadGraphImpl.getPossibleObject(ReadGraphImpl.java:1532)
at org.simantics.db.impl.graph.ReadGraphImpl.getPossibleRelatedValue(ReadGraphImpl.java:1703)
at fi.vtt.apros.project.AprosWorkspaces$RemovableResourceDirectories.read(AprosWorkspaces.java:230)
at fi.vtt.apros.project.AprosWorkspaces$RemovableResourceDirectories.perform(AprosWorkspaces.java:152)
at fi.vtt.apros.project.AprosWorkspaces$RemovableResourceDirectories.perform(AprosWorkspaces.java:1)
at fi.vtt.simantics.procore.internal.SessionImplSocket$6.run0(SessionImplSocket.java:1522)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at fi.vtt.simantics.procore.internal.SessionRequestManager$5.run0(SessionRequestManager.java:298)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:155)
ERROR [2024-03-13 14:08:45,483] fi.vtt.simantics.procore.internal.ClusterTable: Failed to load cluster 0.a7 for resource key 43441 resourceIndex=2481 resourceId=686513
java.nio.file.NoSuchFileException: C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\6\0.a7.cluster
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
at org.simantics.acorn.FileIO.readBytes(FileIO.java:74)
at org.simantics.acorn.lru.LRUObject.readFile(LRUObject.java:207)
at org.simantics.acorn.lru.ClusterInfo.clone(ClusterInfo.java:83)
at org.simantics.acorn.ClusterManager.clone(ClusterManager.java:541)
at org.simantics.acorn.GraphClientImpl2.clone(GraphClientImpl2.java:207)
... 18 common frames omitted
Wrapped by: org.simantics.db.exception.DatabaseException: java.nio.file.NoSuchFileException: C:\w\rt dir\apros\trunk\nuc-operui\workdir1\operui-demo-13\db\6\0.a7.cluster
at org.simantics.acorn.GraphClientImpl2.clone(GraphClientImpl2.java:210)
at fi.vtt.simantics.procore.internal.ClusterTable.load2(ClusterTable.java:1128)
at fi.vtt.simantics.procore.internal.ClusterTable.load2(ClusterTable.java:1036)
at fi.vtt.simantics.procore.internal.ClusterTable.checkedGetClusterByResourceKey(ClusterTable.java:990)
at fi.vtt.simantics.procore.internal.QuerySupportImpl.ensureLoaded(QuerySupportImpl.java:1370)
at org.simantics.db.impl.graph.ReadGraphImpl.ensureLoaded(ReadGraphImpl.java:6455)
at org.simantics.db.impl.query.Objects.computeForEach(Objects.java:610)
at org.simantics.db.impl.query.QueryCache.runnerObjects(QueryCache.java:74)
at org.simantics.db.impl.query.QueryProcessor.getSingleObject(QueryProcessor.java:2652)
at org.simantics.db.impl.graph.ReadGraphImpl.getPossibleObject(ReadGraphImpl.java:1532)
at org.simantics.db.impl.graph.ReadGraphImpl.getPossibleRelatedValue(ReadGraphImpl.java:1703)
at fi.vtt.apros.project.AprosWorkspaces$RemovableResourceDirectories.read(AprosWorkspaces.java:230)
at fi.vtt.apros.project.AprosWorkspaces$RemovableResourceDirectories.perform(AprosWorkspaces.java:152)
at fi.vtt.apros.project.AprosWorkspaces$RemovableResourceDirectories.perform(AprosWorkspaces.java:1)
at fi.vtt.simantics.procore.internal.SessionImplSocket$6.run0(SessionImplSocket.java:1522)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at fi.vtt.simantics.procore.internal.SessionRequestManager$5.run0(SessionRequestManager.java:298)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:155)
ERROR [2024-03-13 14:08:50,145] fi.vtt.simantics.procore.internal.SessionRequestManager: Write transaction could not be started
org.simantics.db.server.ProCoreException: GraphClientImpl2 is already closing so no more write transactions allowed!
at org.simantics.acorn.GraphClientImpl2.askWriteTransaction(GraphClientImpl2.java:465)
at fi.vtt.simantics.procore.internal.GraphSessionSocket.askWriteTransaction(GraphSessionSocket.java:45)
at fi.vtt.simantics.procore.internal.TransactionToken.startWriteTransaction(TransactionToken.java:92)
at fi.vtt.simantics.procore.internal.State.startWriteTransaction(State.java:222)
... 3 common frames omitted
Wrapped by: org.simantics.db.exception.DatabaseException: org.simantics.db.server.ProCoreException: GraphClientImpl2 is already closing so no more write transactions allowed!
at fi.vtt.simantics.procore.internal.State.startWriteTransaction(State.java:230)
at fi.vtt.simantics.procore.internal.SessionRequestManager$3.run0(SessionRequestManager.java:182)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:155)
ERROR [2024-03-13 14:08:50,148] org.simantics.db.impl.query.QueryThread: FATAL BUG: QueryThread task processing caused unexpected exception.
java.lang.AssertionError: null
at fi.vtt.simantics.procore.internal.SessionRequestManager$4.run0(SessionRequestManager.java:235)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:155)
INFO [2024-03-13 14:08:50,148] org.simantics.acorn.GraphClientImpl2: Closing org.simantics.acorn.GraphClientImpl2@317a5d9d and mainProgram org.simantics.acorn.MainProgram@278fc3d0
INFO [2024-03-13 14:08:50,150] org.simantics.acorn.GraphClientImpl2: executorTerminated=true, saverTerminated=true
!ENTRY org.eclipse.core.jobs 4 2 2024-03-13 14:09:00.160
!MESSAGE An internal error occurred during: "Database Garbage Collector".
!STACK 0
org.simantics.db.exception.RuntimeDatabaseException: Session has been shut down.
at fi.vtt.simantics.procore.internal.SessionImplSocket.assertAlive(SessionImplSocket.java:3457)
at fi.vtt.simantics.procore.internal.SessionImplSocket.acquire(SessionImplSocket.java:3493)
at fi.vtt.simantics.procore.internal.SessionImplSocket.acquire(SessionImplSocket.java:3469)
at fi.vtt.simantics.procore.internal.SessionImplSocket.syncRequest(SessionImplSocket.java:2034)
at org.simantics.db.layer0.util.SessionGarbageCollection.gc(SessionGarbageCollection.java:137)
at org.simantics.db.layer0.util.SessionGarbageCollection.gc(SessionGarbageCollection.java:62)
at org.simantics.ui.jobs.SessionGarbageCollectorJob.run(SessionGarbageCollectorJob.java:184)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
```Antti VillbergAntti Villberghttps://gitlab.simantics.org/simantics/platform/-/issues/1096Model PDF export creates empty diagram-sized pages in PDF when diagrams are e...2024-03-18T13:05:14ZTuukka LehtonenModel PDF export creates empty diagram-sized pages in PDF when diagrams are excluded and documentation included in the exportThe code in [DiagramPainter](https://gitlab.simantics.org/simantics/platform/-/blob/5fb3e7b1db0b6aa2d21f5bb055f24f16555c4c3b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/pdf/DiagramPrinter.java#L224-227) will always ad...The code in [DiagramPainter](https://gitlab.simantics.org/simantics/platform/-/blob/5fb3e7b1db0b6aa2d21f5bb055f24f16555c4c3b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/pdf/DiagramPrinter.java#L224-227) will always add a new page for every provided diagram (Node) after at least one page is exported into the PDF. This will happen regardless of whether `includeDiagrams` is `true` or `false`. When `includeDiagrams = false` those added pages will stay empty and the documentation printing will start a new page to contain the documentation.
The empty diagram pages should not be added at all when diagrams are not included in the print.1.60.0Tuukka LehtonenTuukka Lehtonenhttps://gitlab.simantics.org/simantics/platform/-/issues/1095GraphExplorerImpl fails to expand nodes when processing selectPath2024-03-15T13:33:04ZMarko LuukkainenGraphExplorerImpl fails to expand nodes when processing selectPathMarko LuukkainenMarko Luukkainenhttps://gitlab.simantics.org/simantics/platform/-/issues/1094Get rid of deprecated Logger usage2024-03-13T13:48:15ZTuukka LehtonenGet rid of deprecated Logger usage`org.simantics.db.common.utils.Logger` has been deprecated for ages and all its uses need to be removed from the platform along with the class itself.`org.simantics.db.common.utils.Logger` has been deprecated for ages and all its uses need to be removed from the platform along with the class itself.Tuukka LehtonenTuukka Lehtonenhttps://gitlab.simantics.org/simantics/platform/-/issues/1093AdaptingTransferableGraphFileReader fails to process tgs where root names inc...2024-03-13T09:12:54ZMarko LuukkainenAdaptingTransferableGraphFileReader fails to process tgs where root names include '/' charactersMarko LuukkainenMarko Luukkainenhttps://gitlab.simantics.org/simantics/platform/-/issues/1092Chart-related subscription history data access and sampling optimization2024-03-08T23:46:30ZTuukka LehtonenChart-related subscription history data access and sampling optimizationThere are several performance-related problems with the subscription history data sampling implemented in https://gitlab.simantics.org/simantics/platform/-/blob/master/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java#L10...There are several performance-related problems with the subscription history data sampling implemented in https://gitlab.simantics.org/simantics/platform/-/blob/master/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java#L103-112.
The worst thing is that the amount of excess work grows linearly with the amount of subscriptions defined in the active model and each `Charts.createHistorySamplerItem2` invocation will always read all the subscription metadata .txt files from disk, which is terribly expensive compared to caching them.
Caching of course makes the `ItemManager` state handling more complex to ensure that up-to-date data for subscriptions is always available. However it is definitely worth it in this case. The simplest way to keep the caches coherent is to invalidate then entirely upon any detection of change (force rebuild). In practice the set of items stored by a HistoryManager doesn't change all that often so cache will hit most often and rebuilds should be few.
Another thing to optimize is the use of `ItemManager.search` to find the history items whose `variableId` matches the item searched for. Currently it just always loops over *all* the item `Bean`s, reads the `variableId` field through `Bean` class mechanisms and compares it to the searched for value. If there are hundreds or thousands of items, the time spent in this will linearly grow as well. Again this data is something that hardly changes and can be heavily cached through adding a mechanism to `ItemManager` to create an multi-map index (`key -> List<Bean>`) of the item beans by a specific field in the beans. This allows the `createHistorySamplerItem2` code to just ensure the index by `variableId` exists (or create it if it's missing) and directly lookup all the beans whose `variableId` matches.
Finally the code will create `LevelItem` instances from all the found item beans. This involves reading `id` and `samplingInterval` fields from the beans. The amount of these beans should always be small so there's not much point in trying to cache even these sorted `LevelItem[]` arrays.1.60.0Tuukka LehtonenTuukka Lehtonenhttps://gitlab.simantics.org/simantics/platform/-/issues/1091Fix legacy code from diagram monitor loading that can cause unnecessary Asser...2024-03-08T13:10:12ZTuukka LehtonenFix legacy code from diagram monitor loading that can cause unnecessary AssertionErrorsDump from a user's workspace log:
```
!ENTRY org.simantics.utils.ui 4 0 2024-03-07 12:32:27.660
!MESSAGE java.lang.AssertionError
!STACK 0
org.simantics.db.exception.DatabaseException: java.lang.AssertionError
at org.simantics.db.impl....Dump from a user's workspace log:
```
!ENTRY org.simantics.utils.ui 4 0 2024-03-07 12:32:27.660
!MESSAGE java.lang.AssertionError
!STACK 0
org.simantics.db.exception.DatabaseException: java.lang.AssertionError
at org.simantics.db.impl.query.ReadEntry.computeForEach(ReadEntry.java:133)
at org.simantics.db.impl.query.QueryCache.runnerReadEntry(QueryCache.java:697)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:1961)
at org.simantics.modeling.ui.diagram.monitor.MonitorClassFactory2.load(MonitorClassFactory2.java:167)
at org.simantics.diagram.adapter.SyncElementFactory$2.perform(SyncElementFactory.java:52)
at org.simantics.diagram.adapter.SyncElementFactory$2.perform(SyncElementFactory.java:1)
at org.simantics.db.impl.query.ReadEntry.computeForEach(ReadEntry.java:121)
at org.simantics.db.impl.query.QueryCache.runnerReadEntry(QueryCache.java:697)
at org.simantics.db.impl.graph.ReadGraphImpl$24.run0(ReadGraphImpl.java:5190)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:233)
at org.simantics.db.impl.query.QueryProcessor.performPending(QueryProcessor.java:177)
at org.simantics.db.impl.graph.ReadGraphImpl.performPending(ReadGraphImpl.java:6462)
at org.simantics.db.impl.graph.AsyncBarrierImpl.waitBarrier(AsyncBarrierImpl.java:181)
at org.simantics.db.impl.BlockingAsyncProcedure.get(BlockingAsyncProcedure.java:87)
at org.simantics.db.impl.BlockingAsyncProcedure.performSync(BlockingAsyncProcedure.java:170)
at org.simantics.db.impl.query.AsyncReadEntry.computeForEach(AsyncReadEntry.java:165)
at org.simantics.db.impl.query.QueryCache.runnerAsyncReadEntry(QueryCache.java:777)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:2062)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:2042)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:2054)
at org.simantics.diagram.adapter.GraphToDiagramSynchronizer$GraphToDiagramUpdater$4.run(GraphToDiagramSynchronizer.java:1897)
at org.simantics.db.common.request.ReadRequest.perform(ReadRequest.java:21)
at org.simantics.db.impl.query.ReadEntry.computeForEach(ReadEntry.java:121)
at org.simantics.db.impl.query.QueryCache.runnerReadEntry(QueryCache.java:669)
at org.simantics.db.impl.graph.ReadGraphImpl$24.run0(ReadGraphImpl.java:5190)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:233)
at org.simantics.db.impl.query.QueryProcessor.performPending(QueryProcessor.java:177)
at org.simantics.db.impl.graph.ReadGraphImpl.performPending(ReadGraphImpl.java:6462)
at org.simantics.db.impl.graph.AsyncBarrierImpl.waitBarrier(AsyncBarrierImpl.java:181)
at org.simantics.db.impl.BlockingAsyncProcedure.get(BlockingAsyncProcedure.java:87)
at org.simantics.db.impl.BlockingAsyncProcedure.performSync(BlockingAsyncProcedure.java:170)
at org.simantics.db.impl.query.AsyncReadEntry.computeForEach(AsyncReadEntry.java:165)
at org.simantics.db.impl.query.QueryCache.runnerAsyncReadEntry(QueryCache.java:760)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:2062)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:2035)
at org.simantics.diagram.adapter.GraphToDiagramSynchronizer$GraphToDiagramUpdater.process(GraphToDiagramSynchronizer.java:2405)
at org.simantics.diagram.adapter.GraphToDiagramSynchronizer$8.graphUpdate(GraphToDiagramSynchronizer.java:2830)
at org.simantics.diagram.adapter.GraphToDiagramSynchronizer.processGraphUpdates(GraphToDiagramSynchronizer.java:3477)
at org.simantics.diagram.adapter.GraphToDiagramSynchronizer.loadDiagram(GraphToDiagramSynchronizer.java:1332)
at org.simantics.diagram.query.DiagramLoadQuery.perform(DiagramLoadQuery.java:52)
at org.simantics.diagram.query.DiagramLoadQuery.perform(DiagramLoadQuery.java:1)
at org.simantics.modeling.ui.diagramEditor.DiagramViewer.lambda$2(DiagramViewer.java:657)
at fi.vtt.simantics.procore.internal.SessionImplSocket$6.run0(SessionImplSocket.java:1522)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:233)
at fi.vtt.simantics.procore.internal.SessionRequestManager$1.run0(SessionRequestManager.java:127)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:233)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:238)
Caused by: java.lang.AssertionError
at org.simantics.db.impl.graph.ReadGraphImpl.getPossibleURI(ReadGraphImpl.java:266)
at org.simantics.modeling.ui.diagram.monitor.ResolveMonitorVariable.perform(ResolveMonitorVariable.java:70)
at org.simantics.modeling.ui.diagram.monitor.ResolveMonitorVariable.perform(ResolveMonitorVariable.java:1)
at org.simantics.db.impl.query.ReadEntry.computeForEach(ReadEntry.java:121)
... 46 more
and
org.simantics.db.exception.DatabaseException: java.lang.AssertionError
at org.simantics.db.impl.query.ReadEntry.computeForEach(ReadEntry.java:133)
at org.simantics.db.impl.query.QueryCache.runnerReadEntry(QueryCache.java:697)
at org.simantics.db.impl.graph.ReadGraphImpl.syncRequest(ReadGraphImpl.java:1961)
at org.simantics.modeling.ui.diagram.monitor.MonitorClassFactory2.load(MonitorClassFactory2.java:167)
at org.simantics.diagram.adapter.SyncElementFactory$2.perform(SyncElementFactory.java:52)
at org.simantics.diagram.adapter.SyncElementFactory$2.perform(SyncElementFactory.java:1)
at org.simantics.db.impl.query.ReadEntry.computeForEach(ReadEntry.java:121)
at org.simantics.db.impl.query.QueryCache.runnerReadEntry(QueryCache.java:697)
at org.simantics.db.impl.graph.ReadGraphImpl$24.run0(ReadGraphImpl.java:5190)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:233)
at org.simantics.db.impl.query.QueryProcessor.performPending(QueryProcessor.java:177)
at org.simantics.db.impl.graph.ReadGraphImpl.performPending(ReadGraphImpl.java:6462)
at org.simantics.db.impl.graph.AsyncBarrierImpl.waitBarrier(AsyncBarrierImpl.java:181)
at org.simantics.db.impl.BlockingAsyncProcedure.get(BlockingAsyncProcedure.java:87)
at org.simantics.db.impl.BlockingAsyncProcedure.performSync(BlockingAsyncProcedure.java:170)
at org.simantics.db.impl.query.AsyncReadEntry$1.recompute(AsyncReadEntry.java:96)
at org.simantics.db.impl.query.QueryProcessor.compareTo(QueryProcessor.java:1372)
at org.simantics.db.impl.query.QueryListening.fireListeners_(QueryListening.java:268)
at org.simantics.db.impl.query.QueryListening.fireListeners(QueryListening.java:227)
at fi.vtt.simantics.procore.internal.State.commitWriteTransaction(State.java:344)
at fi.vtt.simantics.procore.internal.SessionRequestManager$4.run0(SessionRequestManager.java:236)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:233)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:238)
Caused by: java.lang.AssertionError
at org.simantics.db.impl.graph.ReadGraphImpl.getPossibleURI(ReadGraphImpl.java:266)
at org.simantics.modeling.ui.diagram.monitor.ResolveMonitorVariable.perform(ResolveMonitorVariable.java:70)
at org.simantics.modeling.ui.diagram.monitor.ResolveMonitorVariable.perform(ResolveMonitorVariable.java:1)
at org.simantics.db.impl.query.ReadEntry.computeForEach(ReadEntry.java:121)
... 22 more
```
The Variable processing code here it very dated and can easily be made both safer and simpler.1.60.0Tuukka LehtonenTuukka Lehtonenhttps://gitlab.simantics.org/simantics/platform/-/issues/1090Support Workbench Search contributions in SCL2024-03-25T21:39:31ZAntti VillbergSupport Workbench Search contributions in SCLAntti VillbergAntti Villberghttps://gitlab.simantics.org/simantics/platform/-/issues/1089Trying to make a connection deemed CANBEMADELEGAL by IModelingRules results i...2024-03-04T06:53:31ZTuukka LehtonenTrying to make a connection deemed CANBEMADELEGAL by IModelingRules results in NPE```
ERROR [2024-03-04 08:28:09,766] org.simantics.utils.ui.ErrorLogger: java.lang.NullPointerException: Cannot invoke "org.simantics.structural2.modelingRules.IAttachmentRelationMap.get(org.simantics.db.ReadGraph, org.simantics.structura...```
ERROR [2024-03-04 08:28:09,766] org.simantics.utils.ui.ErrorLogger: java.lang.NullPointerException: Cannot invoke "org.simantics.structural2.modelingRules.IAttachmentRelationMap.get(org.simantics.db.ReadGraph, org.simantics.structural2.modelingRules.CPTerminal)" because "judgment.attachmentRelations" is null
Cannot invoke "org.simantics.structural2.modelingRules.IAttachmentRelationMap.get(org.simantics.db.ReadGraph, org.simantics.structural2.modelingRules.CPTerminal)" because "judgment.attachmentRelations" is null
java.lang.NullPointerException: Cannot invoke "org.simantics.structural2.modelingRules.IAttachmentRelationMap.get(org.simantics.db.ReadGraph, org.simantics.structural2.modelingRules.CPTerminal)" because "judgment.attachmentRelations" is null
at org.simantics.diagram.participant.ConnectionBuilder.chooseAttachmentRelationForNode(ConnectionBuilder.java:785)
at org.simantics.diagram.participant.ConnectionBuilder.chooseAttachmentRelationForNode(ConnectionBuilder.java:766)
at org.simantics.diagram.participant.ConnectionBuilder.create(ConnectionBuilder.java:325)
at org.simantics.diagram.participant.ConnectTool2$3.perform(ConnectTool2.java:1005)
at fi.vtt.simantics.procore.internal.SessionImplSocket$1.run0(SessionImplSocket.java:468)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at fi.vtt.simantics.procore.internal.SessionRequestManager$3.run0(SessionRequestManager.java:187)
... 2 common frames omitted
Wrapped by: org.simantics.db.exception.DatabaseException: java.lang.NullPointerException: Cannot invoke "org.simantics.structural2.modelingRules.IAttachmentRelationMap.get(org.simantics.db.ReadGraph, org.simantics.structural2.modelingRules.CPTerminal)" because "judgment.attachmentRelations" is null
at fi.vtt.simantics.procore.internal.WriteStateBase.finish(WriteStateBase.java:67)
at fi.vtt.simantics.procore.internal.WriteState.finish(WriteState.java:27)
at fi.vtt.simantics.procore.internal.SessionRequestManager$4.run0(SessionRequestManager.java:261)
at org.simantics.db.impl.query.QueryProcessor$SessionTask.run(QueryProcessor.java:230)
at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:155)
```
The `CANBEMADELEGAL` `ConnectionJudgement` which has `attachmentRelations == null` comes from here:
```
Thread [AWT-EventQueue-0] (Suspended (breakpoint at line 1116 in org.simantics.diagram.participant.ConnectTool2))
org.simantics.diagram.participant.ConnectTool2.canConnect(org.simantics.g2d.element.IElement, org.simantics.g2d.diagram.handler.Topology.Terminal) line: 1116
org.simantics.diagram.participant.ConnectTool2.processMouseMove(org.simantics.scenegraph.g2d.events.MouseEvent$MouseMovedEvent) line: 553
org.simantics.diagram.participant.ConnectTool2.handleEvent(org.simantics.scenegraph.g2d.events.MouseEvent) line: 519
jdk.internal.reflect.GeneratedMethodAccessor206.invoke(java.lang.Object, java.lang.Object[]) line: not available
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 43
java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 568
org.simantics.scenegraph.g2d.events.EventHandlerReflection$1.handleEvent(org.simantics.scenegraph.g2d.events.Event) line: 101
org.simantics.scenegraph.g2d.events.EventHandlerReflection$EventHandlerDefinition$1.handleEvent(org.simantics.scenegraph.g2d.events.Event) line: 144
org.simantics.scenegraph.g2d.events.EventHandlerStack.handleEvent(org.simantics.scenegraph.g2d.events.Event) line: 67
org.simantics.scenegraph.g2d.events.EventQueue.handleEvents() line: 110
org.simantics.g2d.canvas.impl.CanvasContext$1.run() line: 136
java.awt.event.InvocationEvent.dispatch() line: 318
java.awt.EventQueue.dispatchEventImpl(java.awt.AWTEvent, java.lang.Object) line: 771
java.awt.EventQueue$4.run() line: 722
java.awt.EventQueue$4.run() line: 716
java.security.AccessController.executePrivileged(java.security.PrivilegedAction<T>, java.security.AccessControlContext, java.lang.Class<?>) line: 776
java.security.AccessController.doPrivileged(java.security.PrivilegedAction<T>, java.security.AccessControlContext) line: 399
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.security.PrivilegedAction<T>, java.security.AccessControlContext, java.security.AccessControlContext) line: 86
java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent) line: 741
java.awt.EventDispatchThread.pumpOneEventForFilters(int) line: 203
java.awt.EventDispatchThread.pumpEventsForFilter(int, java.awt.Conditional, java.awt.EventFilter) line: 124
java.awt.EventDispatchThread.pumpEventsForHierarchy(int, java.awt.Conditional, java.awt.Component) line: 113
java.awt.EventDispatchThread.pumpEvents(int, java.awt.Conditional) line: 109
java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional) line: 101
java.awt.EventDispatchThread.run() line: 90
```1.60.0Tuukka LehtonenTuukka Lehtonenhttps://gitlab.simantics.org/simantics/platform/-/issues/1088Resetting a database index with IndexedRelations.reset does not properly clea...2024-02-29T09:37:44ZTuukka LehtonenResetting a database index with IndexedRelations.reset does not properly clear the IndexedRelationsSearcher cachesKind of similar to #725, `IndexedRelationsImpl.reset` does not call `searcher.bestEffortClear(monitor, processor.getSession())` which it should call to ensure all caches are properly reset. Currently it just deletes the files on disk.
W...Kind of similar to #725, `IndexedRelationsImpl.reset` does not call `searcher.bestEffortClear(monitor, processor.getSession())` which it should call to ensure all caches are properly reset. Currently it just deletes the files on disk.
When index resetting facilities are (usually manually) used, this can cause unexpected behaviour by returning old cached results instead of returning re-indexed results from the actual database.1.60.0Tuukka LehtonenTuukka Lehtonenhttps://gitlab.simantics.org/simantics/platform/-/issues/10871.63.0 release engineering2024-02-25T12:40:09ZTuukka Lehtonen1.63.0 release engineeringBranched projects:
* [ ] simantics/third-party@
* [ ] simantics/platform@
* [ ] simantics/fmil@
* [ ] simantics/matlab@
* [ ] simantics/python@
* [ ] simantics/r@
* [ ] simantics/interop@
* [ ] simantics/3d@
* [ ] members/simupedia@
* [ ...Branched projects:
* [ ] simantics/third-party@
* [ ] simantics/platform@
* [ ] simantics/fmil@
* [ ] simantics/matlab@
* [ ] simantics/python@
* [ ] simantics/r@
* [ ] simantics/interop@
* [ ] simantics/3d@
* [ ] members/simupedia@
* [ ] members/fmi@
* [ ] simantics/district@
* [ ] simantics/sysdyn@
* [ ] gold-members/proteus@1.63.0Tuukka LehtonenTuukka Lehtonen2025-02-19https://gitlab.simantics.org/simantics/platform/-/issues/10861.62.0 release engineering2024-02-25T12:41:02ZTuukka Lehtonen1.62.0 release engineeringBranched projects:
* [ ] simantics/third-party@
* [ ] simantics/platform@
* [ ] simantics/fmil@
* [ ] simantics/matlab@
* [ ] simantics/python@
* [ ] simantics/r@
* [ ] simantics/interop@
* [ ] simantics/3d@
* [ ] members/simupedia@
* [ ...Branched projects:
* [ ] simantics/third-party@
* [ ] simantics/platform@
* [ ] simantics/fmil@
* [ ] simantics/matlab@
* [ ] simantics/python@
* [ ] simantics/r@
* [ ] simantics/interop@
* [ ] simantics/3d@
* [ ] members/simupedia@
* [ ] members/fmi@
* [ ] simantics/district@
* [ ] simantics/sysdyn@
* [ ] gold-members/proteus@1.62.0Tuukka LehtonenTuukka Lehtonen2024-11-20https://gitlab.simantics.org/simantics/platform/-/issues/10851.61.0 release engineering2024-02-25T12:41:02ZTuukka Lehtonen1.61.0 release engineeringBranched projects:
* [ ] simantics/third-party@
* [ ] simantics/platform@
* [ ] simantics/fmil@
* [ ] simantics/matlab@
* [ ] simantics/python@
* [ ] simantics/r@
* [ ] simantics/interop@
* [ ] simantics/3d@
* [ ] members/simupedia@
* [ ...Branched projects:
* [ ] simantics/third-party@
* [ ] simantics/platform@
* [ ] simantics/fmil@
* [ ] simantics/matlab@
* [ ] simantics/python@
* [ ] simantics/r@
* [ ] simantics/interop@
* [ ] simantics/3d@
* [ ] members/simupedia@
* [ ] members/fmi@
* [ ] simantics/district@
* [ ] simantics/sysdyn@
* [ ] gold-members/proteus@1.61.0Tuukka LehtonenTuukka Lehtonen2024-08-21https://gitlab.simantics.org/simantics/platform/-/issues/10841.60.0 release engineering2024-02-25T12:41:02ZTuukka Lehtonen1.60.0 release engineeringBranched projects:
* [ ] simantics/third-party@
* [ ] simantics/platform@
* [ ] simantics/fmil@
* [ ] simantics/matlab@
* [ ] simantics/python@
* [ ] simantics/r@
* [ ] simantics/interop@
* [ ] simantics/3d@
* [ ] members/simupedia@
* [ ...Branched projects:
* [ ] simantics/third-party@
* [ ] simantics/platform@
* [ ] simantics/fmil@
* [ ] simantics/matlab@
* [ ] simantics/python@
* [ ] simantics/r@
* [ ] simantics/interop@
* [ ] simantics/3d@
* [ ] members/simupedia@
* [ ] members/fmi@
* [ ] simantics/district@
* [ ] simantics/sysdyn@
* [ ] gold-members/proteus@1.60.0Tuukka LehtonenTuukka Lehtonen2024-05-22https://gitlab.simantics.org/simantics/platform/-/issues/1083Remove green color from modelled SWT GridCell2024-02-23T06:54:40ZAntti VillbergRemove green color from modelled SWT GridCellWas about timeWas about time1.59.0Antti VillbergAntti Villberghttps://gitlab.simantics.org/simantics/platform/-/issues/1082Get rid of Java 1.8 requirements in org.simantics.modeling.web etc2024-03-01T11:19:14ZAntti VillbergGet rid of Java 1.8 requirements in org.simantics.modeling.web etc1.59.0Antti VillbergAntti Villberg