c++ - How do I fix segfault error 4 in a shared library from Qt? -
so heres issue....
i have application1 start application2 through qprocess. application2 has dependencies on qt shared libraries, before start qprocess, set qprocess system environment current environment in application1, ld_library_path pointing qt shared libs in 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 call qprocess::start, exitstatus returns qprocess::crashexit.
i tried debugging application2 error before enters main. after looking kernel logs encountered error:
jul 23 09:30:40 centos7-gui kernel: application2[23290]: segfault @ 38 ip 00002b4916d67969 sp 00007fff1b2e7c30 error 4 in libqt5core.so.5.3.1[2b4916c36000+510000]
again, ive checked system environment after setting it, , ld_library_path needs be. also, if run application2 seperately, , not within application1 through qprocess, works fine.
does have suggestions on or how fix it? killing me!
Comments
Post a Comment