View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Unger Dave Unger is offline
external usenet poster
 
Posts: 153
Default LoadPicture() error XL2007

Hi Martin,

Thanks for your reply. Your idea about "race conditions" makes a lot
of sense, and I suspect this is at the root of the problem. Strangly
enough though, once it's failed while running normally, I can't step
thru it with the debugger either. Maybe something gets "broken"
because of the "race" during the normal run. I'll certainly give your
suggestions a try.

Luckily, the client is running XL2003, which so far hasn't run into
any problem with this application, but it does make me a bit nervous.

Thanks for sharing your insights on this.

regards,

Dave


On Apr 27, 6:55*am, Martin Brown
wrote:

I have not seen that particular one, but I have seen plenty like it.
XL2007 graphics is a crock of ****. There are race conditions deep in
the graphics code that allow objects to be manipulated before they have
been fully instantiated. It seems to be worse on quad CPU kit.

You could try adding a short delay before the failing line or a DoEvents
to allow the system to catch up. I suspect that one of the reasons that
charts in XL2007 are so glacially slow is to avoid it tripping up over
race conditions when run on fast multiCPU boxes.

Another indicator of a race condition is that it will always work OK if
you step line by line in the debugger but fails sometimes at full speed.

Regards,
Martin Brown- Hide quoted text -

- Show quoted text -