Closed lucenta closed 12 months ago
The context is very definitely NOT threadsafe, so no wonder that would crash!
The comments describing the Context object do make that clear, but if you got as far as posting here to ask the question, then I guess I should add more comments to make that more obvious.
..and although it's not clear from your comment whether you're calling javascript directly from your audio thread, that's also obviously a big no-no, as nothing in there is realtime safe.
(..actually, sorry - when I said there was already a comment, I was looking at the other javascript classes, not the WebView, which doesn't have any such comments - definitely need to add a warning there!)
Yes, not calling from the audio thread! Thanks a ton for the comment!
I've noticed that if I call
evaluateJavascript
very frequently, the front end of the app crashes, thereby crashing the JUCE app. I'm trying to use this function to send audio data from my processor to webview (by calling a javascript function with the data as a parameter to the function). Is there a better way to do this other thanevaluateJavascript
? As a follow up, if this function threadsafe? I'm also calling it from multiple c++ threads, many times.Thanks!