Free cookie consent management tool by TermsFeed Policy Generator

Opened 16 years ago

Closed 15 years ago

Last modified 14 years ago

#183 closed defect (done)

Splash screen sometimes causes ObjectDisposedException

Reported by: abeham Owned by: gkronber
Priority: highest Milestone: HeuristicLab 3.3.0
Component: PluginInfrastructure Version: 3.2
Keywords: Cc:

Description

Sometimes when one opens the HeuristicLab Starter and one of the applications (dockable for example) an exception is thrown saying that it is tried to access the disposed splash screen object.

This may be difficult to reproduce.

Attachments (2)

ReturnOfTheSplashScreen.png (87.7 KB) - added by abeham 16 years ago.
splashscreen3.3.png (59.2 KB) - added by abeham 15 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 Changed 16 years ago by gkronber

  • Owner changed from swagner to gkronber

comment:2 Changed 16 years ago by gkronber

This has probably been also been fixed together with #138 (r594:596).

I'm still leaving this ticket open for a while. However if the exception doesn't show up anymore it should be closed as 'fixed'.

comment:3 Changed 16 years ago by abeham

  • Milestone changed from 3.0 to 3.2
  • Version set to 3.2

comment:4 Changed 16 years ago by gkronber

  • Resolution set to fixed
  • Status changed from new to closed

No more exceptions since last comment.

comment:5 Changed 16 years ago by abeham

  • Resolution fixed deleted
  • Status changed from closed to reopened

Unfortunately I think the bug still exists. I am reopening this and attaching a screenshot.

Changed 16 years ago by abeham

comment:6 Changed 16 years ago by gkronber

The problem is that the SplashScreen is still attached to the Action event of PluginManager when it is already disposed. Two possible causes come to mind:

  • The closing event of SplashScreen on which the listener is removed is fired after disposal of SplashScreen.
  • There are in fact multiple instances of PluginManager and SplashScreen tries to remove its listener from the incorrect one.

comment:7 Changed 16 years ago by swagner

  • Milestone changed from 3.2 to Iteration 0

Milestone 3.2 deleted

comment:8 Changed 16 years ago by gkronber

Related to #280.

comment:9 Changed 15 years ago by gkronber

  • Owner gkronber deleted
  • Status changed from reopened to new

comment:10 Changed 15 years ago by abeham

Wrapped the Close() method in SplashScreen to cover in (hopefully) correct sequential order:

# Deregistration of the event listener # Processing of all remaining queued events through Application.DoEvent() # Closing the form

As long as CloseSplashScreen() is called from within !bigLock there should be no problems as it is executed only once. Thinking about it, it might better to perform the lock within CloseSplashScreen() instead of within its caller, but it should work the way it is.

Changes done in r2439

comment:11 Changed 15 years ago by abeham

  • Readded Application.DoEvents to Manager_Action
  • Stopped the fade timer in CloseSplashScreen before closing the form
  • Put the lock in UpdateOpacity and CloseSplashScreen

Changes done in r2442

Changed 15 years ago by abeham

comment:12 follow-up: Changed 15 years ago by abeham

The splash screen still throws an ObjectDisposedException in 3.3, but a different one than in 3.2. I attached a screenshot of the error message. This happened when launching HL 3.3 from visual studio with debugger attached.

comment:13 in reply to: ↑ 12 Changed 15 years ago by gkronber

Replying to abeham:

The splash screen still throws an ObjectDisposedException in 3.3, but a different one than in 3.2. I attached a screenshot of the error message. This happened when launching HL 3.3 from visual studio with debugger attached.

Thank you! I will investigate the issue and try to come up with a fix for the next test version.

comment:14 Changed 15 years ago by gkronber

  • Owner set to gkronber
  • Priority changed from minor to blocker
  • Status changed from new to assigned

comment:15 Changed 15 years ago by gkronber

  • Component changed from General to PluginInfrastructure

comment:16 Changed 15 years ago by gkronber

Changed starter form to instantiate only one splash screen and show and hide it as required with r3113.

This should eliminate the race-condition problems while disposing the splash screen. Since the single splash screen instance is kept alive over the whole process life time it is also not necessary to manually deregister splash screen methods as event handler for the plugin manager events.

comment:17 Changed 15 years ago by abeham

Is this okay with multiple apps starting simultaneously?

comment:18 Changed 15 years ago by gkronber

It should be. Since there also was also only one splash screen when starting multiple apps now.

comment:19 Changed 15 years ago by mkommend

corrected displaying of the SplashScreen r3241

comment:20 Changed 15 years ago by gkronber

  • Resolution set to fixed
  • Status changed from assigned to closed

Couldn't be reproduced for some time now. Hopefully closing for the last time.

comment:21 Changed 14 years ago by swagner

  • Milestone changed from Iteration 4 to Current

Milestone Iteration 4 deleted

comment:11 Changed 14 years ago by swagner

  • Milestone changed from Current to HeuristicLab 3.3.0

Milestone Current deleted

Note: See TracTickets for help on using tickets.