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

Shared rendering settings #2365

Merged
merged 55 commits into from May 19, 2014
Merged

Shared rendering settings #2365

merged 55 commits into from May 19, 2014

Conversation

joshmoore
Copy link
Member

See: http://trac.openmicroscopy.org.uk/ome/ticket/12145

This modifies the rendering and thumbnail services to not generate new rendering defs for users viewing someone else's data until a change is requested. This would mean, for example, that for the scenario:

  • user A imports an image (views it, etc)
  • user B views the image, and sees A's settings.
  • user A then modifies the settings
  • user B should still see the same setting.

Only when user B modifies the settings in the viewer should a new rendering settings and thumbnail be generated. And in no case should the regeneration do the long re-calculation of min/max, but those should be copied from user A as well.

/cc @jburel @will-moore @chris-allan @pwalczysko @gusferguson @jrswedlow

Currently, it's not possible to share rendering settings
since the service methods all limit lookups based on the
current user.

This test shows the behavior we would like to see: if
user "other" does not explicitly generate rendering
settings, then none should be created.

There may be permissions issues with this that either
have to be handled in the clients or be worked around
by simplying copying the rendering settings from the
image owner (without re-**generating** them)
This may not be correct overall, but it at least lets the
previously failing test pass. Where a query was made against
`obj.details.owner.id = :user_id` we fall back to using
`obj.details.owner.id = some_other_obj.details.owner.id`.

Likely this code can be refactored into a single helper method.
@joshmoore
Copy link
Member Author

Pushed another commit that now returns a rendering def during RenderingEngine.lookupRenderingDef(pixelId) even if the current user has none. There are a few things that should happen here minimally:

  • The behavior should likely be made configurable (eventually per group)
  • New methods should likely be created with this behavior since this could be considered a significant breaking change. (On the other hand, @mporter-gre ran into exactly this problem himself recently in matlab).

This new test failed before the PixelsImpl method was
modified. Now for all groups (not just `rwr--`) the rdef
for the owner will be returned if none is found for the
current user.
@jburel
Copy link
Member

jburel commented Apr 28, 2014

Testing set-up:

  • private group
    • user-1 owner
    • user-2 member
  • read-only group
    • user-3 owner
    • user-4 member
  • read-annotate group
    • user-5 owner
    • user-6 member

@jburel
Copy link
Member

jburel commented Apr 28, 2014

Thumbnails View only tests

Test 1: private group

  • User-2 Import an image e.g. gif
  • One thumbnail generated
  • User-1 browse dataset of user-2.
  • No thumbnail nor rnd settings generated for user-1

Test 2: read-only group

  • User-3 (resp. user-4) Import an image e.g. gif
  • One thumbnail generated
  • User-4 (resp. user-3) browse dataset of user-3 (resp. user-4)
  • No thumbnail nor rnd settings generated for user-4 (resp. user-3)

Test 3: read-annotate group

  • User-5 (resp. user-6) Import an image e.g. gif
  • One thumbnail generated
  • User-6 (resp. user-5) browse dataset of user-5 (resp. user-6)
  • No thumbnail nor rnd settings generated for user-6 (resp. user-5)

@jburel
Copy link
Member

jburel commented Apr 28, 2014

Thumbnails Tests 1, 2 and 3 work for both insight and web.

@jburel
Copy link
Member

jburel commented Apr 28, 2014

Image Viewer: View only tests

Test 1: private group

  • User-1 open an image of user-2.
  • No rnd settings generated for user-1

Test 2: read-only group

  • User-4 (resp. user-3) open an image of user-3 (resp. user-4)
  • No rnd settings generated for user-4 (resp. user-3)

Test 3: read-annotate group

  • User-5 (resp. user-6) open an image of user-6 (resp. user-5)
  • No rnd settings generated for user-5 (resp. user-6)

@jburel
Copy link
Member

jburel commented Apr 28, 2014

Image Viewer Tests 1, 2 and 3 work for both insight and web.

@jburel
Copy link
Member

jburel commented Apr 28, 2014

Image Viewer: Save rendering settings tests

Test 1: read-only group

  • User-3 open an image of user-4
  • Modify the rnd settings.
  • Save the rendering settings.
  • New rendering settings created and new thumbnails created for user-3

