Home - Forums-.NET - FlyTreeView (ASP.NET) - Update to 4.3 breaks my application

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Update to 4.3 breaks my application
Link Posted: 29-Aug-2007 09:06
Hi,

I noticed yesterday that my error log was filled with lots of file not found errors. I tracked this down to the flytreeview which looked like was making spurious requests to the server. I was using 4.2.1.50. Yesterday I updated to 4.3.1.22 and this fixed the problem. No more errors in the log.

Today I realized that the update has broken a part of my app. I have tested this by reverting back to the old version and my code works. Go back to 4.3.1.22 and it no longer works.

Basically what is failing is that when a user right clicks on a node, I execute a bunch of code and one of the things I do, is set a panel to be visible. Under 4.2.1.50 the panel becomes visible. Under 4.3.1.22, the panel is not visible.

Are there conflicts with updating visual components in this scenario? Are there problems with ViewState related stuff? This app is storing its ViewState on the server in the session as opposed to in the webform. Could that be the source of the problem. What has changed between the two versions? What is the best way to work around this?

Below are the 2 stacktraces, one under 4.2 and one under 4.3. Maybe that will shed some light....

Thanks for your help,
Rich
Link Posted: 29-Aug-2007 09:46
Here they are:



4.2.1.50

NineRays.WebControls.FlyTreeView.DLL!NineRays.WebControls.FlyContextMenu.OnCommand(NineRays.WebControls.FlyContextMenuCommandEventArgs e =

{NineRays.WebControls.FlyContextMenuCommandEventArgs}) + 0x2b bytes  
  NineRays.WebControls.FlyTreeView.DLL!NineRays.WebControls.FlyContextMenu.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(string eventArgument =

\"[\\\"n2vyqwcjfa1\\\",\\\"n2wnnbunqnu\\\"]\") + 0xc3 bytes  
  System.Web.dll!System.Web.UI.Page.RaisePostBackEvent(System.Web.UI.IPostBackEventHandler sourceControl, string eventArgument) + 0xc bytes  
  System.Web.dll!System.Web.UI.Page.RaisePostBackEvent(System.Collections.Specialized.NameValueCollection postData) + 0xaf bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequestMain(bool includeStagesBeforeAsyncPoint = true, bool includeStagesAfterAsyncPoint = true) + 0x13ef bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint = true) + 0x67 bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequest() + 0x57 bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext context) + 0x13 bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context) + 0x32 bytes  
  App_Web_-a5augif.dll!ASP.centralintakemaintabbed_aspx.ProcessRequest(System.Web.HttpContext context = {System.Web.HttpContext}) + 0x2f bytes  C#
  System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0x130 bytes  
  System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step = {System.Web.HttpApplication.CallHandlerExecutionStep}, ref

bool completedSynchronously = true) + 0x41 bytes  
  System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) + 0x188 bytes  
  System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object

extraData) + 0x8d bytes  
  System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr = {Microsoft.VisualStudio.WebHost.Request}) + 0x1ab bytes  
  System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) + 0x62 bytes  
  System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) + 0x38 bytes  
  WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Request.Process() + 0x113 bytes  
  WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Microsoft.VisualStudio.WebHost.Connection conn =

{System.Runtime.Remoting.Proxies.__TransparentProxy}) + 0x5c bytes  
  [Appdomain Transition]  
  WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0x86 bytes  
  mscorlib.dll!System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(object state) + 0x2f bytes  
  mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x43 bytes  
  [Native to Managed Transition]  
  [Managed to Native Transition]  
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object

state) + 0xa7 bytes  
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) +

0x92 bytes  
  mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(object state) + 0x6c bytes
Link Posted: 29-Aug-2007 09:48
4.3.1.22

