RTAS PC crash fix with new juce lib


#1

I recently updated the juce library but then after compiling, i couldn’t run my RTAS PC plugins anymore. ProTools always crashed when i wanted to load a plugin.
I compared juce_RTAS_Wrapper.cpp and juce_RTAS_WinUtiliies.cpp with my previous update (few months ago) and noticed that the #pragma pack (push, 8) and #pragma pack (pop) lines had disappeared in both files.
I put them back in the code to see if this could make any difference and it worked!
I guess they force the RTAS SDK and the juce library to have the same alignment.
So unless I missed something, removing them was not a good idea .
I hope this will help some of you who have the same trouble.


#2

Ok, thanks, I don’t really understand why it’d cause be a problem, but I’ll check that…


#3

Hey Jules, I see this submit:

Is this a fix for the problem?

I’ve been looking into crashes my latest Windows build had with Reaper 32-bit, and this commit fixed my problem too. Before the commit I found that it crashed due to AudioProcessor::getCallbackLock() returning a pointer which was offsetted by 8 bytes from the correct result, and alignment directives could certainly cause a difference there.

cheers, Yair


#4

Yeah, I just put the old code back.

I think that it’d probably be ok without these settings as long as your project specifies the same alignment for all the files you’re using, but if some are set differently, then the explicit settings should help keep it all happy.