Jump to content

terran

Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. terran

    "Divided by zero" exception

    It wasn't enough for them to have undefined behavior in C that you decided to put it in Pascal? OLE objects are not common use. Don't know anything about thread-safety and mask at every call. Why not mask once if you need this? Again, whose fault is it that "FPCR" (what's that?) is still not thread-safe? Okay, customers will no longer complain about "zero divide" exceptions, but they also will not complain about "not catched" exceptions either, because they will not notice them, for the time being. SO it's a win-win strategy.
  2. terran

    "Divided by zero" exception

    99% off-top here. My project is not throwing a "Divide by zero" exception. Delphi 12. The project is not a DLL. The project was created from scratch file->new project. Why do I have to set a so-called "exception mask" when I didn't have to in the previous version? What else, along with the masks, should I set to get it back to how it should work by default? You shouldn't talk about masks, but about the fact that it creates UB. This is not what Pascal should do.
  3. terran

    Memory leak on TParallel.For

    Probably it has exception in System.Threading that is not passed to the program, and the worker threads are waiting in a deadlock. That's all I know. Possible place somewhere here (System.Threading, 3535): Signaled := TMonitor.Wait(ThreadPool.FQueue, WaitTime) and not ThreadPool.FShutdown; Possible stack somewhere here: :7785f8d1 ntdll.ZwWaitForSingleObject + 0x15 :75e51194 kernel32.WaitForSingleObjectEx + 0x43 :75e51148 kernel32.WaitForSingleObject + 0x12 System.SysUtils.WaitForSyncWaitObj(???,???) System.SysUtils.WaitOrSignalObj(???,$9C40,???) System.TMonitor.Wait($73E9040,40000) System.TMonitor.Wait(???,40000) System.Threading.TThreadPool.TQueueWorkerThread.Execute System.Classes.ThreadProc($728E3A0) System.ThreadWrapper($728A850) :75e5343d kernel32.BaseThreadInitThunk + 0x12 :77879812 ntdll.RtlInitializeExceptionChain + 0x63 :778797e5 ntdll.RtlInitializeExceptionChain + 0x36 That's all I know. DLL It is not used when thread loaded/unloaded. If I didn't answer something, then it did not help, or I didn't understand. That's all I know. 1. No my code after start of thread. 2. It happens (even) on empty loop.
  4. Memory leak on TParallel.For it happens on empty TParallel.For TParallel.For(0, 10, procedure(yy:integer) begin for var xx:=0 to 10 do begin end; end); No my code in stack. No "minimal (non)-reproducible example" can be done. It's a DLL, and it does its job inside a third-party application. MemoryManager_EventLog.txt
  5. I meant this: "PChar(S[Length(S)])". There's no point of using CharPrev of next char of required.
  6. What's the difference? Zero-based strings not used. Probably it was compiled with range check disabled.
  7. What does this string mean? function PathLastChar(const S: String): PChar; { Returns pointer to last character in the string. Is MBCS-aware. Returns nil if the string is empty. } begin if S = '' then Result := nil else Result := CharPrev(Pointer(S), @S[Length(S)+1]); end; I got Range Check Error, because it's uses Length(S)+1. And why Pointer? This function was used in InnoUnpacker, and worked for others (why?). I replaced it to PChar(S[Length(S)]);. So why it worked before?
  8. terran

    Recursive anonymous functions

    Can anyone explain about memory leak? Is it not deleted when exiting function? Need more examples.
  9. terran

    Buggy auto-completion

    On a small projects, the hints (list of parameters) don't disappear. It lacks the performance of a PC and keyboard repeat speed. It could collapse on a standard function like enddate:=EncodeDateTime(2022,8,11,0,0,0,0); but in a big project. Not that big. About 5k lines. It doesn't (dis)appear when keyboard repeat speed is set to slow. where can it be reported (to) this thing? i have read that their quality portal has 'changed', and now it doesn't contain anything except a single page. where can i read existing reports? i have to report to a nowhere. has anyone done this, and had a result?
  10. When I press "(" on a long function, the list of parameters appears. When I hold the Right Arrow to highlight the next params, it disappears! Too bad that my keyboard repeat speed is set too high! The Delphi cannot keep up with the cursor movement. When I press "(" when text is selected, it inserts "(" ")" between the text. I tried to disable auto-parenthesis and auto-completion, but it does not help. I press "(" inside selected symbol "(" in begin of a (already printed) function to open param list (i don't know how to open it), then my "(" should replace existing selected "(" and param list will be opened, and the Text will remain the same. I did it every time! Select the "(" in begin of a (already printed) function with Shift+Arrow, press "(" and you get the popup hint! Too stupid? But now in inserts the "(()"! Please help! That's a bug! Delphi 11.
  11. 1. Plugin for Total Commander (32-bit). Total Commander is a Host App, plugin is a DLL. 2. Win7 / Delphi10 3. Plugin is running in separate thread (this is not documented, but can be seen in process explorer) 4. Error in plugin (infinite loop, as it turned out later) 5. CPU window shows not my plugin's code, or even thread, but the Host App's thread 6. No possibility to switch to another thread, or find out about its existence 7. No My or Host App's code when Step over/Trace into (F7/F8), only ntdll.dll ? 8. ???
  12. It hangs on this line when pressing F7: ntdll.NtQueryInformationThread: 77E9FC08 B822000000 mov eax,$00000022 77E9FC0D 33C9 xor ecx,ecx 77E9FC0F 8D542404 lea edx,[esp+$04] 77E9FC13 64FF15C0000000 call dword ptr fs:[$000000c0] 77E9FC1A 83C404 add esp,$04 77E9FC1D C21400 ret $0014 Stack: :77e9fc1a ntdll.NtQueryInformationThread + 0x12 :77f1f3fd ntdll.DbgUiRemoteBreakin + 0x53 :7675343d kernel32.BaseThreadInitThunk + 0x12 :77eb9812 ntdll.RtlInitializeExceptionChain + 0x63 :77eb97e5 ntdll.RtlInitializeExceptionChain + 0x36
×