kring789's picture

OpenTK can sometimes fail to share contexts

Project:The Open Toolkit library
Version:1.0-2010-10-06
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

If the first context created gets garbage collected without being disposed, newly created contexts will not be shared. The problem is that a WeakReference is used to store references to contexts in the 'available_contexts' list, but the WeakReference's Target property is not checked for null in GraphicsContext.FindSharedContext. A patch that fixes the problem is attached.

AttachmentSize
GraphicsContext.patch680 bytes

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

#1

Status:open» fixed

Thanks for the patch, this is now fixed in the 1.0 branch, r2708.

the Fiddler's picture

#2

Status:fixed» closed

Closing issues fixed in opentk-1.0-2010-10-06 release.

the Fiddler's picture

#3

Version:1.0.0-rc1» 1.0-2010-10-06