Test 2: read-annotate group

  • User-5 (resp. user-6) open an image of user-6 (resp. user-5)
  • Modify the rnd settings.
  • Save the rendering settings.
  • New rendering settings created and new thumbnails created for user-5 (resp. user-6)

@jburel
Copy link
Member

jburel commented Apr 28, 2014

@joshmoore, @will-moore, @chris-allan
Save rendering settings tests:
insight: not working

  • no rendering settings created for the user modifying the settings.
  • existing settings are modified in the DB.
  • no thumbnails generated.

Web: not working

  • settings are not set in the DB.
  • no thumbnails generated

Action:review save workflow since we were assuming that the settings were owned by the user looking at the data..

@jburel
Copy link
Member

jburel commented Apr 28, 2014

The logic of the saveCurrentSettings needs to be modified

  • If no settings owned by the user currently viewing the image, create and return the new rnd settings.

After @jburel's investigation, the remaining issue
with this branch looks to be that clients are assuming
(rightly) that the rendering def they have in hand is
their own. That's always been the case.

With this change, that no longer holds.

In order to not break the API the intention is:

 * the old method will throw an exception
   when users try to save someone else's rdef

 * the new method will *always* create a new
   rdef, set it as the current one, and return
   the new id.
The primary logic from saveCurrentSettings which needs
to be avoided are the calls to `new.setId(old.getId())`.
`internalSave(boolean saveAs)` uses the saveAs argument
to skip over these sections.

The added test passes successfully.
To preserve the previous logic in which clients never
received RenderingDef instances belonging to other users,
we now detect when things have gone amiss and raise an
exception.

Client developers are responsible for checking the ownership
of the RenderingDef in hand and calling the appropriate method.
@joshmoore
Copy link
Member Author

Pushed the suggested logic.

@jburel
Copy link
Member

jburel commented Apr 28, 2014

The new settings are created when using saveAsNewSettings(). The thumbnail needs to be generated with the new settings. Currently only one thumbnail for the settings owned by the owner of the image.

Tested with insight only
the saving logic client-side needs to be reviewed now in both clients.

@joshmoore
Copy link
Member Author

Added exclude since at this point the clients need modification before things will work again. @jburel / @will-moore : happy to take PRs against this branch.

In order to not leave clients with NPEs,
when saveAs is called we also generate
the default 96 thumbnail.
thumbnailExists was broken and:
 1) throwing hibernate exceptions on save
 2) throwing NPEs during cache lookups

This should allow thumbnailExists to work
again. We may need a thumbnailExistsByLongestSide
method though.
@joshmoore
Copy link
Member Author

Pushed thumbnail generation.

@jburel
Copy link
Member

jburel commented Apr 29, 2014

@joshmoore: after recent changes, thumbnails generation does not work anymore cf. Thumbnails View only tests. No Thumbnail available for owner

omero.InternalException
    serverStackTrace = "ome.conditions.InternalException: No thumbnail available!
                            at ome.services.ThumbnailBean.handleNoThumbnail(ThumbnailBean.java:1322)
                            at ome.services.ThumbnailBean.getThumbnail(ThumbnailBean.java:1003)
                            at sun.reflect.GeneratedMethodAccessor988.invoke(Unknown Source)
                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                            at java.lang.reflect.Method.invoke(Method.java:597)

more

Caused by: java.lang.StackOverflowError
                            at ome.services.ThumbnailCtx.loadAndPrepareMetadata(ThumbnailCtx.java:319)
                            at ome.services.ThumbnailCtx.loadAndPrepareMetadata(ThumbnailCtx.java:319)
                            at ome.services.ThumbnailCtx.loadAndPrepareMetadata(ThumbnailCtx.java:319)

The settings are correctly saved in DB

@joshmoore
Copy link
Member Author

Have you pushed your branch anywhere yet?

@jburel
Copy link
Member

jburel commented Apr 29, 2014

@joshmoore: not yet reworking some code.

@jburel
Copy link
Member

jburel commented Apr 30, 2014

Import a new image, in the blitz log

