Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #5662 (closed)

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

Bug: Ice.MarshalException on script execution (Win)

Reported by: jamoore Owned by: jamoore
Priority: critical Milestone: OMERO-Beta4.3
Component: Scripting Version: n.a.
Keywords: n.a. Cc: jburel, cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-06-02 (13)

Description (last modified by jmoore)

I didn't expect Make Movie to work on Windows, but certainly didn't expect a MarshalException (see below)

What appears to be happening is that the byte array stored in the DB has become corrupted, causing the method to throw. There is already a try/catch block which returns null to force re-creation, but it's unclear why the existing params began throwing exceptions in the middle of testing this morning, after upgrade perhaps because of the new files, etc..

See: http://www.zeroc.com/forums/help-center/5315-ice-marshalexception-problem-w-icestorm.html

Update

The bytea's aren't corrupted but rather are being returned in a different format starting with PostgreSQL 9.0. Issuing ALTER DATABASE your_database SET bytea_output = 'escape'; corrected the problem. See:

Change History (10)

comment:1 Changed 13 years ago by jmoore

  • Description modified (diff)
  • Summary changed from Bug: Ice.MarshalException on Make Movie to Bug: Ice.MarshalException on Make Movie (Win)
java.lang.Exception: java.lang.Exception: org.openmicroscopy.shoola.env.data.DSAccessException: Cannot access data. 
Cannot create a movie for image: 278
	at org.openmicroscopy.shoola.env.data.views.ProcessBatchCall.doStep(ProcessBatchCall.java:101)
	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:274)
	at org.openmicroscopy.shoola.util.concur.tasks.AsyncProcessor$Runner.run(AsyncProcessor.java:91)
	at java.lang.Thread.run(Thread.java:680)
Caused by: org.openmicroscopy.shoola.env.data.DSAccessException: Cannot access data. 
Cannot create a movie for image: 278
	at org.openmicroscopy.shoola.env.data.OMEROGateway.handleException(OMEROGateway.java:875)
	at org.openmicroscopy.shoola.env.data.OMEROGateway.createMovie(OMEROGateway.java:5752)
	at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.createMovie(OmeroImageServiceImpl.java:1313)
	at org.openmicroscopy.shoola.env.data.views.calls.MovieCreator$1.initialize(MovieCreator.java:79)
	at org.openmicroscopy.shoola.env.data.views.ProcessBatchCall.doStep(ProcessBatchCall.java:99)
	... 6 more
Caused by: org.openmicroscopy.shoola.env.data.ProcessException: Cannot run script with ID:52
	at org.openmicroscopy.shoola.env.data.OMEROGateway.runScript(OMEROGateway.java:514)
	at org.openmicroscopy.shoola.env.data.OMEROGateway.createMovie(OMEROGateway.java:5750)
	... 9 more
