Delphi crash and Delphi hang

I installed the latest release today and continued with an existing project group. Small REST web service app group with 5 projects: VCL, FMX and Intraweb (all REST services clients) plus a REST web services server, 1 for IIS and one VCL GUI for method(s) testing.

Codebot:

  • correctly analysed the group and correctly documented each project function
  • completed a request build all projects and fix all errors
  • completed a request to advise recommended refactoring to be performed
  • go to start the recommended refectoring: CRASHED (meaning killed) Delphi 13.1 after few minute
  • restarted Delphi and loaded the project
  • I manually resumed the refactoring: Delphi hung and I killed Delphi after about 10 minutes

… I restarted Delphi and opened the same project

Then requested Codebot continue where it left off but I needed to manually prompt what the next task is. After a short time (less that 2 minutes) my whole dev computer hung and after about 5 minutes I did the “10 second Power Button” shutdown.

Picture before power button shutdown;

Thankyou. This one is highly worrying, plus puzzling - we have not reproduced in-house.

May I ask for a favour please? If it occurs again, could you:

  • Start a second copy of Delphi
  • Go to Run > Attach to Process
  • Select the other bds.exe (the Attach button won’t be enabled for your own instance, so if you see Attach enabled when you select a bds.exe, that’s the right one) and click Attach
  • Paste the call stack for the main thread, usually the first one in the Threads view?

Many thanks!

David,

I hope this is what you are looking for:

:75c9123c win32u.NtUserWaitMessage + 0xc
:586e720a TApplication.Idle + $14E
vcl.Vcl.Forms.TApplication.HandleMessage
vcl.Vcl.Forms.TApplication.Run
:00962bb3 ; C:\Program Files (x86)\Embarcadero\Studio\37.0\bin\bds.exe
:759f5d49 kernel32.BaseThreadInitThunk + 0x19
:77aae00b ꂰ妴㢄姁.RtlInitializeExceptionChain + 0x6b
:77aadf91 ; ꂰ妴㢄姁

Let me if there is anything else.

Thank you — that is helpful.

The call stack you posted shows the main UI thread sitting in Delphi’s normal message loop / idle processing:

NtUserWaitMessage
TApplication.Idle
TApplication.HandleMessage
TApplication.Run

So unfortunately it does not yet show the code path that is actually doing the work or causing the stall. In other words, it suggests the busy or blocked work may be happening on another thread, or that we captured the IDE while it was idle rather than while the problematic operation was actively executing.

If you can reproduce this again, the most useful extra information would be:

  1. In the attached debugger, look at the full Threads list and see whether any non-main thread is active/busy.
  2. Paste the call stacks for:
    • the main thread, and
    • any worker thread that looks active, repeatedly changing, or not waiting in a normal sleep/wait state.
  3. If possible, tell us the exact prompt/request you gave CodeBot immediately before the crash/hang.
  4. Also useful:
    • whether this happens on the same project every time,
    • whether it happens only during refactoring/editing (vs analysis/build/fix),
    • approximate project size / number of units,
    • whether the issue is reproducible after a fresh Delphi restart.

If you are able to narrow it down to a specific prompt or project action sequence, that would help us a lot, because we have not reproduced this in-house yet.

One more practical suggestion: until we understand this better, I’d recommend avoiding large multi-file refactoring requests in one step on that project, and instead asking for smaller scoped changes (for example, one unit or one refactoring step at a time).

Thanks again — if you can capture the stacks for all active threads next time, that will likely give us a much better lead.

I uninstalled CodeBot using Revo with a registry and files deep clean.

Then again installed CodeBot.

Been working for about 2 hours without issues.

I will report any other issues


I understand but FYI:

Error: 403: Forbidden - {
“error”: “Insufficient credits”,
“message”: “This request needs at least 100 available credits before it can be accepted. You currently have 0 credits available. Reference: 3E0443020DE5”,
“correlationId”: “3E0443020DE5”
}

Thanks — that 403 is a different issue from the original Delphi crash/hang problem.

This message:

"Insufficient credits"
"This request needs at least 100 available credits before it can be accepted."

means the request is currently being blocked because the account has no available CodeBot credits left.

For the beta, the fix is simple: please go back to the purchase page and “purchase” the beta license again. It is free, and doing that will refill the credits for your beta account.

So in short:

  • the crash/hang thread is one issue
  • the current 403 error is a separate credits/account state issue
  • repurchasing the free beta license should restore the credits and let you continue testing

Please try that and let us know if the credits still do not refill afterward.

Logged as bugs://C78.

where/how do i repurchase

You can just go back to the beta purchase page and “purchase” the beta license again — it is free, and doing that should refill the credits for your beta account.

If you can’t find the page, let us know and we can point you to the right link.

bugs://C78 was closed as fixed.