notify finished: omero.grid.ImportResponse@3db43dd2/omero.cmd.Status@446c5a4
2014-04-30 16:10:42,082 INFO  [                      omero.cmd.SessionI] (.Server-10) Added servant to adapter: c126789f-c3b4-4476-818c-5bb458563f5c/643ceb13-f17a-47ae-be93-df679d75d1faomero.api.ThumbnailStore(omero.api._ThumbnailStoreTie@b6974b49)
2014-04-30 16:10:42,119 INFO  [        ome.services.util.ServiceHandler] (.Server-11)  Meth:    interface ome.api.ThumbnailStore.setPixelsId
2014-04-30 16:10:42,119 INFO  [        ome.services.util.ServiceHandler] (.Server-11)  Args:    [151]
2014-04-30 16:10:42,128 INFO  [         ome.security.basic.EventHandler] (.Server-11)  Auth:    user=6,group=5,event=1489(User),sess=c126789f-c3b4-4476-818c-5bb458563f5c
2014-04-30 16:10:42,134 INFO  [                 org.perf4j.TimingLogger] (.Server-11) start[1398870642128] time[5] tag[omero.bulkLoadRenderingSettings]
2014-04-30 16:10:42,135 INFO  [                 org.perf4j.TimingLogger] (.Server-11) start[1398870642119] time[15] tag[omero.call.success.ome.services.ThumbnailBean.setPixelsId]
2014-04-30 16:10:42,135 INFO  [        ome.services.util.ServiceHandler] (.Server-11)  Rslt:    true
2014-04-30 16:10:42,137 INFO  [        ome.services.util.ServiceHandler] (l.Server-2)  Meth:    interface ome.api.ThumbnailStore.getThumbnail
2014-04-30 16:10:42,137 INFO  [        ome.services.util.ServiceHandler] (l.Server-2)  Args:    [96, 72]
2014-04-30 16:10:42,145 INFO  [         ome.security.basic.EventHandler] (l.Server-2)  Auth:    user=6,group=5,event=1490(User),sess=c126789f-c3b4-4476-818c-5bb458563f5c
2014-04-30 16:10:42,148 INFO  [                 org.perf4j.TimingLogger] (l.Server-2) start[1398870642137] time[11] tag[omero.call.exception]
2014-04-30 16:10:42,149 INFO  [        ome.services.util.ServiceHandler] (l.Server-2)  Excp:    ome.conditions.InternalException: No thumbnail available!
2014-04-30 16:10:42,255 INFO  [        ome.services.util.ServiceHandler] (.Server-10)  Meth:    interface ome.api.StatefulServiceInterface.close
2014-04-30 16:10:42,255 INFO  [        ome.services.util.ServiceHandler] (.Server-10)  Args:    ()
2014-04-30 16:10:42,256 INFO  [         ome.security.basic.EventHandler] (.Server-10)  Auth:    user=6,group=5,event=null(User),sess=c126789f-c3b4-4476-818c-5bb458563f5c
2014-04-30 16:10:42,273 INFO  [                 org.perf4j.TimingLogger] (.Server-10) start[1398870642255] time[18] tag[omero.call.success.ome.services.ThumbnailBean.close]

The message generating thumbnail should be different if an error occurred but that is outside the scope of this PR.

The old method signature was calling itself leading
to an infinite recursion. Slightly scary that this
wasn't more apparent.
@joshmoore
Copy link
Member Author

Pushed a fix, @jburel.

@pwalczysko
Copy link
Member

Retested in all groups and all the workflows which were mentioned in this PR.
Also tested as admin (not a group owner) working in Read-only.
This all works as expected.

@pwalczysko
Copy link
Member

But hit a Bug:
Seems to be specific for multi-t (and/or) multi-z images.

Workflow:

  • login as any user in read-only group (tried root and user-4)
  • go to the image ID 41013, owner user-3, Project Test 140509 10:18:23, Dataset Timelapse(4), the first image in the Dataset 7990-lamin-8 envelope.ome.tiff
  • click on Saved by
  • either do Reset or change the settings followed by Apply to All or a combination of these
  • or you will not be able to do even that - Insight will freeze