Caused by: omero.InternalException
    serverStackTrace = "Ice.MarshalException
                            reason = (null)
                        	at IceInternal.BasicStream.typeToClass(BasicStream.java:2403)
                        	at IceInternal.BasicStream.findClass(BasicStream.java:2320)
                        	at IceInternal.BasicStream.loadObjectFactory(BasicStream.java:2187)
                        	at IceInternal.BasicStream.readObject(BasicStream.java:1540)
                        	at Ice.InputStreamI.readObject(InputStreamI.java:179)
                        	at omero.grid.ParamsHelper.parse(ParamsHelper.java:193)
                        	at omero.grid.ParamsHelper.getParamsOrNull(ParamsHelper.java:103)
                        	at omero.grid.ParamsHelper.getOrCreateParams(ParamsHelper.java:92)
                        	at omero.grid.InteractiveProcessorI.params(InteractiveProcessorI.java:163)
                        	at omero.grid.InteractiveProcessorI.execute(InteractiveProcessorI.java:224)
                        	at ome.services.blitz.impl.ScriptI$1.call(ScriptI.java:124)
                        	at ome.services.blitz.impl.ScriptI$1.call(ScriptI.java:110)
                        	at ome.services.throttling.Callback2.run(Callback2.java:49)
                        	at ome.services.throttling.InThreadThrottlingStrategy.safeRunnableCall(InThreadThrottlingStrategy.java:80)
                        	at ome.services.blitz.impl.AbstractAmdServant.safeRunnableCall(AbstractAmdServant.java:155)
                        	at ome.services.blitz.impl.ScriptI.runScript_async(ScriptI.java:110)
                        	at omero.api._IScriptTie.runScript_async(_IScriptTie.java:127)
                        	at omero.api._IScriptDisp.___runScript(_IScriptDisp.java:394)
                        	at omero.api._IScriptDisp.__dispatch(_IScriptDisp.java:534)
                        	at IceInternal.Incoming.invoke(Incoming.java:159)
                        	at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
                        	at Ice.ConnectionI.message(ConnectionI.java:972)
                        	at IceInternal.ThreadPool.run(ThreadPool.java:577)
                        	at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
                        	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)
                        "
    serverExceptionClass = "Ice.MarshalException"
    message = ""
	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:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	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._IScriptDelM.runScript(_IScriptDelM.java:508)
	at omero.api.IScriptPrxHelper.runScript(IScriptPrxHelper.java:662)
	at omero.api.IScriptPrxHelper.runScript(IScriptPrxHelper.java:634)
	at org.openmicroscopy.shoola.env.data.OMEROGateway.runScript(OMEROGateway.java:511)
	... 10 more

	at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.showErrorDialog(UserNotifierImpl.java:183)
	at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.notifyError(UserNotifierImpl.java:272)
	at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.notifyError(UserNotifierImpl.java:242)
	at org.openmicroscopy.shoola.env.ui.ActivityComponent.showException(ActivityComponent.java:474)
	at org.openmicroscopy.shoola.env.ui.ActivityComponent.actionPerformed(ActivityComponent.java:927)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.Component.processMouseEvent(Component.java:6374)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6139)
	at java.awt.Container.processEvent(Container.java:2085)
	at java.awt.Component.dispatchEventImpl(Component.java:4736)
	at java.awt.Container.dispatchEventImpl(Container.java:2143)
	at java.awt.Component.dispatchEvent(Component.java:4566)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
	at java.awt.Container.dispatchEventImpl(Container.java:2129)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4566)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
	at java.awt.EventQueue.access$000(EventQueue.java:86)
	at java.awt.EventQueue$1.run(EventQueue.java:639)
	at java.awt.EventQueue$1.run(EventQueue.java:637)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
	at java.awt.EventQueue$2.run(EventQueue.java:653)
	at java.awt.EventQueue$2.run(EventQueue.java:651)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
	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)

comment:2 Changed 13 years ago by jmoore

  • Summary changed from Bug: Ice.MarshalException on Make Movie (Win) to Bug: Ice.MarshalException on script execution (Win)

Seems to be unrelated to Make Movie:

java.lang.Exception: java.lang.Exception: org.openmicroscopy.shoola.env.data.DSAccessException: Cannot access data. 
Cannot create a figure for the specified images.
	at org.openmicroscopy.shoola.env.data.views.ProcessBatchCall.doStep(ProcessBatchCall.java:101)
	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:274)
	at org.openmicroscopy.shoola.util.concur.tasks.AsyncProcessor$Runner.run(AsyncProcessor.java:91)
	at java.lang.Thread.run(Thread.java:680)
Caused by: org.openmicroscopy.shoola.env.data.DSAccessException: Cannot access data. 
Cannot create a figure for the specified images.
	at org.openmicroscopy.shoola.env.data.OMEROGateway.handleException(OMEROGateway.java:875)
	at org.openmicroscopy.shoola.env.data.OMEROGateway.createFigure(OMEROGateway.java:6108)
	at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.createFigure(OmeroImageServiceImpl.java:1370)
	at org.openmicroscopy.shoola.env.data.views.calls.FigureCreator$1.initialize(FigureCreator.java:78)
	at org.openmicroscopy.shoola.env.data.views.ProcessBatchCall.doStep(ProcessBatchCall.java:99)
	... 6 more
Caused by: org.openmicroscopy.shoola.env.data.ProcessException: Cannot run script with ID:53
	at org.openmicroscopy.shoola.env.data.OMEROGateway.runScript(OMEROGateway.java:514)
	at org.openmicroscopy.shoola.env.data.OMEROGateway.createFigure(OMEROGateway.java:6029)
	... 9 more