NineRays.WebControls.FlyTreeView.DLL!NineRays.WebControls.FlyContextMenu.OnCommand(NineRays.WebControls.FlyContextMenuCommandEventArgs e = {NineRays.WebControls.FlyContextMenuCommandEventArgs}) + 0x2b bytes  
  NineRays.WebControls.FlyTreeView.DLL!NineRays.WebControls.FlyContextMenu.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(string eventArgument = \"[\\\"n1yeir5v\\\",\\\"n1zqzck9\\\"]\") + 0xc3 bytes  
  System.Web.dll!System.Web.UI.Page.RaisePostBackEvent(System.Web.UI.IPostBackEventHandler sourceControl, string eventArgument) + 0xc bytes  
  System.Web.dll!System.Web.UI.Page.RaisePostBackEvent(System.Collections.Specialized.NameValueCollection postData) + 0xaf bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequestMain(bool includeStagesBeforeAsyncPoint = true, bool includeStagesAfterAsyncPoint = true) + 0x13ef bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint = true) + 0x67 bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequest() + 0x57 bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext context) + 0x13 bytes  
  System.Web.dll!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context) + 0x32 bytes  
  App_Web_lxva7mdc.dll!ASP.centralintakemaintabbed_aspx.ProcessRequest(System.Web.HttpContext context = {System.Web.HttpContext}) + 0x2f bytes  C#
  System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0x130 bytes  
  System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step = {System.Web.HttpApplication.CallHandlerExecutionStep}, ref bool completedSynchronously = true) + 0x41 bytes  
  System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) + 0x188 bytes  
  System.Web.dll!System.Web.HttpApplication.ResumeStepsFromThreadPoolThread(System.Exception error) + 0x2e bytes  
  System.Web.dll!System.Web.HttpApplication.AsyncEventExecutionStep.ResumeStepsWithAssert(System.Exception error) + 0x28 bytes  
  System.Web.dll!System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(System.IAsyncResult ar) + 0xa0 bytes  
  System.Web.dll!System.Web.HttpAsyncResult.Complete(bool synchronous, object result, System.Exception error, System.Web.RequestNotificationStatus status) + 0x3d bytes  
  System.Web.dll!System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(object state) + 0x122 bytes  
  mscorlib.dll!System.Threading._TimerCallback.TimerCallback_Context(object state) + 0x1a bytes  
  mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x43 bytes  
  [Native to Managed Transition]  
  [Managed to Native Transition]  
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0xa7 bytes  
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x92 bytes  
  mscorlib.dll!System.Threading._TimerCallback.PerformTimerCallback(object state) + 0x5b bytes  
  [Appdomain Transition]
Link Posted: 29-Aug-2007 22:44
Rich,

I created a test case that makes some Panel visible/invisible after clicking a certain context menu item.

What I have is a simple code:

    
        
    


    
        
        
    


    Panel


And code-behind:
protected void myMenu_Command(object sender, NineRays.WebControls.FlyContextMenuCommandEventArgs e)
{
    panel.Visible = !panel.Visible;
}


It work ok here.
If possible, could you please modify this code, or create a simple test case, that we can use to debug the problem.

Thanks in advance.
Link Posted: 30-Aug-2007 11:20
Hi EvgenyT,

It might not be possible for me to come up with an isolated example. I did do the following though and hope it may give you some information.

The object in question is an ascx/UserControl. In my class I overrode the Visible property get/set so that I could put a break point at the time the get is called. The first time the get breakpoint is hit when executing the code in question differs between 4.3 and 4.2. Again all I do is replace the dlls in my project. No other code changes are done.

It may be worth noting that when debugging this code using 4.3 or 4.2, when I inspect the Visible property right after my call to set it to true, the debugger says it is false. I do not why this is, but it is consistent in both versions. But in 4.2, when the get  is called by the internal .NET code, Visible is returning true at that point.


I will put my stacktraces in a different post and the char. limit on posts is too short...

Rich
Link Posted: 30-Aug-2007 11:22
In 4.2 my code works and this.Visible returns true.

  >  App_Web_no7ec4lo.dll!MSC.CentralIntake.ProcessControls.Process.Visible.get() Line 500  C#
     System.Web.dll!System.Web.UI.Control.PreRenderRecursiveInternal() + 0x10 bytes  
     System.Web.dll!System.Web.UI.Control.PreRenderRecursiveInternal() + 0xa2 bytes  
     System.Web.dll!System.Web.UI.Control.PreRenderRecursiveInternal() + 0xa2 bytes  
     System.Web.dll!System.Web.UI.Control.PreRenderRecursiveInternal() + 0xa2 bytes  
     System.Web.dll!System.Web.UI.Control.PreRenderRecursiveInternal() + 0xa2 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequestMain(bool includeStagesBeforeAsyncPoint = true, bool includeStagesAfterAsyncPoint = true) + 0x551 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint = true) + 0x67 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequest() + 0x57 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext context) + 0x13 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context) + 0x32 bytes  
     App_Web_txt9immi.dll!ASP.centralintakemaintabbed_aspx.ProcessRequest(System.Web.HttpContext context = {System.Web.HttpContext}) + 0x2f bytes  C#
     System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0x130 bytes  
     System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step = {System.Web.HttpApplication.CallHandlerExecutionStep}, ref bool completedSynchronously = true) + 0x41 bytes  
     System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) + 0x188 bytes  
     System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) + 0x8d bytes  
     System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr = {Microsoft.VisualStudio.WebHost.Request}) + 0x1ab bytes  
     System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) + 0x62 bytes  
     System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) + 0x38 bytes  
     WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Request.Process() + 0x113 bytes  
     WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Microsoft.VisualStudio.WebHost.Connection conn = {System.Runtime.Remoting.Proxies.__TransparentProxy}) + 0x5c bytes  
     [Appdomain Transition]  
     WebDev.WebHost.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0x86 bytes  
     mscorlib.dll!System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(object state) + 0x2f bytes  
     mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x43 bytes  
     [Native to Managed Transition]  
     [Managed to Native Transition]  
     mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0xa7 bytes  
     mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x92 bytes  
     mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(object state) + 0x6c bytes
