MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

occasional problems with exporting to GIF, Unable to communicate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113762] occasional problems with exporting to GIF, Unable to communicate
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Thu, 11 Nov 2010 06:09:29 -0500 (EST)
  • Reply-to: nma at 12000.org

I have a program which does Export["foo_nn.gif",p]
where p is a graphics object. (plot).

I run it in a loop, where I export updated plots
so I can make animations of all the resulting GIF
file later(I add counter to the file name).

Sometimes, the loop hangs in the middle, sometimes it
completes with no problem. I think the problem seems
to be in the Export[], but I am not sure. When the
loop hangs, it hangs around the same place, after 23
or so exports.

3 times so far, I've seen this error come up:

---------------------------------
LinkObject::linkd: Unable to communicate with closed link

LinkObject["C:\Program Files\Wolfram Research\Mathema\[Ellipsis] Converters\Binaries\Windows-x86-64\GIF.exe",22,8]}. >>
---------------------------------------------

And when the above happens, Mathematica hangs.

But most of the other times, Mathematica just hangs
during the loop without this error showing on the
screen.

I'll try to isolate the error more.

I know it happens when I am display the plot to the
screen at as well as do export of the plot during the
loop.

I display the plot like this:

Print@Dynamic[
   Refresh[Graphics[p,ImageMargins->0,
   Frame->True,
   ImagePadding->1,
   PlotRangeClipping->False,
   PlotRange->1],
   UpdateInterval->$TimeUnit/1000,
   TrackedSymbols->{p}],
   SynchronousUpdating->True
];

I have the above statement OUTSIDE the loop, and
then I update 'p' inside the loop, then do Export
to gif file of the 'p'. This way, I can see the plot
being updated on the screen, in the notebook, and
also being exported at the same time.

When I only do Export, (i.e. remove the above),
then things works much much better, not as many
hangs at all, but sometimes, like this case, I
do get the above error, but that is rare this happens.

Only when the above Dynamic update code is present,
do I see many hangs with the export. (remove the
Export, leave the Dynamics update, no problem at all).

So it is something to do with the Export and the
above Graphics code which seems to be causing a problem.

I was wondering if others had problems with export to GIF?
The plots I am exporting are not too large, about 80 KB each.

I am using Mathematica 7.0, on windows 7, 64 bit OS.

I'll try to make a small test case to show this problem.
But so far, not able to reproduce it in small scale.
There is something else going on somewhere.

thanks
--Nasser



  • Prev by Date: Re: Find max of a Find root function
  • Next by Date: Re: command to save as .m file
  • Previous by thread: Re: shooting method, boundary value problem
  • Next by thread: Tensor Contraction