We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SetDockVisibility throws nullReferenceException when called on auto-hidden control

If auto hide is set for a control, then it is hidden as:
dockingManager.SetDockVisibility(control, false);
and unhidden as:
dockingManager.SetDockVisibility(control, true);

a null reference exception is thrown. What are the workarounds for this?


11 Replies

SR SubhaSheela R Syncfusion Team December 27, 2007 06:24 AM UTC

Hi Anthony,

Thank you for using Syncfusion products.
I have created a simple sample that shows how to test the "nullReferenceException" issue.
Please refer to the below link.
http://websamples.syncfusion.com/samples/Tools.Windows/F70639/main.htm

Kindly have a look at the above sample and if still the exception exists, could you please try reproducing it in the above sample or send us reproducing steps so that we could sort out the cause of the issue and provide you a solution? Also, Could you please specify your version, so that we will provide you the exact solution?

Regards,
Subhasheela R




AN Anthony Nahas January 4, 2008 06:39 PM UTC

Here is the version information:

Version 4.102.0.999
Runtime Version v2.0.50727

Would you be able to tell me if there was a problem of the type I have described in that version?

I realize it may be fixed in the newer versions but are there any work-arounds if this really is a bug?




KS Keith Sanker replied to SubhaSheela R May 11, 2023 10:46 PM UTC

I've encountered the exact same issue, but the sample link is not working. Could it be reposted?



BA BagavathiPerumal Apranandham Syncfusion Team May 22, 2023 07:12 AM UTC

Hi Keith Sanker,



Sorry for the delay in getting back to you.

We can be able to reproduce the issue from our end. We will check and update you on or before 24th May 2023. We appreciate your patience until then.




Regards,
Bagavathi Perumal A



BA BagavathiPerumal Apranandham Syncfusion Team May 24, 2023 02:22 PM UTC

Hi Keith Sanker,



We have confirmed the reported scenario is a defect and logged a report for the reported scenario “The NullReferenceException was thrown when changing the SetDockVisibility() within the DockStateChanging event”. We will provide the fix in the Weekly NuGet release on 20th June 2023.


You can track the status of this defect using the following feedback link:  NullReferenceException was thrown when changing the SetDockVisibility() in DockStateChanging event in WinForms | Feedback Portal (syncfusion.com)


If you have any more specification replication procedures or a scenario to be tested, you can add it as a comment in the portal.


Please let us know if you need any further assistance.


Note: The provided feedback link is private, and you need to log in to view this feedback.


Regards,
Bagavathi Perumal A



KS Keith Sanker May 25, 2023 10:06 PM UTC

Thank you for the Update.

I get an Access Denied error when trying to access the Feedback links, but here's the secenario:

Some additional background: I created an App with 3 gradient panel docking windows. I clicked the autohide on one of them ("Filters") and it looks like this:

Screenshot (1709).png

I then exit the application. The dockingmanager is using the persiststate true.  When I restart the app I get this screen:

I would have expected the autohidden window("Filters") would have showed on the side like before since the persist state is on, but it does not. I'm not sure if that's a problem or not, but I don't know why that is.

I run into the null pointer exception when I click a button that sets the visibility of the "Filters" docking window to true. It also happens if it try to set it to false.



BA BagavathiPerumal Apranandham Syncfusion Team May 26, 2023 02:47 PM UTC

Hi Keith Sanker,


We have provided access to the feedback link to your credentials. So, please try clearing the cache and using an incognito window. Currently, we are validating reported issue. We will validate and update you on or before 30th May 2023.



Regards,
Bagavathi Perumal A



BA BagavathiPerumal Apranandham Syncfusion Team May 30, 2023 03:13 PM UTC

Hi Keith Sanker,



We are unable to reproduce the reported issue from our end. Please refer to the attached sample and video for your reference.


Could you please share the following details


  • Is this a breaking issue. If you were not able to reproduce this in the earlier version, please share with us in which version this issue occurred.


  • If possible, please share the modified demo.



Regards,
Bagavathi Perumal A


Attachment: DockingManagerSerialization_c42f6970.zip


KS Keith Sanker May 31, 2023 06:33 AM UTC

When I cleared cache and Isolated storage, the problem I had with auto-hidden windows not showing after restarting is resolved.

The only issue is then setting document visibility for an autohidden docking window.

I note the fix ticket, 43977, makes it sound like this only occurs in the DockStateChanging event.  It seems to occur when SetDockVisibility() is called from anywhere, like a toolbar button click event.


Thanks



BA BagavathiPerumal Apranandham Syncfusion Team June 2, 2023 11:30 AM UTC

Hi Keith Sanker,



We are unable to reproduce the reported issue from our end. Please refer to the attached sample and video for your reference. The fix will resolve your reported issue.


Could you please share the following details. It would be helpful for us to analyze and provide you with a prompt solution.


  • Is this a breaking issue. If you were not able to reproduce this in the earlier version, please share with us in which version this issue occurred.
  • Stack trace of the exception thrown.
  • Video to demonstrate the reported issue.
  • If possible, please share the modified demo.



Regards,

Bagavathi Perumal A


Attachment: DockingManager_WF_2fbd4e0c.zip


KS Keith Sanker June 6, 2023 12:25 AM UTC

Well, I updated to 21.2.8 and now am unable to to get it to fail.

If the problem returns, I will provide additional details.

Thank


Loader.
Live Chat Icon For mobile
Up arrow icon