Fix System.InvalidOperationException: This Visual is not connected to… #148
No reviewers
Labels
No labels
Area-Accessibility
Area-Build
Area-CodeCompletion
Area-Document
Area-Documentation
Area-Editing
Area-Folding
Area-Highlighting
Area-i18n
Area-Indentation
Area-NetFx
Area-Rendering
Area-Search
Area-Snippets
dependencies
duplicate
Feedback Needed
help wanted
invalid
Issue-Bug
Issue-Discussion
Issue-Enhancement
Issue-Performance
Issue-Question
on-hold
Resolution-Answered
Resolution-By Design
Resolution-Duplicate
Resolution-Fixed
Resolution-Won't Fix
Up-for-Grabs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-icsharpcode/AvalonEdit!148
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-invalidoperationexception"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Check that TextView in PresentationSource
Some of tests(WeakReferenceTests) failed without my changes, any idea?
I think the failing tests are already fixed. Can this be closed?
@flash384 The fix looks good to me, but do you have reproduction steps for this bug? Possibly using the AvalonEdit.Sample application? Thank you very much!
Hi! Unfortunately I don't have repro steps.
I'm getting crash reports from my app with this error, but I don't have repro steps either. I can only guess that it's some specific sequence of events with a specific timing or something like that. But it would be great to have this pull request merged in as this issue crashes the hosting application.
I actually just saw this exception on my app for the first time. But all I did was attempt to reposition the app by dragging the title bar, as far as I can recall the code completion window was not open at the time and I have not been able to repro this again. It makes me wonder if it's only triggered in rare circumstances by some sort of race condition.
It's a bit weird to have no
PresentationSourcewithin theOnSourceInitializedevent.Maybe the event can sometimes be delayed in the dispatcher's queue?
Let's hope this fix works. If it's a race with some other WPF thread, the fix might be insufficient and we'd have to instead catch the exception :/
I recently ran into this problem and figured out steps that reproduce it: