Assertion failure ..\win32src\thread32.cpp at line 434
For the ones who are using Delphi 2009 under Windows 7 (64-bits), this error will show up during the debugging of your applications. This just happened to me today and I found a really interesting solution on Embarcadero's Forums. This just happened to me few days ago and I thought it was normal because of the OS, but then I realised that something was going wrong and every minute I got that annoying message leaving my applications non-functional and with the problem of restarting the Delphi IDE again.The solution provided is quite easy and I can guarantee you that it works!.
First of all, you need an hexadecimal editor. I used mh-nexus, an open source version that you can get from here. Then the steps for solving the issue are the following ones:
1. Close Delphi
2. Locate bordbk120N.dll (C:\Program Files (x86)\CodeGear\RAD Studio\6.0\bin)
3. Make a backup of the library (just in case).
4. Open bordbk120N.dll with mh-nexus and locate the hex values: “01 00 48 74 47 80 3D”
5. Replace “74” with “EB”and save the changes.
6. Restart Delphi and the error message should be gone.
Related links:
Thanks, I still working with 32-bit, but this solution is a thing to have present, especially because the new computers going with W7.
ReplyDeleteHow on earth did you figure that out? To go change one byte in a single DLL?
ReplyDeleteHi,
ReplyDeleteThat was done by researching on the crashing exception. Then I found a post that more o less was talking about this and I´ve just added more information about it.
I hope it helps.
Regards,
Jordi
Perfect, thanks. It worked great under Windows 7 x64. Boy, was this an annoying problem!
ReplyDeleteHi
ReplyDeletethe patch is not working for me, so please, if anyone knows the string I have to change in the file : bordbk105N.dll
I appreciate a lot your help.
Best regards
Fernando
Hi Fernando,
ReplyDeleteThis patch only works for Delphi 2009, and the file that you need to edit is bordbk120N.dll. I think that the file you are referring bordbk150N.dll is from Delphi XE version.
Regards,
Jordi
Try to use the patcher from the following link and see if it works: Delphi_2007_2009_WOW64_Debugger_Fix.zip
ReplyDeleteHello Jordi
ReplyDeleteI have solved the problem. I had used the patch before but not as admin. Some minutes ago I tried this option and my file has been patched succesfuly. Now my delphi 2007 is working fine.
Best regards!!
Fernando
Was getting this same debugger error and stumbled across this thread. Using Delphi 2007 on Win 7 - 64 bit, worked like a charm. Thank you.
ReplyDeleteKeith
What this replacement means? what was wrong and we try to correct it?
ReplyDeleteHi I don't really know the exact details but it seems that it was just a bug.
DeleteI disassembled the code in question. What this patch does is effectively remove a conditional branch.
ReplyDeleteThe code is not checking the return value of the Windows function SetThreadContext correctly. According to MSDN, SetThreadContext returns a zero or non-zero value, but the code checks to see if it equals 1. This may not be the source of the problem, though.
// before patch
if (SetThreadContext(hThread, &Context) == 1)
{
DWORD err = GetLastError();
// ...
}
// after patch
SetThreadContext(hThread, &Context);
Documentation on SetThreadContext
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680632(v=vs.85).aspx
Hi Mike,
DeleteYes, it makes sense. Thanks for your input on this.
Jordi
It works on WIN 10-64
ReplyDeleteThank you!
Martin
It works on WIN 10-64
ReplyDeleteThank you!
Martin
It works on WIN 10-64
ReplyDeleteThank you!
감사합니다.!
Had to reinstall Delphi 2007 on a new WIN 10-64 machine, got the Assertion Fail and this fixed it. Thanks a million.
ReplyDelete