Giter Site home page Giter Site logo

vst3_base's People

Contributors

scheffle avatar ygrabit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vst3_base's Issues

Where did fthread.h go? What new file should I use?

Hello,

I was just wondering where thread/include/fthread.h got moved to or changed to? I am trying to rebuild the openglviewtest example from VSTGUI and fthread.h appears to be missing. I read somewhere the file was moved to thread/include/flock.h, but there are still some things missing in Base::Thread::FThread like virtual uint32 entry(). Where can I find the new FThread class, or what should I be using in the newer SDK?

Edit: I found there is a class called FCondition in thread/include/fcondition.h which allows me to set a timeout for the thread using FCondition::waitTimeout(int32 milliseconds). Then I guess I can run the OpenGL draw call and the timeout in a while loop like the original openglviewtest.cpp file does. Hopefully I am going in the right direction.

Reference counter race condition

Hi, I believe there may exist a race condition at FObject::release. (as of 3.7.1)

At function's end, the refCount is reloaded a second time, after the atomic decrementation.
One could provide a slightly different implementation to prevent this.

	int32 newCount = FUnknownPrivate::atomicAdd (refCount, -1);
	if (newCount == 0)
	{
		refCount = -1000;
		delete this;
		return 0;
	}       
	return newCount;

Taking the original implementation as a reference, I imagine we can met a following problem scenario:

(1)	if (FUnknownPrivate::atomicAdd (refCount, -1) == 0)
	{
		refCount = -1000;
		delete this;
(2)		return 0;
	}
(3)	return refCount;
  • T1 executes the atomic decrementation at (1)
  • T2 executes the atomic decrementation at (1), and proceeds to (2), deleting the object
  • T1 loads at (3) from the deleted object and crashes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.