Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jeffs

Pages: [1]
1
Graphics / Using multiple windows in threads
« on: March 27, 2011, 01:49:21 pm »
Ah, I would never have known. Thanks for the help.

2
Graphics / Using multiple windows in threads
« on: March 27, 2011, 01:29:54 pm »
Thanks for the quick reply!

Simplifying the code helped! I just noticed that I created my window in the constructor of the plot class, and not in the run() function. Therefore, the window was actually created in the wrong thread. It seems this causes an access violation upon terminating the thread. I'm not sure why though, since data should be shared between threads..
[/code]

3
Graphics / Using multiple windows in threads
« on: March 27, 2011, 01:19:36 am »
Hi! I've created a plot class, where one can make an object that plots some data. I want this plot to appear in its own window, and be totally free of the main application. This way, one can update the plot without having to create another window. So I made the plot class inherit from sf::thread, and in the run() function I put a regular window loop. I have the following problems:

1. If I close the plot window before the window in the main application, I get an access violation error. This happens in the destructor of sf::thread. (When wait() runs WaitForSingleObject).

2. If I close the main window before the plot window, and then let the main thread sleep for a while, the plot window will just freeze.

3. If I don't open any windows in the main thread, but just let it sleep, the plot window just becomes black.

I'm wondering if I'm going about this problem the right way, and if so, what can be the cause of my problems? Everything works just fine without the threading stuff, so I'm pretty sure it has something to with that.

4
Audio / Getting samples with no delay
« on: March 20, 2011, 12:22:37 pm »
That's funny, I'm working on almost the exact same project, and I have almost the exact same problem. I'll look into the solution you found! Thanks.

Pages: [1]
anything