You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/components/nif
scrawl 115e563a7a Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)
The first part of the fix is to assign VBO/EBO's upon loading the array in the Nif reader. This avoids triggering the 'addVertexBufferObjectIfRequired' code path in osg::Geometry which has the race condition when two threads add the same Array at the same time. Essentially, we want the Arrays to be 'const' when they come out of the Nif reader.

The second part of the fix is to make sure not to create empty arrays in the Nif reader (importantly, not assigning a VBO to the empty array). This empty array would be deleted when the NIFFile is cleaned up, and the detachment of the VBO assigned to it (which is still in use by other arrays) would cause threading issues.

This rare crash bug was first introduced with commit a7c5beb7c5. When using OSG dev version 3.5 the crashes were a little more prevalent, because 'addVertexBufferObjectIfRequired' in osg::Geometry is now used even when VBO's are disabled (as part of the VAO support changes).
8 years ago
..
base.hpp NIF reader cleanup: move definitions to cpp file 10 years ago
controlled.cpp Implement NiSphericalCollider (Closes #3644) 8 years ago
controlled.hpp Implement NiSphericalCollider (Closes #3644) 8 years ago
controller.cpp Implement planar collider for particles (Fixes #2149) 10 years ago
controller.hpp Implement planar collider for particles (Fixes #2149) 10 years ago
data.cpp Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580) 8 years ago
data.hpp Fully read NiPixelData 9 years ago
effect.cpp Implement support for sphere map NiTextureEffects (Fixes #1827) 9 years ago
effect.hpp Implement support for sphere map NiTextureEffects (Fixes #1827) 9 years ago
extra.cpp Add OSG nifloader, currently supports geometry, materials, basic texturing, skinning, morphing, and most controllers. 10 years ago
extra.hpp NIF reader cleanup: move definitions to cpp file 10 years ago
niffile.cpp Implement NiSphericalCollider (Closes #3644) 8 years ago
niffile.hpp Make NIFFilePtr const 9 years ago
nifkey.hpp Don't read forward/backward values for Quaternion key lists 9 years ago
nifstream.cpp Remove redundant allocations for NIF meshes 10 years ago
nifstream.hpp Remove redundant allocations for NIF meshes 10 years ago
niftypes.hpp Remove redundant Transform nodes for TriShapes/ParticleSystems with an identity transform 10 years ago
node.cpp Merge branch 'master' of https://github.com/OpenMW/openmw into osg 10 years ago
node.hpp Do not discard root node transformations if the root node is named 'bip01' (Bug #3118) 9 years ago
property.cpp Add OSG nifloader, currently supports geometry, materials, basic texturing, skinning, morphing, and most controllers. 10 years ago
property.hpp Fully implement NiStencilProperty (Feature #1057) 10 years ago
record.hpp Implement NiSphericalCollider (Closes #3644) 8 years ago
recordptr.hpp fixed warning C4099: 10 years ago