제 프로젝트에서 꽤 많은 시간이 걸릴 수있는 많은 계산을하는 많은 루프가 있습니다. 로드하는 동안 오류가 발생할 때까지 모든 것이 잘 실행됩니다. 모든 것을 계산할 때, 프로그램은로드가 끝날 때까지 "Unresponsive"가됩니다.Qt 응답하지 않음 시간 초과?
Exception at 0x7585b9bc, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in Qt5Cored!QTimer::isSingleShot
그 응답 타이머를 비활성화 할 수있는 방법이 있나요 : 그것은 거기 타이머의 일종이며 60 초에 도달하면 디버깅을 중지하고 나는이 오류가 보인다?
감사합니다.
편집 : 여기 루프가 있습니다. 너무 추상적이어서이 루프의 전체 컨텍스트를 알지 못해 사과드립니다. ://하지만이 프로그램은 정확한 시점에서 멈추지 않는다는 것을 알고 있습니다. 때로는 i == 498, 때로는 499 등이됩니다.
for(int i=0; i<=728; i++)
{
int sections;
if(PCBRchunks[i] != "Null")
{
QString blockId;
PCBRblocks[i].fill('0', 131072);
//Get number of sections
temp_hex = PCBRchunks[i].mid(PCBRchunks[i].indexOf("09000853656374696f6e73")+30, 2);
HexToInt2(temp_hex, temp_int);
sections = temp_int;
int totalStart;
totalStart = PCBRchunks[i].indexOf("070006426c6f636b7300001000")+26;
for(int s=0; s<=sections-1; s++)
{
int y;
temp_hex = PCBRchunks[i].mid(totalStart + (s*20604) + 20574, 2);
HexToInt2(temp_hex, y);
for(int k=0; k<=255; k++)
{
for(int p=0; p<=15; p++)
{
blockId = PCBRchunks[i].mid(totalStart + (s*20604) + (p*512) + ((((k-((k/16)*16))*16)+(k/16))*2), 2);
if(y<8)
PCBRblocks[i].replace((p*2)+(k*256)+(y*32), 2, blockId);
else
PCBRblocks[i].replace((p*2)+(k*256)+((y-8)*32)+65536, 2, blockId);
}
}
}
}
if(PCBLchunks[i] != "Null")
{
QString blockId;
PCBLblocks[i].fill('0', 131072);
//Get number of sections
temp_hex = PCBLchunks[i].mid(PCBLchunks[i].indexOf("09000853656374696f6e73")+30, 2);
HexToInt2(temp_hex, temp_int);
sections = temp_int;
int totalStart;
totalStart = PCBLchunks[i].indexOf("070006426c6f636b7300001000")+26;
for(int s=0; s<=sections-1; s++)
{
int y;
temp_hex = PCBLchunks[i].mid(totalStart + (s*20604) + 20574, 2);
HexToInt2(temp_hex, y);
for(int k=0; k<=255; k++)
{
for(int p=0; p<=15; p++)
{
blockId = PCBLchunks[i].mid(totalStart + (s*20604) + (p*512) + ((((k-((k/16)*16))*16)+(k/16))*2), 2);
if(y<8)
PCBLblocks[i].replace((p*2)+(k*256)+(y*32), 2, blockId);
else
PCBLblocks[i].replace((p*2)+(k*256)+((y-8)*32)+65536, 2, blockId);
}
}
}
}
if(PCTRchunks[i] != "Null")
{
QString blockId;
PCTRblocks[i].fill('0', 131072);
//Get number of sections
temp_hex = PCTRchunks[i].mid(PCTRchunks[i].indexOf("09000853656374696f6e73")+30, 2);
HexToInt2(temp_hex, temp_int);
sections = temp_int;
int totalStart;
totalStart = PCTRchunks[i].indexOf("070006426c6f636b7300001000")+26;
for(int s=0; s<=sections-1; s++)
{
int y;
temp_hex = PCTRchunks[i].mid(totalStart + (s*20604) + 20574, 2);
HexToInt2(temp_hex, y);
for(int k=0; k<=255; k++)
{
for(int p=0; p<=15; p++)
{
blockId = PCTRchunks[i].mid(totalStart + (s*20604) + (p*512) + ((((k-((k/16)*16))*16)+(k/16))*2), 2);
if(y<8)
PCTRblocks[i].replace((p*2)+(k*256)+(y*32), 2, blockId);
else
PCTRblocks[i].replace((p*2)+(k*256)+((y-8)*32)+65536, 2, blockId);
}
}
}
}
if(PCTLchunks[i] != "Null")
{
QString blockId;
PCTLblocks[i].fill('0', 131072);
//Get number of sections
temp_hex = PCTLchunks[i].mid(PCTLchunks[i].indexOf("09000853656374696f6e73")+30, 2);
HexToInt2(temp_hex, temp_int);
sections = temp_int;
int totalStart;
totalStart = PCTLchunks[i].indexOf("070006426c6f636b7300001000")+26;
for(int s=0; s<=sections-1; s++)
{
int y;
temp_hex = PCTLchunks[i].mid(totalStart + (s*20604) + 20574, 2);
HexToInt2(temp_hex, y);
for(int k=0; k<=255; k++)
{
for(int p=0; p<=15; p++)
{
blockId = PCTLchunks[i].mid(totalStart + (s*20604) + (p*512) + ((((k-((k/16)*16))*16)+(k/16))*2), 2);
if(y<8)
PCTLblocks[i].replace((p*2)+(k*256)+(y*32), 2, blockId);
else
PCTLblocks[i].replace((p*2)+(k*256)+((y-8)*32)+65536, 2, blockId);
}
}
}
}
qDebug() << i;
ui->progressBar->setValue((i*100)/729);
}
그래서 내 루프를 스레드에서 얻었고 모든 것이 연결되었지만 메인 프로그램의 변수를 스레드로 전달하는 방법에 대한 단서가 없습니다. 내 주 프로그램에서 cThread.start();를 사용하여 스레드를 시작합니다. 자동으로 run() 함수가 시작됩니다. 스레드와 변수를주고받는 방법은 무엇입니까? – mrg95
mc360pro : 나는 그 질문을 이해하지 못한다. 스레드와 변수를 보내지 않습니다. – lpapp
? 그렇다면 내 스레드는 무엇을 할 것인가? 나는 스레드가 단지 내가 필요로하는 것을 수행하여 별도로 수행 한 다음 "변경된"변수를 리턴한다고 생각했습니다. – mrg95