qt - QProcess failed to start: the file name or extension is too long -
i have problem, code
qprocess *process = new qprocess(this); process->setenvironment(qprocess::systemenvironment()); process->setstandarderrorfile(getabsolutepath("logs")+"mylog.log",qiodevice::append); process->setprogram(program); process->setarguments(arguments); //loop qeventloop loop.connect(process, signal(finished(int, qprocess::exitstatus)), this, slot(finalprocess(int, qprocess::exitstatus))); process->start(); qdebug()<<process->program()<<process->arguments(); if(!process->waitforstarted(3600000)) { mylog.addmessage(process->program()+" "+process->errorstring()); } loop.exec(); process->close(); delete process; process = null;
this code function called inside loop , works n times (for example need n = 100 code crash in n=17) until crash output (process->errorstring())
qprocess failed start: file name or extension long.
then changed path other more short, saw how n more higher before crash, did more qprocess not all.
i dont understand why can't number of infinites qprocess if want, wait every 1 of qprocess qeventloop finish. can have solution?
thank much
finally solved problem, didnt understand why qprocess output "the file name or extension long.". "qprocess::systemenvironment()" increasing every time function run. had putenv function in part of program. conclusion: "the file name or extension long" because windows can't increase more path in system environment.
thanks all
Comments
Post a Comment