Components aren't showing, segfaults in projucer JIT

Hi all,

I’m sure I’m missing something simple, but I can’t figure it out. I’ve got a couple components that aren’t showing. (Using addAndMakeVisible() and setting bounds in resized(), of course.)

So I’ve got a component that takes up the entire window, with two child components each of which have some nested child components. When I go to view any of the child components (all the way to the bottom) using Projucer’s JIT compiler, they’re all displaying correctly. But when I try to view the parent component, I’m getting segfaults (sometimes) and the children aren’t visible at all. Compiling (Xcode) doesn’t cause any crashes or noticeable errors while debugging, but the components still aren’t showing.

Any ideas as to what might be causing this?

segfaults usually mean you’re using a pointer that is pointing to garbage. Don’t use pointers to store your components if you can avoid it. just add them as regular member variables.

no one can help you without seeing some code. but only post the relevant bits. And also, be sure to debug it via breakpoints. if you get a crash at function B, add breakpoints to all of the places that call it and step through to see what happens that is making your pointer be invalid.