Caused by: omero.InternalException
    serverStackTrace = "Ice.MarshalException
                            reason = (null)
                        	at IceInternal.BasicStream.typeToClass(BasicStream.java:2403)
                        	at IceInternal.BasicStream.findClass(BasicStream.java:2320)
                        	at IceInternal.BasicStream.loadObjectFactory(BasicStream.java:2187)
                        	at IceInternal.BasicStream.readObject(BasicStream.java:1540)
                        	at Ice.InputStreamI.readObject(InputStreamI.java:179)
                        	at omero.grid.ParamsHelper.parse(ParamsHelper.java:193)
                        	at omero.grid.ParamsHelper.getParamsOrNull(ParamsHelper.java:103)
                        	at omero.grid.ParamsHelper.getOrCreateParams(ParamsHelper.java:92)
                        	at omero.grid.InteractiveProcessorI.params(InteractiveProcessorI.java:163)
                        	at omero.grid.InteractiveProcessorI.execute(InteractiveProcessorI.java:224)
                        	at ome.services.blitz.impl.ScriptI$1.call(ScriptI.java:124)
                        	at ome.services.blitz.impl.ScriptI$1.call(ScriptI.java:110)
                        	at ome.services.throttling.Callback2.run(Callback2.java:49)
                        	at ome.services.throttling.InThreadThrottlingStrategy.safeRunnableCall(InThreadThrottlingStrategy.java:80)
                        	at ome.services.blitz.impl.AbstractAmdServant.safeRunnableCall(AbstractAmdServant.java:155)
                        	at ome.services.blitz.impl.ScriptI.runScript_async(ScriptI.java:110)
                        	at omero.api._IScriptTie.runScript_async(_IScriptTie.java:127)
                        	at omero.api._IScriptDisp.___runScript(_IScriptDisp.java:394)
                        	at omero.api._IScriptDisp.__dispatch(_IScriptDisp.java:534)
                        	at IceInternal.Incoming.invoke(Incoming.java:159)
                        	at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
                        	at Ice.ConnectionI.message(ConnectionI.java:972)
                        	at IceInternal.ThreadPool.run(ThreadPool.java:577)
                        	at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
                        	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)
                        "
    serverExceptionClass = "Ice.MarshalException"
    message = ""
	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:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	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._IScriptDelM.runScript(_IScriptDelM.java:508)
	at omero.api.IScriptPrxHelper.runScript(IScriptPrxHelper.java:662)
	at omero.api.IScriptPrxHelper.runScript(IScriptPrxHelper.java:634)
	at org.openmicroscopy.shoola.env.data.OMEROGateway.runScript(OMEROGateway.java:511)
	... 10 more

	at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.showErrorDialog(UserNotifierImpl.java:183)
	at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.notifyError(UserNotifierImpl.java:272)
	at org.openmicroscopy.shoola.env.ui.UserNotifierImpl.notifyError(UserNotifierImpl.java:242)
	at org.openmicroscopy.shoola.env.ui.ActivityComponent.showException(ActivityComponent.java:474)
	at org.openmicroscopy.shoola.env.ui.ActivityComponent.actionPerformed(ActivityComponent.java:927)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
	at java.awt.Component.processMouseEvent(Component.java:6374)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6139)
	at java.awt.Container.processEvent(Container.java:2085)
	at java.awt.Component.dispatchEventImpl(Component.java:4736)
	at java.awt.Container.dispatchEventImpl(Container.java:2143)
	at java.awt.Component.dispatchEvent(Component.java:4566)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
	at java.awt.Container.dispatchEventImpl(Container.java:2129)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4566)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
	at java.awt.EventQueue.access$000(EventQueue.java:86)
	at java.awt.EventQueue$1.run(EventQueue.java:639)
	at java.awt.EventQueue$1.run(EventQueue.java:637)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
	at java.awt.EventQueue$2.run(EventQueue.java:653)
	at java.awt.EventQueue$2.run(EventQueue.java:651)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
	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)

comment:3 Changed 13 years ago by jmoore

  • Owner set to jmoore
  • Remaining Time set to 0.25
  • Sprint set to 2011-06-02 (13)
  • Status changed from new to accepted

