Bug in DroopyEyes.EcoExtensions.WinForm.DirtyObjectCatcher
CapableObjects Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Bug in... Expand / Collapse
Author
Message
Posted 2010-04-30 04:01:37
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 2011-12-12 23:38:00
Posts: 37, Visits: 168
Hi,

I am using a DirtyObjectCatcher in my Eco 5 Winforms application.

This has been working well for some time. Now when specific actions are performed I get a Null reference exception in the DirtyObjectCatcher.SubscribeToUndoblock method:

private void SubscribeToUndoblock()
{
IUndoBlock block = this.UndoService.UndoList[this.UndoBlockName];
if (block != null)
{
block.Subscribe(this.Subscriber.AsISubscriber());
}
}

The Null reference is caused by this.UndoService returning null;

SubscribeToUndoblock is called by private void CheckDirtyListChanged(object sender, EventArgs e) which is attached to the Application.Idle event here in DirtyObjectCatcher.

private void Subscriber_Receive(object sender, EventArgs e)
{
Application.Idle += new EventHandler(this.CheckDirtyListChanged);
}


Is there any chance of a fix to this problem?
A suggested work around?
The source to DroopyEyes.EcoExtensions.WinForm.dll?

This is a showstopper for me and my client!!

Regards AndyB

Post #5178
Posted 2010-04-30 19:22:28
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2011-07-14 17:05:00
Posts: 290, Visits: 2 617
AndyB (2010-04-30)
Hi,

I am using a DirtyObjectCatcher in my Eco 5 Winforms application.

This has been working well for some time. Now when specific actions are performed I get a Null reference exception in the DirtyObjectCatcher.SubscribeToUndoblock method:

private void SubscribeToUndoblock()
{
IUndoBlock block = this.UndoService.UndoList[this.UndoBlockName];
if (block != null)
{
block.Subscribe(this.Subscriber.AsISubscriber());
}
}

The Null reference is caused by this.UndoService returning null;

SubscribeToUndoblock is called by private void CheckDirtyListChanged(object sender, EventArgs e) which is attached to the Application.Idle event here in DirtyObjectCatcher.

private void Subscriber_Receive(object sender, EventArgs e)
{
Application.Idle += new EventHandler(this.CheckDirtyListChanged);
}


Is there any chance of a fix to this problem?
A suggested work around?
The source to DroopyEyes.EcoExtensions.WinForm.dll?

This is a showstopper for me and my client!!

Regards AndyB



Can you provide a test case + instructions on how to reproduce? If so I will fix it.


====
Pete
Post #5183
Posted 2010-05-03 03:46:31
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 2011-12-12 23:38:00
Posts: 37, Visits: 168
Hi Pete,

Thank you very much for your response. Really appreciated.

I would love to be able to demonstrate this problem in a test case but it seems pretty obscure and the budget for this project is already spent!!

Tracing the problem indicates that the Application.Idle event is raised after the call to DirtyObjectCatcher.Dispose and the DirtyObjectCatcher instance CheckDirtyListChanged method is still subscribed to this event.

This would explain why the DirtyObjectCatcher.ServiceProvider reference is null.

I may be doing something dumb elsewhere to cause the problem but if you add:

Application.Idle -= new EventHandler(this.CheckDirtyListChanged)

to the DirtyObjectCatcher.Dispose() the problem may just go away.

I am in New Zealand and 12 hours out of synch with your time zone so may take time to respond.

Once again - thanks for the help.

Best regards

Andy
Post #5186
Posted 2010-05-06 13:11:38
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2011-07-14 17:05:00
Posts: 290, Visits: 2 617
Email sent.

====
Pete
Post #5189
Posted 2010-05-16 17:40:20
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: Today @ 14:58:14
Posts: 16, Visits: 2 746
Hi Pete,

Send me this update too;

Thanks
Post #5222
Posted 2010-05-16 22:38:45
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2011-07-14 17:05:00
Posts: 290, Visits: 2 617
http://pastebin.com/sRPGpAUF

:-)


====
Pete
Post #5223
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: HansKarlsen, Jonas Hogstrom, PeterMorris

Permissions Expand / Collapse

All times are GMT +1:00, Time now is 9:30

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0,188. 8 queries. Compression Disabled.