This is a migrated thread and some comments may be shown as answers.

Win32Exception in the chart

3 Answers 259 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 21 Feb 2012, 11:21 AM
Hello!

Sometimes we get following exception while creating chart:

System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at MS.Win32.UnsafeNativeMethods.RegisterClassEx(WNDCLASSEX_D wc_d)
   at MS.Win32.HwndWrapper..ctor(Int32 classStyle, Int32 style, Int32 exStyle, Int32 x, Int32 y, Int32 width, Int32 height, String name, IntPtr parent, HwndWrapperHook[] hooks)
   at System.Windows.Threading.Dispatcher..ctor()
   at System.Windows.Threading.Dispatcher.get_CurrentDispatcher()
   at System.Windows.Media.Visual..ctor(ResourceType resourceType)
   at System.Windows.FrameworkElement..ctor()
   at System.Windows.Controls.Control..ctor()
   at System.Windows.Controls.ContentControl..ctor()
   at Telerik.Windows.Controls.RadChart..ctor() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Charting\Chart\RadChart.cs:line 252

Telrik doesn't install on the machine. We use dll from library. What does this path ment?

If you need more information - please, tell what is it - I try to get it for you.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 23 Feb 2012, 08:38 AM
Hello Alex,

We haven't been able to reproduce such an exception in our local test, so it would be very helpful if you're able to elaborate a bit more on your specific scenario. Does this happen only when creating RadChart or it does when using other controls as well?

Could, you, please, open a support ticket and send us a sample application that we could test locally and also specify the assemblies version. It would help us tackle the issue.

All the best,
Nikolay
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Anatoly Chekh
Top achievements
Rank 1
answered on 22 Mar 2012, 11:22 AM
Hello!

First, we use Windows Server 2008.
Second we use Threads:

AutoResetEvent autoResetEvent = new AutoResetEvent(false);
Thread pngCreationThread = new Thread(delegate()
{
    try
    {
         RadChart chart = new RadChart();
    }
    catch(Exception ex) { }
    finally { autoResetEvent.Set(); }
}
 
pngCreationThread.IsBackground = true;
pngCreationThread.SetApartmentState(ApartmentState.STA);
pngCreationThread.Start();
pngCreationThread.Join();
autoResetEvent.WaitOne();

The main question is why you try to get any file from "c:\TB\117\WPF_Scrum\Release_WPF" - we dont have this directory at all.

Thanks, Anatoly.
0
Giuseppe
Telerik team
answered on 26 Mar 2012, 11:37 AM
Hello Alex,

We were only able to observe an exception when we switched the ApartmentState from STA to MTA -- could you confirm that this is the behavior you observed as well?

As for the actual exception message -- it seems you have copied the Telerik.Windows.Controls.Charting.pdb file alongside Telerik.Windows.Controls.Charting.dll and that is why you are seeing this kind of verbose debug information (it is embedded as debug information in the pdb, it does not actually look for any files installed on your system). We would suggest you to remove any *.pdb files from your production environment as they are useful only for debug purposes.


All the best,
Giuseppe
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Chart
Asked by
Alex
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Anatoly Chekh
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or