Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#99 closed Bug (fixed)

Freeze when opening project file with FileInput component

Reported by: pretzsch Owned by: Thomas Schmid
Priority: Critically important Milestone:
Component: AnotherEditor Keywords:
Cc: Arno Wacker

Description

Steps to reproduce:

1) Create new workspace 2) Add FileInput 3) Save workspace

When opening this file under Windows Vista with the current trunk debug and release binaries, the program freezes. It unfreezes when right clicking the window title in the Windows task bar.

Change History (7)

comment:1 Changed 12 years ago by Matthäus Wander

Component: FileInputAnotherEditor

The defect is caused by AnotherEditor.DragDrop.WorkspaceManager.Plugin_PropertyChanged(...), which is a synchronized method. If you remove the synchronized tag, the fault seems to be fixed. However this will probably have side-effects. Not sure how to fix that.

comment:2 Changed 12 years ago by Matthäus Wander

There seems to be another possible fix instead: replace dispatcher call in DragDrop.Thumbs.BaseElement.DockPointsOut with "return visualElement.ListDockPointsOut". But there's again the open question about unforseeable side-effects.

comment:3 Changed 12 years ago by Matthäus Wander

Cc: Arno Wacker added
Priority: Should be doneCritically important

The second solution proposal introduces the following problem: open LinearCongruentialGenerator-Sample.cte, repeat clicking play and stop. The GUI will react very slowly (hover effects etc.). This does not occur when using dispatcher for ListDockPointsIn and Out.

comment:4 Changed 12 years ago by Matthäus Wander

The first solution proposal shows the following problem: open AES, PRESENT or SDES sample, repeat clicking play and stop. Sometimes one of the encryption/decryption plugins throws an error processing the CryptoolStream.

comment:5 Changed 12 years ago by Arno Wacker

This bug occurs because the editor runs in the context of the WPF-GUI thread. It can be solved by detaching the main editor thread from the GUI-thread by invoking a new thread when one of the buttons (Play/Stop) in the GUI is pressed. However, doing so results in errors, since now the editor thread cannot access the GUI without using Dispatcher.Invoke. Since there are many places where this needs to be changed, we did not implement the fix yet.

comment:6 Changed 12 years ago by Thomas Schmid

Resolution: fixed
Status: newclosed

(In [883]) - fixed ticket 99: WorkspaceManager::Plugin_PropertyChanged is now using monitors instead of attribute MethodImplOptions.Synchronized

  • CrypWin runs execute and stop methods of editors now in separate threads
  • MD5 now uses static AssemblyVersion("2.0.3594.00001"), because of build failure after changing xaml content in last commit
  • new bins

comment:7 Changed 12 years ago by Matthäus Wander

It seems the issue has been fixed. Thanks.

Note: See TracTickets for help on using tickets.