Jump to content
Software FX Community

Scrolling on the AxisX after SetScrollView gives an unhandled exception


shodan
 Share

Recommended Posts

Hi, I'm Marco from Italy

    I've been using ChartFX since 2006 and I worked with it very much and proved to be an amazing product. By the way, while using an application I made using ChartFX, an exception occurred and I'm trying hard to figure out how to resolve it.

    To zoom in the data, I use the function SetScrollView. It all worked fine until some days ago when, examining the data of an XML, ChartFX thrown an exception. It happened this way: after zooming three times on the data (the amount of zoom levels may vary depending on the data), the scrollbar appeared as usual. But when I scrolled all to the right, the scrollbar disappeared, ChartFX freezed for some seconds and I got this exception. No matter what I do, I can't handle it because is generated by ChartFX itself.

    Here's the copy of the exception as VS2005 shows

 System.NullReferenceException was unhandled  Message="Object reference not set to an instance of an object."  Source="ChartFX.WinForms"  StackTrace: at ChartFX.WinForms.Axis.d(Int32 A_0, Int32 A_1) at ChartFX.WinForms.ag.f(MouseEventArgs A_0) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at ZoomTest.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 

I would really appreciate any help.

Thanks in advance

 Marco

Link to comment
Share on other sites

Are you using the latest Service Pack (please check our support site)?


 

Not when the issue occured. Then I updated ChartFX and the exception was thrown anyway.

If the problem is happening with the latest service pack please
provide a sample program that reproduces the problem along with
specific instructions on how to make the problem evident.


Sure. Attached to this post you'll find the solution that reproduces the issue.

Once the program is started, click on "Open DT" then wait for Zoom buttons to be enabled. Click three times on "Zoom +" then move the scrollbar of the chart to the right. You'll notice the scrollbar will disappear and then the exception will be thrown.

I noticed that the exception won't show after some clicks of "Zoom +". I noticed an odd thing while debugging the code: the program calls SetScrollView to make a zoom of the data. After calling SetScrollView, the program calls GetScrollView and the Chart returns the min and max values that I set. The second time I click on Zoom, I call GetScrollView and the values returned aren't those I set with SetScrollView.

Some time ago I had a similar issue with the function Zoom of AxisX. After that, I decided to use SetScrollView.

Yesterday I checked if the two exception I had were the same and they do were the same. So I decided to use Zoom instead of SetScrollView and the program didn't throw any exception at all. Anyway I can't foresee when will be better to use Zoom instead of SetScrollView.

Thanks for any help you will provide.

Cheers

-Marco-

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...