Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Error: Object is currently in use elsewhere (Read 2999 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Error: Object is currently in use elsewhere
Mar 22nd, 2013 at 3:02pm
Print Post  
Hi,

This exception has popped up today and appears to be happening when several of my colleagues are doing attempting to perform the same operation on the same page at the same time.

The error information is provided below.

The line of code at line 306 is:  pdf.Export(diagram, fullfilename);

We are hoping to launch this newly updated application this weekend, so this is a rather serious issue.

Thanks in advance for any advice.

Jim

The error:

Error at Export2PDF in ITO_VE_Process_MindMap Object is currently in use elsewhere. System.InvalidOperationException: Object is currently in use elsewhere. at MindFusion.Pdf.PdfPath.x7352b4255a638e05() at MindFusion.Pdf.PdfPath..ctor(GraphicsPath path, Brush brush, PdfPage page, Boolean CreatedDirectly) at MindFusion.Pdf.PdfPage.AddObject(GraphicsPath path, Brush brush) at MindFusion.Pdf.PdfGraphics.FillRectangle(Brush brush, RectangleF rect) at MindFusion.Diagramming.InternalUtils.DrawExpandButton(IGraphics graphics, Boolean expanded, RectangleF bounds, GraphicsUnit measureUnit, Brush shadowBrush) at A.cc7bd09ac0bf30a0b18a275b09e9d36c7.Draw(IGraphics graphics) at MindFusion.Diagramming.DiagramItem.DrawManipulators(IGraphics graphics, Boolean clip) at MindFusion.Diagramming.ShapeNode.Draw(IGraphics graphics, RenderOptions options) at MindFusion.Diagramming.Diagram.c36c1fca3b267b5451f759c0295c2805a(IGraphics c6c92d7b0a001e45905428290158c2b17, DiagramItem ca6e827fc07fcc9e1bcb0b1fce21834e2, Boolean c1e4be7b4a08ee92d4d8160fe7cdf183b) at MindFusion.Diagramming.Diagram.c85c9fb5f1477600f0b8e47a76b97a8a7(IGraphics c6c92d7b0a001e45905428290158c2b17, RectangleF cba5fe945e4bbdbc1273efda679d7f4fe, Boolean c4f62962e65ed617349113106456b7633) at MindFusion.Diagramming.Diagram.Draw(IGraphics graphics, RenderOptions options, RectangleF clipRect, Boolean noModifiedItems) at MindFusion.Diagramming.Export.PdfExporter.Export(Diagram diagram, String filePath) at ITO_VE_Process_MindMap.ExportMindMap(RadButton buttonClicked) in d:\WebSites\NavviaNewDevTest\ITO_VE_Process_MindMap.aspx.cs:line 306
  
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: Error: Object is currently in use elsewhere
Reply #1 - Mar 22nd, 2013 at 3:56pm
Print Post  
After doing some research, it looks like I may need to use "lock".
I tried the following, but without success:

lock (diagram)
            {
                pdf.Export(diagram, fullfilename);
            }

I have never used lock before.  Do I need to widen the scope of the lock block, or do I need to be locking something other than the diagram?

Thanks

Jim
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Error: Object is currently in use elsewhere
Reply #2 - Mar 22nd, 2013 at 4:10pm
Print Post  
Hi,

It's past our developers working time here and I'm afraid we can't help you much for your weekend launch. Our developer will investigate this next week. For the time being I suppose you could queue the export operations when for the same diagram and poll from the client to transfer the PDF when it's ready. Or simply lock on some shared object for the clients to wait each other's exports if the diagrams are small. (I have just seen your post above - try locking on typeof(Diagram))

Stoyan
« Last Edit: Mar 22nd, 2013 at 5:28pm by Stoyo »  
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: Error: Object is currently in use elsewhere
Reply #3 - Mar 22nd, 2013 at 5:32pm
Print Post  
Stoyan,

I just tried lock (typeof(Diagram)) and it worked!!!!
Thank you very much.
Enjoy your weekend.

Jim
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint