में बार-बार डिस्पैच मैसेज डब्ल्यू के साथ स्टैक ओवरफ़्लो त्रुटि नहीं समझा जाता है यह एक डेल्फी एप्लिकेशन है, लेकिन मुझे लगता है कि यह एक सामान्य विंडोज प्रोग्रामिंग प्रश्न है।मुझे कॉल स्टैक
मैंने सप्ताहांत में अपना आवेदन चलाना (डेल्फी आईडीई में) छोड़ दिया और अभी एक स्टैक ओवरफ़्लो खोजने के लिए वापस आ गया है।
ढेर इस तरह शुरू होता है ...
:75c4417e kernel32.GetDriveTypeW + 0x23
:75c452ae kernel32.IsProcessorFeaturePresent + 0xa9
:75c45272 kernel32.IsProcessorFeaturePresent + 0x6d
:75c45248 kernel32.IsProcessorFeaturePresent + 0x43
:7678410b KERNELBASE.LoadStringBaseExW + 0xc7
:76678ed2 USER32.LoadStringW + 0x19
:0040c4ae LoadResString + $4A
uADStanDef.TADDefinition.Create(nil)
uADStanDef.TADDefinition.CreateTemporary
uADStanDef.TADConnectionDefTemporaryFactory.CreateObject
uADStanFactory.TADManager.CreateInterface((1050358107, 62550, 16757, (168, 100, 178, 87, 60, 74, 32, 21)),(no value),True)
uADStanFactory.ADCreateInterface((1050358107, 62550, 16757, (168, 100, 178, 87, 60, 74, 32, 21)),(no value),True)
uADCompClient.TADCustomConnection.Create($2DB7EB0)
fMainForm.TMainForm.ServerAliveTimerTimer($2E8DE38) <========== my code
:004f1546 Winapi + $4F1546
:00461316 Winapi + $461316
:766762fa ; C:\Windows\syswow64\USER32.dll
:76676d3a USER32.GetThreadDesktop + 0xd7
:766777c4 ; C:\Windows\syswow64\USER32.dll
:7667788a USER32.DispatchMessageW + 0xf
तो, एक टाइमर समाप्त हो रही है, मैं (एक AnyDac घटक के) एक नई वस्तु और ढेर अतिप्रवाह बनाने रहा हूँ। कोड निश्चित रूप से वस्तु को मुक्त करता है। मैंने इसे उन लोगों के लिए नीचे जोड़ा है जो जांचना चाहते हैं, लेकिन मुझे नहीं लगता कि यह मेरा प्रश्न है।
ढेर तो जारी है
:7669cdfd ; C:\Windows\syswow64\USER32.dll
:7669cf5c ; C:\Windows\syswow64\USER32.dll
:766cf73c ; C:\Windows\syswow64\USER32.dll
:766cfa18 ; C:\Windows\syswow64\USER32.dll
:766cfb1f USER32.MessageBoxTimeoutW + 0x52
:766cfd15 USER32.MessageBoxExW + 0x1b
:766cfd57 USER32.MessageBoxW + 0x18
:00549986 Vcl + $549986
:00549aa2 Vcl + $549AA2
:00549873 Vcl + $549873
:00461316 Winapi + $461316
:766762fa ; C:\Windows\syswow64\USER32.dll
:76676d3a USER32.GetThreadDesktop + 0xd7
:766777c4 ; C:\Windows\syswow64\USER32.dll
:7667788a USER32.DispatchMessageW + 0xf
तीन thoussand लाइन (!) के लिए दोहराया है कि ब्लॉक के साथ और मैं पता नहीं कि यह क्या है या क्या यह कर रहा है। यह तो समाप्त हो जाती है
StoreRoom.StoreRoom
:75c4339a kernel32.BaseThreadInitThunk + 0x12
:77eb9ef2 ntdll.RtlInitializeExceptionChain + 0x63
:77eb9ec5 ntdll.RtlInitializeExceptionChain + 0x36
मुझे कोई tunderstand है कि बार-बार ढेर के सभी - किसी सलाह दे सकते हैं?
procedure TMainForm.ServerAliveTimerTimer(Sender: TObject);
begin
try
ADConnection := TADConnection.Create(Self); <======= stack overflow here
ADConnection.DriverName := 'mysql';
ADConnection.Params.Add('Server=' + MAIN_STOREROOM_IP_ADDRESS);
// other params, such as password, removed for posting
ADConnection.Connected := True;
except
on E : Exception do
begin
ADConnection.Free();
theDialogForm := TDialogFormForm.Create(Nil);
theDialogForm.ShowTheForm('Database problem'+#13+#10+''+#13+#10+
E.ClassName+#13+#10+E.Message);
StopTheApplication(); <===== just calls ExitProcess(0);
Exit; as I had problems with Halt elsewhere in the code
end;
end;
if isMainStoreRoom then
begin
CheckIfStoreRoomIsAlive(SECONDARY_STOREROOM_IP_ADDRESS);
end
else
begin
CheckIfStoreRoomIsAlive(MAIN_STOREROOM_IP_ADDRESS);
end;
try // Now, update our own timestamp
timestamp := GetCurrentUnixTimeStamp();
ADConnection.ExecSQL('UPDATE server_status SET alive_timestamp="' + IntToStr(timestamp) + '" WHERE ip_address="' + ipAddress + '"');
except
on E : Exception do
begin
ADConnection.Free();
Exit;
end;
end;
ADConnection.Free();
end; // ServerAliveTimerTimer()
+1। – lkessler
ADConnection का उपयोग करने के बजाय आपको हर बार कनेक्शन क्लास बनाने की आवश्यकता क्यों है। कनेक्ट किया गया True/False? रनटाइम पर डेटाबेस कनेक्शन सेटिंग्स बदलते हैं? – pani
प्रश्न को संदिग्ध रूप से "मैं स्टैक ओवरफ्लो समझ में नहीं आता" नामक था, लेकिन किसी ने इसे संपादित करने के लिए इसे संपादित किया (सभी पसंद करने वालों के लिए +1) – Mawg