Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Threads Question (Read 3144 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Threads Question

I've barely ever used threads before. I'm working on a plugin that is not multithreaded. I need to make some calls from playlist_switcher.h and play_control.h. I see that these should be called "ONLY from main thread." How do I do that?

Threads Question

Reply #1
Quote
I've barely ever used threads before. I'm working on a plugin that is not multithreaded. I need to make some calls from playlist_switcher.h and play_control.h. I see that these should be called "ONLY from main thread." How do I do that?
[a href="index.php?act=findpost&pid=289243"][{POST_SNAPBACK}][/a]

If you didnt create a new thread, your probably in the main thread.

Threads Question

Reply #2
Yeah you're definitely right. I'm looking for the problem in the wrong place. Any idea how to debug a stack dump? My plugin keeps crashing, and I don't know exactly where its happening. Is there some way to figure out whats going on in execution just before the crash from the addresses in the Stack dump analysis?

Threads Question

Reply #3
If you are using Visual Studio (and not just the compiler tools from the command line), start your plugin in debug mode from Visual Studio. You have to use the debug configuration for this. Make sure there is a working foobar2000 installation where the compiler puts the debug version of your plugin; a good idea would be to create one in the debug output directory by copying over the needed files from your normal installation. Then you only have to configure Visual Studio to launch the approriate foobar2000.exe to debug your plugin.