So heres my issue....
I have my application1 where I start up another application2 through a QProcess. Application2 has dependencies on Qt shared libraries, so before I start up the QProcess, I set the QProcess system environment to the current environment in Application1, where my LD_LIBRARY_PATH is pointing to the Qt shared libs so like in the code below:
void MyClass::setEnvironment()
{
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
m_process->setProcessEnvironment(env);
QStringList envList = m_process->systemEnvironment();
m_process->setWorkingDirectory(m_project->path());
}
after this i call a QProcess::start, where my exitStatus returns a QProcess::CrashExit.
I tried debugging application2 but I get this error before it even enters main. After looking into the kernel logs I encountered this error:
Jul 23 09:30:40 centos7-gui kernel: application2[23290]: segfault at 38 ip 00002b4916d67969 sp 00007fff1b2e7c30 error 4 in libQt5Core.so.5.3.1[2b4916c36000+510000]
Again, Ive checked the system environment after setting it, and the LD_LIBRARY_PATH is what it needs to be. Also, if I run application2 seperately, and not within application1 through a QProcess, it works fine.
Does anyone have any suggestions on what this could be or how I could fix it? This is killing me!