comment:4 Changed 13 years ago by jmoore

  • Description modified (diff)

comment:5 Changed 13 years ago by jmoore

Failing

 2  | \omero\analysis_scripts\FLIM.py             
 51 | \omero\export_scripts\Batch_Image_Export.py 
 52 | \omero\export_scripts\Make_Movie.py         
 5  | \omero\figure_scripts\Movie_Figure.py       
 6  | \omero\figure_scripts\Movie_ROI_Figure.py   
 7  | \omero\figure_scripts\ROI_Split_Figure.py   
 8  | \omero\figure_scripts\Split_View_Figure.py  
 53 | \omero\figure_scripts\Thumbnail_Figure.py   
 12 | \omero\util_scripts\Channel_Offsets.py      
 13 | \omero\util_scripts\Combine_Images.py       

Passing

 10 | \omero\import_scripts\Populate_ROI.py       
 11 | \omero\setup_scripts\FLIM_initialise.py     
 14 | \omero\util_scripts\Images_From_ROIs.py  

comment:6 Changed 13 years ago by jmoore

#  Find the links which link the params to the ParseJob

~/git/dist $ bin/omero hql "select l.id from Job j join j.originalFileLinks l where l.child.id = 12"

 # | Col1 
---+------
 0 | 201  
 1 | 203  
(2 rows)


# Delete them to force a new parsing

~/git/dist $ bin/omero shell --login

In [2]: u = client.sf.getUpdateService()

In [4]: u.deleteObject(omero.model.JobOriginalFileLinkI(201, False))

In [5]: u.deleteObject(omero.model.JobOriginalFileLinkI(203, False))


# Get the params. Success!

~/git/dist $ bin/omero script params 12

id:  12
name:  Channel_Offsets.py
version:  4.2.0
authors:  William Moore, OME Team
institutions:  University of Dundee
...


# Try to launch. Failure!

~/git/dist $ bin/omero script launch 12
...
omero.InternalException: exception ::omero::InternalException
{
    serverStackTrace = Ice.MarshalException
...

# Try to get the params. Also failure!!!
~/git/dist $ bin/omero script params 12
...
omero.InternalException: exception ::omero::InternalException
{
    serverStackTrace = Ice.MarshalException

comment:7 Changed 13 years ago by jmoore

In script form. The assertion at the bottom passes, i.e. the two byte arrays are the same:


script_id = 12

import Ice
from omero.rtypes import unwrap

u = client.sf.getUpdateService()
q = client.sf.getQueryService()
s = client.sf.getScriptService()
for result in unwrap(q.projection("select l.id from ParseJob j join j.originalFileLinks l where l.child.id = %s" % script_id, None)):
    id = result[0]
    print "Deleting %s..." % id
    u.deleteObject(omero.model.JobOriginalFileLinkI(id, False))

def params(id):
    rv = q.findByQuery("select j from ParseJob j join j.originalFileLinks l where l.child.id = %s" % id, None)
    if rv is not None:
        return rv
    else:
        print "No data"

def launch(id):
    inputs = {}
    proc = None
    try:
        proc = s.runScript(id, inputs, None)
    except omero.InternalException, ie:
        print "Got marshal exception"

    if proc:
        try:
            cb = omero.scripts.ProcessCallbackI(client, proc)
            while not cb.block(1000): # ms.
                pass
            cb.close()
            rv = proc.getResults(0)
        finally:
            proc.close(False)

        print "Results:", rv

s.getParams(script_id) # Create new
a = params(script_id)      # Print out the newly created
b = launch(script_id)      # Something happens here ?!?!?!
c = params(script_id)      # Print out the value after the marshal exception

assert a.params == c.params
print "Identical"

comment:8 Changed 13 years ago by jmoore

  • Description modified (diff)

comment:9 Changed 13 years ago by jmoore

  • Cc cxallan added
  • Description modified (diff)
  • Priority changed from minor to critical
  • Remaining Time changed from 0.25 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

comment:10 Changed 13 years ago by jmoore <josh@…>

(In [daf776cc460ec1c0aae15c7d29fc2955f96e626a/ome.git] on branch develop) Catching MarshalException in ParamsHelper (See #5662)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.71170 sec.)

We're Hiring!