Task #8818 (closed)
Opened 7 years ago
Closed 7 years ago
Bug:Saving rendering settings
| Reported by: | jburel | Owned by: | jamoore |
|---|---|---|---|
| Priority: | critical | Milestone: | OMERO-4.4 |
| Component: | Services | Version: | n.a. |
| Keywords: | n.a. | Cc: | rkferguson, saloynton, bpindelski, wmoore, jburel, jamoore |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | 0.0d |
| Sprint: | 2012-06-19 (17) |
Description
Rendering settings are not saved in Insight (clicking the floppy disk icon doesn't save them) - they revert to the defaults after accessing the image again. In web client, changing the rendering settings causes an infinite "Loading..." and/or a 404.
Attachments (1)
Change History (25)
comment:1 Changed 7 years ago by jburel
comment:2 Changed 7 years ago by jburel
- Component changed from Client to Services
- Owner set to jmoore
Saving rendering settings by group owner in private group creates the following exception
settingsorg.openmicroscopy.shoola.env.rnd.RenderingServiceException: An error occurred while saving the current settings.
omero.InternalException
serverStackTrace = "ome.conditions.InternalException: Wrapped Exception: (java.lang.NullPointerException):
null
at ome.security.basic.BasicACLVoter.objectBelongsToUser(BasicACLVoter.java:320)
at ome.security.basic.BasicACLVoter.allowUpdateOrDelete(BasicACLVoter.java:222)
at ome.security.basic.BasicACLVoter.postProcess(BasicACLVoter.java:296)
at ome.tools.hibernate.ProxyCleanupFilter.filter(ProxyCleanupFilter.java:119)
at ome.util.ContextFilter.filter(ContextFilter.java:160)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:244)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy65.doWork(Unknown Source)
at ome.services.util.Executor$Impl.execute(Executor.java:406)
at ome.services.util.Executor$Impl.execute(Executor.java:350)
at ome.services.RenderingBean.createNewRenderingDef(RenderingBean.java:1871)
at ome.services.RenderingBean.saveCurrentSettings(RenderingBean.java:765)
at sun.reflect.GeneratedMethodAccessor2275.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy89.saveCurrentSettings(Unknown Source)
at sun.reflect.GeneratedMethodAccessor2275.invoke(Unknown Source)
comment:3 Changed 7 years ago by jburel <j.burel@…>
(In [70f55a90943c720152cca0b8cf2f7adee66d0902/ome.git] on branch develop) Review closing logic if failure to save settings (see #8818)
comment:4 Changed 7 years ago by jburel
- Sprint changed from 2012-05-22 (15) to 2012-06-05 (16)
Moved from sprint 2012-05-22 (15)
comment:5 Changed 7 years ago by jburel
- Priority changed from major to critical
comment:6 Changed 7 years ago by jburel
java.lang.Exception: Abnormal termination due to an uncaught exception. java.lang.NullPointerException at org.openmicroscopy.shoola.agents.metadata.rnd.DomainPane.setSelectedChannel(DomainPane.java:917) at org.openmicroscopy.shoola.agents.metadata.rnd.DomainPane.resetDefaultRndSettings(DomainPane.java:844) at org.openmicroscopy.shoola.agents.metadata.rnd.RendererUI.resetDefaultRndSettings(RendererUI.java:185) at org.openmicroscopy.shoola.agents.metadata.rnd.RendererComponent.refresh(RendererComponent.java:1066) at org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewerModel.refreshRenderer(TreeViewerModel.java:1030) at org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewerWin.refreshRenderer(TreeViewerWin.java:1153) at org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewerControl.windowGainedFocus(TreeViewerControl.java:1485) at
comment:7 Changed 7 years ago by jmoore
Pushed following partial fix to will/sprint16-bugfixes:
commit b9a57fa8789e614fd824739b646545cb8ed60e27
Author: jmoore <josh@glencoesoftware.com>
Date: Mon May 28 10:28:44 2012 +0200
Force load owner and group if null in details (See #8818)
During post-processing in BasicACLVoter, the owner and group
fields can be null which lead to a NPE on objectBelongsToUser.
This was masking a ReadOnlyGroupSecurityViolation which still
needs to be fixed.
Now the issue I'm seeing is:
Caused by: omero.ReadOnlyGroupSecurityViolation
serverStackTrace = "ome.conditions.ReadOnlyGroupSecurityViolation: Cannot link to ome.model.core.Pixels:Id_1001
Current user (rnd8818-leader) is an admin or the owner of
the private group (rnd8818=rw----). It is not allowed to
link to users' data.
at ome.security.basic.OmeroInterceptor.evaluateLinkages(OmeroInterceptor.java:454)
at ome.security.basic.OmeroInterceptor.onFlushDirty(OmeroInterceptor.java:179)
at org.hibernate.event.def.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:372)
at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349)
at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1208)
at ome.logic.UpdateImpl.afterUpdate(UpdateImpl.java:294)
at ome.logic.UpdateImpl.doAction(UpdateImpl.java:312)
at ome.logic.UpdateImpl.doAction(UpdateImpl.java:302)
at ome.logic.UpdateImpl.saveAndReturnObject(UpdateImpl.java:118)
at ome.logic.PixelsImpl.saveRndSettings(PixelsImpl.java:305)
comment:8 Changed 7 years ago by jburel
From viewer with latest code.
omero.InternalException
serverStackTrace = "ome.conditions.InternalException: Wrapped Exception: (java.lang.NullPointerException):
null
"
serverExceptionClass = "ome.conditions.InternalException"
message = " Wrapped Exception: (java.lang.NullPointerException):
null"
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at IceInternal.BasicStream$DynamicUserExceptionFactory.createAndThrow(BasicStream.java:2243)
at IceInternal.BasicStream.throwException(BasicStream.java:1632)
at IceInternal.Outgoing.throwUserException(Outgoing.java:442)
at omero.api._RenderingEngineDelM.saveCurrentSettings(_RenderingEngineDelM.java:1926)
at omero.api.RenderingEnginePrxHelper.saveCurrentSettings(RenderingEnginePrxHelper.java:2712)
at omero.api.RenderingEnginePrxHelper.saveCurrentSettings(RenderingEnginePrxHelper.java:2684)
at org.openmicroscopy.shoola.env.rnd.RenderingControlProxy.saveCurrentSettings(RenderingControlProxy.java:1285)
comment:9 Changed 7 years ago by jmoore
Jean-Marie, can you add a test that reproduces? I'm certainly not seeing that.
comment:10 Changed 7 years ago by jburel
A commit was pushed while testing. I do not have the problem now.
comment:11 Changed 7 years ago by jburel
Private group-owner
- saving his/her data: ok
Read-only:
- admin:
- saving his/her data: ok
- saving settings for other members: ok (update thumbnail insight missing )
- group owner:
- saving his/her data: ok
- saving settings for other members:
Caused by: omero.SecurityViolation serverStackTrace = "ome.conditions.SecurityViolation: You are not authorized to change the owner for ome.model.display.RenderingDef:Id_104 from ome.model.meta.Experimenter:Id_3 to ome.model.meta.Experimenter:Id_2 at ome.security.basic.OmeroInterceptor.managedOwner(OmeroInterceptor.java:849) at ome.security.basic.OmeroInterceptor.checkManagedDetails(OmeroInterceptor.java:747) at ome.security.basic.OmeroInterceptor.resetDetails(OmeroInterceptor.java:316) at ome.security.basic.OmeroInterceptor.onFlushDirty(OmeroInterceptor.java:181) at org.hibernate.event.def.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:372) at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349) at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1208) at ome.logic.UpdateImpl.afterUpdate(UpdateImpl.java:294) at ome.logic.UpdateImpl.doAction(UpdateImpl.java:312) at ome.logic.UpdateImpl.doAction(UpdateImpl.java:302) at ome.logic.UpdateImpl.saveAndReturnObject(UpdateImpl.java:118) at ome.logic.PixelsImpl.saveRndSettings(PixelsImpl.java:305)
comment:12 Changed 7 years ago by jmoore <josh@…>
(In [b9a57fa8789e614fd824739b646545cb8ed60e27/ome.git] on branch develop) Force load owner and group if null in details (See #8818)
During post-processing in BasicACLVoter, the owner and group
fields can be null which lead to a NPE on objectBelongsToUser.
This was masking a ReadOnlyGroupSecurityViolation? which still
needs to be fixed.
comment:13 Changed 7 years ago by jburel
- Sprint changed from 2012-06-05 (16) to 2012-06-19 (17)
Moved from sprint 2012-06-05 (16)
comment:14 Changed 7 years ago by jmoore
- Owner changed from jmoore to jburel
Jean-Marie was working on tests. If you need me to write them, J-M, feel free to pass it back.
comment:15 Changed 7 years ago by jburel
- Status changed from new to accepted
comment:16 Changed 7 years ago by jburel
- Remaining Time set to 0.3
comment:17 Changed 7 years ago by jburel
- Owner changed from jburel to jmoore
Testing written and pushed
The failing tests are in integration/RenderingEngineTest
comment:18 Changed 7 years ago by jmoore
- Cc jmoore added
- Owner changed from jmoore to cxallan
Pushed a partial fix to https://github.com/joshmoore/openmicroscopy/tree/8818-saveCurrentSettings
This is getting into the deeper mysteries of rdef ownership. Passing to Chris for guidance.
comment:19 Changed 7 years ago by jmoore
- Owner changed from cxallan to jmoore
- Remaining Time changed from 0.3 to 0.5
Chris pointed out that
commit b9a57fa8789e614fd824739b646545cb8ed60e27
Author: jmoore <josh@glencoesoftware.com>
Date: Mon May 28 10:28:44 2012
Force load owner and group if null in details (See #8818)
During post-processing in BasicACLVoter, the owner and group
fields can be null which lead to a NPE on objectBelongsToUser.
This was masking a ReadOnlyGroupSecurityViolation which still
needs to be fixed.
is doing the wrong thing. This is related to #8991, so I may be backtracking on all of those changes and finding a different solution (if possible). Otherwise, I'll need to add DB access to BasicACLVoter and lookup the correct details info.
comment:20 Changed 7 years ago by jmoore
After rolling back the above commit, I'm no longer getting a NPE at objectBelongsToUser in comment 2 but rather a NPE saying that retrieveRndSettings is returning null.
comment:21 Changed 7 years ago by jmoore
- Remaining Time changed from 0.5 to 0
- Resolution set to fixed
- Status changed from accepted to closed
Refactoring of retrieveRndSettings from RenderingBean? seems to fix the issue. Pushed to sprint17-bugfixes.
* 2eb7cb4 - (HEAD, sprint17-bugfixes) Merge branch '8818-rnd-settings' into sprint17-bugfixes (30 seconds ago) <jmoore> |\ | * 7114d5f - Refactor graph critical logic to IPixels (Fix #8818) (4 minutes ago) <jmoore> | * aad77be - Reuse retrieveRndSettings outside of execute (See #8818) (4 minutes ago) <jmoore> | * a379407 - Revert "Force load owner and group if null in details (See #8818)" (4 minutes ago) <jmoore>
Changed 7 years ago by bpindelski
comment:22 Changed 7 years ago by jmoore
- Resolution fixed deleted
- Status changed from closed to reopened
Last issue in #8898 is now reproducing this issue.
comment:23 Changed 7 years ago by jmoore
- Remaining Time changed from 0 to 0.25
- Status changed from reopened to accepted
comment:24 Changed 7 years ago by jmoore
- Remaining Time changed from 0.25 to 0
- Resolution set to fixed
- Status changed from accepted to closed
Another fixed pushed to sprint17-bugfixe:
commit 2355f135e7f0803e107135ae674e7904aacd11b4
Author: jmoore <josh@glencoesoftware.com>
Date: Tue Jun 12 10:03:26 2012
Handle unmanaged objects for createNewRenderingDef (Fix #8818)
RenderingBean calls createNewRenderingDef in a transaction. That method
in IRenderingSettings returns an unmanaged, or "transient", object which
of course has no owner since it hasn't been saved yet. This commit
assumes objects without an owner and an ID set inherently belong to the
current user since a later save will set the owner to be the current
user.
The script I used to reproduce the problem:
import sys
sys.path.insert(0, "lib/python")
import omero
c = omero.client()
p = long(c.getProperty("omero.pixels"))
s = c.createSession()
r = s.createRenderingEngine()
r.lookupPixels(p)
print "%s rdef?" % p, r.lookupRenderingDef(p)
r.load()
start = r.getChannelWindowStart(0)
start += 0.00001
end = r.getChannelWindowEnd(0)
end -= 0.00001
r.setChannelWindow(0, start, end)
r.saveCurrentSettings() # Fails here
r.close()
logged in as user-1 (the leader the current group) where "omero.pixels" points to an image belonging to the same user.
user-1/private-1 (rendering settings on own data)