2014-05-14 11:27:00,096 ERROR [      o.o.shoola.env.AbnormalExitHandler] (entQueue-0) Abnormal termination due to an uncaught exception.
java.lang.NullPointerException
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerModel.setViewedBy(MetadataViewerModel.java:917)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerComponent.setViewedBy(MetadataViewerComponent.java:1087)
    at org.openmicroscopy.shoola.agents.metadata.RenderingSettingsLoader.handleResult(RenderingSettingsLoader.java:136)
    at org.openmicroscopy.shoola.env.data.events.DSCallAdapter.eventFired(DSCallAdapter.java:90)
    at org.openmicroscopy.shoola.env.data.views.BatchCallMonitor$1.run(BatchCallMonitor.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Abnormal termination due to an uncaught exception.
java.lang.NullPointerException
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerModel.setViewedBy(MetadataViewerModel.java:917)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerComponent.setViewedBy(MetadataViewerComponent.java:1087)
    at org.openmicroscopy.shoola.agents.metadata.RenderingSettingsLoader.handleResult(RenderingSettingsLoader.java:136)
    at org.openmicroscopy.shoola.env.data.events.DSCallAdapter.eventFired(DSCallAdapter.java:90)
    at org.openmicroscopy.shoola.env.data.views.BatchCallMonitor$1.run(BatchCallMonitor.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0"

@pwalczysko
Copy link
Member

@will-moore and @jburel are debugging web atm. It seems that the newly saved settings on the other people's images are not shown in web (as a default or even not at all). Needs to be fixed & retested.

@jburel
Copy link
Member

jburel commented May 14, 2014

I have found the source of the problem in web. Now I need to investigate why those lines were added in the first place.

Problem is in omero/gateway/_init_.py#_prepareTB,

if self._conn.canBeAdmin():
            ctx.setOmeroUser(self.details.owner.id.val)

To be discussed with @cneves and @chris-allan implications (authors of the commits)

jburel and others added 2 commits May 14, 2014 22:09
Kept specific check if no settings only.
@pwalczysko
Copy link
Member

I tried to repeat the NPE (#2365 (comment)) , as user-4, and this time the Saved by button worked fine. But, I got another freeze of Insight and error after I did Reset on the same image.

2014-05-15 12:01:59,616 ERROR [      o.o.shoola.env.AbnormalExitHandler] (entQueue-0) Abnormal termination due to an uncaught exception.
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1995)
    at java.awt.Component.getLocationOnScreen(Component.java:1969)
    at javax.swing.JPopupMenu.show(JPopupMenu.java:887)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerUI.viewedBy(MetadataViewerUI.java:285)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerComponent.setViewedBy(MetadataViewerComponent.java:1088)
    at org.openmicroscopy.shoola.agents.metadata.RenderingSettingsLoader.handleResult(RenderingSettingsLoader.java:136)
    at org.openmicroscopy.shoola.env.data.events.DSCallAdapter.eventFired(DSCallAdapter.java:90)
    at org.openmicroscopy.shoola.env.data.views.BatchCallMonitor$1.run(BatchCallMonitor.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Abnormal termination due to an uncaught exception.
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1995)
    at java.awt.Component.getLocationOnScreen(Component.java:1969)
    at javax.swing.JPopupMenu.show(JPopupMenu.java:887)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerUI.viewedBy(MetadataViewerUI.java:285)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerComponent.setViewedBy(MetadataViewerComponent.java:1088)
    at org.openmicroscopy.shoola.agents.metadata.RenderingSettingsLoader.handleResult(RenderingSettingsLoader.java:136)
    at org.openmicroscopy.shoola.env.data.events.DSCallAdapter.eventFired(DSCallAdapter.java:90)
    at org.openmicroscopy.shoola.env.data.views.BatchCallMonitor$1.run(BatchCallMonitor.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0"

2014-05-15 12:01:59,745 DEBUG [ o.o.shoola.env.data.DataServicesFactory] ( Thread-42) Connection ErrorIce.CommunicatorDestroyedException
    at IceInternal.Outgoing.invoke(Outgoing.java:147)
    at omero.api._RawPixelsStoreDelM.setPixelsId(_RawPixelsStoreDelM.java:1597)
    at omero.api.RawPixelsStorePrxHelper.setPixelsId(RawPixelsStorePrxHelper.java:2226)
    at omero.api.RawPixelsStorePrxHelper.setPixelsId(RawPixelsStorePrxHelper.java:2198)
    at org.openmicroscopy.shoola.env.data.OMEROGateway.isLargeImage(OMEROGateway.java:7967)
    at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.isLargeImage(OmeroImageServiceImpl.java:1866)
    at org.openmicroscopy.shoola.env.data.views.calls.PixelsDataLoader$2.doCall(PixelsDataLoader.java:100)
    at org.openmicroscopy.shoola.env.data.views.BatchCall.doStep(BatchCall.java:144)
    at org.openmicroscopy.shoola.util.concur.tasks.CompositeTask.doStep(CompositeTask.java:226)
    at org.openmicroscopy.shoola.env.data.views.CompositeBatchCall.doStep(CompositeBatchCall.java:126)
    at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.exec(ExecCommand.java:165)
    at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.run(ExecCommand.java:276)
    at org.openmicroscopy.shoola.util.concur.tasks.AsyncProcessor$Runner.run(AsyncProcessor.java:91)
    at java.lang.Thread.run(Thread.java:695)
Connection ErrorIce.CommunicatorDestroyedException
    at IceInternal.Outgoing.invoke(Outgoing.java:147)
    at omero.api._RawPixelsStoreDelM.setPixelsId(_RawPixelsStoreDelM.java:1597)
    at omero.api.RawPixelsStorePrxHelper.setPixelsId(RawPixelsStorePrxHelper.java:2226)
    at omero.api.RawPixelsStorePrxHelper.setPixelsId(RawPixelsStorePrxHelper.java:2198)
    at org.openmicroscopy.shoola.env.data.OMEROGateway.isLargeImage(OMEROGateway.java:7967)
    at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.isLargeImage(OmeroImageServiceImpl.java:1866)
    at org.openmicroscopy.shoola.env.data.views.calls.PixelsDataLoader$2.doCall(PixelsDataLoader.java:100)
    at org.openmicroscopy.shoola.env.data.views.BatchCall.doStep(BatchCall.java:144)
    at org.openmicroscopy.shoola.util.concur.tasks.CompositeTask.doStep(CompositeTask.java:226)
    at org.openmicroscopy.shoola.env.data.views.CompositeBatchCall.doStep(CompositeBatchCall.java:126)
    at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.exec(ExecCommand.java:165)
    at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.run(ExecCommand.java:276)
    at org.openmicroscopy.shoola.util.concur.tasks.AsyncProcessor$Runner.run(AsyncProcessor.java:91)
    at java.lang.Thread.run(Thread.java:695)
Exception in thread "Thread-42"

@pwalczysko
Copy link
Member

Problems here in Web. It does not seem to work at all on gretzky. No improvement against yesterday.

Workflow:

  • Have images imported and viewed yesterday, owner: user-4, group: Read-Only.
  • View these images as user-6 (=Admin) in web
  • user-6 is viewing these images for the first time, he sees settings of user-4 -> expected
  • still as user-6, change the rendering settings (to purple) and Save (all in Web)
  • the full viewer in Web is purple, but the thumb is not -> not expected
  • refresh the tree in Web, go back to the same image -> still not purple, but red = I am seeing owners settings, not mine (=user-6's = Admin's) settings -> not expected
  • go to insight as user-4, and check the image settings under Saved by - user-6's settings are present as expected, but the thumb in the Saved by is not purple as it should be -> partially as expected.
    • in Insight, click Apply (=Save) on the user-6's settings -> the menu gets updated then and is purple for user-6 as well (see 3rd screenshot)

screen shot 2014-05-15 at 14 54 40

screen shot 2014-05-15 at 14 58 03

screen shot 2014-05-15 at 14 58 46

@pwalczysko
Copy link
Member

I have repeated the Web problem #2365 (comment) with freshly imported images - no changes in behaviour, the bug persists.

@pwalczysko
Copy link
Member

When group owner is viewing the same images in Web, no problem there, works as expected.

@pwalczysko
Copy link
Member

In Summary: 2 Bugs

@pwalczysko
Copy link
Member

@jburel I wonder why the whole conversation here seems to suggest that the two lines should have been removed, but instead they are being added by your commit ?? Was it supposed to work today after the addition ?

@jburel
Copy link
Member

jburel commented May 15, 2014

@pwalczysko: I moved its location, which should have allowed to handle the case.
It might be something else. I will look at it.

@jburel
Copy link
Member

jburel commented May 16, 2014

@pwalczysko: found and fixed the problem but I have discovered another serious one.
If admin clicks reset when viewing another user's images, the owner's settings are deleted and the admin settings are reset.

Do not delete the owner settings but reset the
default for the currently used settings.
@jburel
Copy link
Member

jburel commented May 18, 2014

The reset issue was briefly discussed with @chris-allan on Friday afternoon.
The rendering settings are no longer deleted by the reset defaults method is invoked.
The other error was the same as the Thumbnail problem already discussed i.e. admin will always use the owner settings.

@pwalczysko
Copy link
Member

When trying to repeat #2365 (comment), I still get a freeze and Error (after clicking on Reset as user-4), followed by crash.

java.lang.Exception: Abnormal termination due to an uncaught exception.
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1995)
    at java.awt.Component.getLocationOnScreen(Component.java:1969)
    at javax.swing.JPopupMenu.show(JPopupMenu.java:887)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerUI.viewedBy(MetadataViewerUI.java:286)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerComponent.setViewedBy(MetadataViewerComponent.java:1088)
    at org.openmicroscopy.shoola.agents.metadata.RenderingSettingsLoader.handleResult(RenderingSettingsLoader.java:136)
    at org.openmicroscopy.shoola.env.data.events.DSCallAdapter.eventFired(DSCallAdapter.java:90)
    at org.openmicroscopy.shoola.env.data.views.BatchCallMonitor$1.run(BatchCallMonitor.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Abnormal termination due to an uncaught exception.
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1995)
    at java.awt.Component.getLocationOnScreen(Component.java:1969)
    at javax.swing.JPopupMenu.show(JPopupMenu.java:887)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerUI.viewedBy(MetadataViewerUI.java:286)
    at org.openmicroscopy.shoola.agents.metadata.view.MetadataViewerComponent.setViewedBy(MetadataViewerComponent.java:1088)
    at org.openmicroscopy.shoola.agents.metadata.RenderingSettingsLoader.handleResult(RenderingSettingsLoader.java:136)
    at org.openmicroscopy.shoola.env.data.events.DSCallAdapter.eventFired(DSCallAdapter.java:90)
    at org.openmicroscopy.shoola.env.data.views.BatchCallMonitor$1.run(BatchCallMonitor.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0"

    at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.showErrorDialog(UserNotifierImpl.java:191)
    at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.notifyError(UserNotifierImpl.java:291)
    at org.openmicroscopy.shoola.env.AbnormalExitHandler.doTermination(AbnormalExitHandler.java:147)
    at org.openmicroscopy.shoola.env.AbnormalExitHandler.terminate(AbnormalExitHandler.java:85)
    at org.openmicroscopy.shoola.env.AWTExceptionHanlder.handle(AWTExceptionHanlder.java:99)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.awt.EventDispatchThread.handleException(EventDispatchThread.java:412)
    at java.awt.EventDispatchThread.processException(EventDispatchThread.java:318)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:312)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

@jburel
Copy link
Member

jburel commented May 19, 2014

@pwalczysko: strange...

@pwalczysko
Copy link
Member

  • Login as user-4, import two images.
  • Go and change the rendering settings to Red.
  • Login to Web as user-6 = admin and view the same image.
  • Still as admin in web, change the Rnd to Pink and Save (not Apply & Save, just Save).
  • The Full Viewer updates, the Preview updates as well to Pink, but the Thumb does not (still Red). -> not as expected
  • Still in Web as admin, hit Reset -> image goes grey as expected
  • Go to Insight as user-4 and view the image. User-4 can see his own settings (Red), -> as expected
  • But under Saved by, the user-6's (=admins) settings are listed without a proper icon (should be grey, is black) -> not expected
  • Still as user-4 in Insight, choose user-6's settings and Save
  • the image goes grey, the thumbnail of the user-6 is now grey as expected

screen shot 2014-05-19 at 10 15 40

@sbesson
Copy link
Member

sbesson commented May 19, 2014

Merging for inclusion of the rendering setting work in 5.0.2-rc1. One blocker left to be addressed in an upcoming PR to be reviewed and merged between rc1 and rc2 /cc @jburel.

sbesson added a commit that referenced this pull request May 19, 2014
@sbesson sbesson merged commit 5b39a71 into ome:dev_5_0 May 19, 2014
@jburel
Copy link
Member

jburel commented May 22, 2014

--rebased-to #2539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants