SegFault on Linux

Hi Jules,

On Linux, I have a SegFault when i'm compiling any samples (or any program). I get the last version under git and I think you're last update was wrong.

ex: IntroJucer in gdb

Program received signal SIGSEGV, Segmentation fault.
0x080b2d3a in juce::CharPointer_UTF8::isEmpty (this=0xbfffe6f0)
    at ../../Source/Project/../../JuceLibraryCode/modules/juce_core/../../../../../modules/juce_core/text/juce_CharPointer_UTF8.h:80
80        inline bool isEmpty() const noexcept                { return *data == 0; }

Thx

Damn! Thanks for letting me know. Fixed now..

Same error occurs in here too. Your published fixe has fixed the segfault on my side.

 

Thanks.

Hi,

I seem to be getting a similar error to the above, although the samples compile and run ok.  I've reduced the error to a simple test case from a larger project:

​
#include "../JuceLibraryCode/JuceHeader.h"
//Load the recombination names into a statc array of strings 
const char* const recombinationTypeNameStrings[] =
{
    "Discrete",
    "Intermediate"
};
//Load the names from above into the static StringArray 
const StringArray recombinationTypeNames(recombinationTypeNameStrings);

//==============================================================================
int main (int argc, char* argv[])
{
    // ..your code goes here!
    
    return 0;
}

It segfaults; here's some gdb output:


Program received signal SIGSEGV, Segmentation fault.
0x00000000005269eb in juce::CharPointer_ASCII::isEmpty (this=0x7fffffffd810)
    at ../../JuceLibraryCode/modules/juce_core/text/juce_CharPointer_ASCII.h:84
84        inline bool isEmpty() const noexcept                { return *data == 0; }

Cheers

That StringArray constructor expects a null-terminated array.

Of course, thanks!