Link Posted: 30-Aug-2007 11:24
In this case, this.Visible returns false. Again this is the first time my breakpoint is hit in 4.3. This differs from the stacktrace I see when my breakpoint is hit for the first time in 4.2. Specifically, Page.SaveAllState() is being called...I don't know why/how or even if this makes and difference. But this is an obvious deviation from the stacktrace in 4.2

>  App_Web_pjw7vvw5.dll!MSC.CentralIntake.ProcessControls.Process.Visible.get() Line 500  C#
     System.Web.dll!System.Web.UI.Control.Visible.get() + 0x32 bytes  
     System.Web.dll!System.Web.UI.Control.Visible.get() + 0x32 bytes  
     System.Web.dll!System.Web.UI.Control.Visible.get() + 0x32 bytes  
     System.Web.dll!System.Web.UI.Control.Visible.get() + 0x32 bytes  
     System.Web.dll!System.Web.UI.Control.Visible.get() + 0x32 bytes  
     System.Web.dll!System.Web.UI.Control.Visible.get() + 0x32 bytes  
     System.Web.dll!System.Web.UI.Control.Visible.get() + 0x32 bytes  
     System.Web.dll!System.Web.UI.Control.Visible.get() + 0x32 bytes  
     System.Web.dll!System.Web.UI.WebControls.ListControl.SaveSelectedIndicesViewState.get() + 0xa4 bytes  
     System.Web.dll!System.Web.UI.WebControls.ListControl.SaveViewState() + 0x2d bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0x3c bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Control.SaveViewStateRecursive() + 0xa1 bytes  
     System.Web.dll!System.Web.UI.Page.SaveAllState() + 0x1d3 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequestMain(bool includeStagesBeforeAsyncPoint = true, bool includeStagesAfterAsyncPoint = true) + 0x68d bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint = true) + 0x67 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequest() + 0x57 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext context) + 0x13 bytes  
     System.Web.dll!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context) + 0x32 bytes  
     App_Web_oyc8s4lb.dll!ASP.centralintakemaintabbed_aspx.ProcessRequest(System.Web.HttpContext context = {System.Web.HttpContext}) + 0x2f bytes  C#
     System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0x130 bytes  
     System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step = {System.Web.HttpApplication.CallHandlerExecutionStep}, ref bool completedSynchronously = true) + 0x41 bytes  
     System.Web.dll!System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(System.Exception error) + 0x188 bytes  
     System.Web.dll!System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) + 0x8d bytes  
     System.Web.dll!System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest wr = {Microsoft.VisualStudio.WebHost.Request}) + 0x1ab bytes  
     System.Web.dll!System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest wr) + 0x62 bytes  
     System.Web.dll!System.Web.HttpRuntime.ProcessRequest(System.Web.HttpWorkerRequest wr) + 0x38 bytes  
     WebDev.WebHost.dll!Microso
Link Posted: 30-Aug-2007 18:43
All I can get from the stacks, is that in the first case (with 4.2)
Visible is called from the  PreRender page lifecycle stage.
In the second case it is SaveViewState.

Can you also put breakpoint to Visibile->set to see how many times and when the Visible property is set.

There should be a call from the RaisePostBackEvent stage, when FlyContextMenu raises Command event. But may something else, that breaks the behavior.
Link Posted: 31-Aug-2007 11:01
Hi EvgenyT,

Putting a breakpoint in the set method of Visible helped me find the problem. Unfortunately, I think it is an issue with 4.3.

I did not notice at the time, but a different code path was being executed in my app between 4.2 and 4.3.

I put a break point in the OnNodeSelected handler of my treeview, and the OnCommand node handler for the node context menu in question.

In 4.3, as soon as right click a node in my tree, the OnNodeSelected method is called, and my breakpoint is hit. In 4.2 this does not happen, and my first breakpoint I hit in the node handler, after I have right clicked on the menu item.

This to me is an obvious difference. I think 4.2 is behaving correctly. 4.3 is not.

Can you test this?

A code sample is in the next post
Link Posted: 31-Aug-2007 11:23
I have taken your example and modified it a bit to illustrate the bug.

You will see it hit the nodeSelected method the first time you right click on the node. After hitting continue in the debugger, if you right click on the node again, the nodeSelected method is no longer hit. I assume because the node is already \"selected\". Again, this is different behaviour than 4.2. If this is correct behaviour, how do I properly discard this \"selected\" event when the user is trying to right click on a menu item?

Thanks,
Rich



    
        
    
    

        
          
        





        
            
        

        

    Panel


Codebehind:

  protected void myMenu_Command(object sender, NineRays.WebControls.FlyContextMenuCommandEventArgs e)
        {
            panel.Visible = !panel.Visible;
        }

        protected void nodeSelected(object sender, NineRays.WebControls.FlyTreeNodeEventArgs e)
        {
              panel.BackColor = System.Drawing.Color.Green;
        }