What would cause ChartSpace.GetPicture to hang?

C

Corey Alix

I have an application which generates many charts and uses GetPicture on
those charts to create a PNG file. It works fine for 20 or 30 charts, but
then decides do hang on the line below.

Dim lvPicture As Byte() = DirectCast(Me.AxChartSpace.GetPicture("png",
Me.Width, Me.Height), Byte())

The CPU hits about 25% utilization, but the GetPicture method never returns.
I haven't been able to find any references on the web to anyone else having
this problem.

When I view this chart from a GUI application, the GetPicture method works
fine, so I'm lacking direction on how to proceed.
 
A

Alvin Bruney [ASP.NET MVP]

Where is the application running from? Server/Client/Windows application?

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
C

coreyalix

I'm glad to see you're still diligently serving OWC users. We'd be lost
without you.

It is running as a client application (Windows). The only thing unusual
about the application is that it is run minimized and there is no user
interaction. The app opens an OWC spreadsheet which uses custom functions,
one of which creates a chart and assigns data to it. Once that step
completes I save the chart image as a PNG file to the filesystem. This
process works for many charts, but it eventually decides to lock-up. It
looks like deadlock to me, but I can't guess where it's coming from or how
to break the problem down. I've tried running the app maximized so I can
watch the process, but it still locks up.


Alvin Bruney said:
Where is the application running from? Server/Client/Windows application?

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99


Corey Alix said:
I have an application which generates many charts and uses GetPicture on
those charts to create a PNG file. It works fine for 20 or 30 charts,
but then decides do hang on the line below.

Dim lvPicture As Byte() = DirectCast(Me.AxChartSpace.GetPicture("png",
Me.Width, Me.Height), Byte())

The CPU hits about 25% utilization, but the GetPicture method never
returns. I haven't been able to find any references on the web to anyone
else having this problem.

When I view this chart from a GUI application, the GetPicture method
works fine, so I'm lacking direction on how to proceed.
 
C

Corey Alix

This is a Windows application. Are you aware of conditions which may cause
this method to never return?


Alvin Bruney said:
Where is the application running from? Server/Client/Windows application?

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99


Corey Alix said:
I have an application which generates many charts and uses GetPicture on
those charts to create a PNG file. It works fine for 20 or 30 charts,
but then decides do hang on the line below.

Dim lvPicture As Byte() = DirectCast(Me.AxChartSpace.GetPicture("png",
Me.Width, Me.Height), Byte())

The CPU hits about 25% utilization, but the GetPicture method never
returns. I haven't been able to find any references on the web to anyone
else having this problem.

When I view this chart from a GUI application, the GetPicture method
works fine, so I'm lacking direction on how to proceed.
 
A

Alvin Bruney [ASP.NET MVP]

Conditions? No, poorly constructed code, race conditions yup.

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99


Corey Alix said:
This is a Windows application. Are you aware of conditions which may
cause this method to never return?


Alvin Bruney said:
Where is the application running from? Server/Client/Windows application?

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99


Corey Alix said:
I have an application which generates many charts and uses GetPicture on
those charts to create a PNG file. It works fine for 20 or 30 charts,
but then decides do hang on the line below.

Dim lvPicture As Byte() = DirectCast(Me.AxChartSpace.GetPicture("png",
Me.Width, Me.Height), Byte())

The CPU hits about 25% utilization, but the GetPicture method never
returns. I haven't been able to find any references on the web to anyone
else having this problem.

When I view this chart from a GUI application, the GetPicture method
works fine, so I'm lacking direction on how to proceed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top