-
Content Count
437 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Cristian Peța
-
Have you checked https://github.com/pleriche/FastMM5/activity?ref=master ? Latest commit is 6 nov. "Handle a potential race condition in FastMM_DetectClassInstance: If another thread frees a block while it is being evaluated as a potential class then an A/V could occur. This indirectly affects other functionality, like FastMM_LogStateToFile." You can download sources if you don't use git to clone repository: https://github.com/pleriche/FastMM5/archive/refs/heads/master.zip
-
Windows or something else? You can try to delete .dproj and see if that helps.
-
This is all we need to reproduce? Can you reproduce in a small test project?
-
Windows Arm is still not ready. It is still in the cook.
Cristian Peța replied to Juan C.Cilleruelo's topic in Windows API
Personally I wouldn't buy Windows ARM because incompatibilities. 20 hours without charge is nice but is not a must have for me. -
Windows Arm is still not ready. It is still in the cook.
Cristian Peța replied to Juan C.Cilleruelo's topic in Windows API
Apple is giving you no choice. With Windows people can choose and there are not so many eager to embrace this change. -
Copy table data between two different databases.
Cristian Peța replied to Jeff Steinkamp's topic in Databases
Maybe I'm wrong, but CopyDataSet doesn't use ArrayDML. Only if speed matters. -
Delphi 11.3 I have a project that when built for Debug Win64 the blue dots are where there should be but when I run with debugging the blue dots are shifted upwards and do not stop if I put a breakpoint. For Win32 is working as expected. All other projects I tried do not have this issue. First image is before run, second is after run. The blue dots are how they should be but shifter upwards. I tried to delete and recreate again dproj file. Same behavior. I checked and endings are with CR-LF. All units in the project are affected. The shift is more or less upwards somehow depending on the unit size. Same units (files) used in other projects do not have this issue. Issue is linked somehow only to one project. I appreciate any advice.
-
Debug for Win64 - blue dots are shifted
Cristian Peța replied to Cristian Peța's topic in Delphi IDE and APIs
Probably something went wrong with first attempt to recreate dproj file. I tried again to delete it and now debugging works for x64. -
Debug for Win64 - blue dots are shifted
Cristian Peța replied to Cristian Peța's topic in Delphi IDE and APIs
Thank you. In this project I have included units from packages that for sure are not rebuilt for x64. Building the project works because I have included all the files from packages but there are old .dcu files from building the packages. Will try tomorrow to rebuild all packages also for x64. Usually I'm doing this only for x32. I need to debug for x64 because it behaves different from x32 and debugging with messages and so on is so painful and slow. -
The first will not ensure that lTstrings will be freed. I would use the second but with TThread.Synchronize() because Queue() will continue the execution and lTstrings will be freed most probably before it will be used.
-
I also had issues with iOS platform in the past and solution was to install MacOS platform too.
-
Do you have same WAN IP on both machines? There was a case where someone used a VPN internet connection and his WAN IP was from other country and who knows for what this IP was used for and rejected by some server firewalls.
-
Attached. Wanted to try also with Delphi 11.3.1 but something is wrong in my environment because also an empty app do not install (package invalid). No time to dig just now into this. aTestApp.dpr P.S. But nothing special regarding FMX or Android. Just added "..\" to all files and new units to the project.
-
Just tried with Delphi 10.4.2 the demo project aTestApp and is working very nice on Android 13. But dpr do need to be a little updated because some folders moved and there are some new library units not included into the project.
-
I suppose the test app is crashing. But you need the library and it is not so hard to use. fScanBitmap is a FMX.Graphics.TBitmap ScanManager := TScanManager.Create(TBarcodeFormat.Auto, nil); try ReadResult := ScanManager.Scan(fScanBitmap); finally ReadResult.Free; ScanManager.Free; end;
-
Can ICS thread cause memory violation? (EOutOfResources error)
Cristian Peța replied to PizzaProgram's topic in ICS - Internet Component Suite
This probably means that there is no memory leak but memory fragmentation. You have 118MB memory split into thousands of block separated by small free blocks. @PizzaProgram if fragmentation then this can be solved by running as 64 bit. Are you not using 4 GB? {$SetPEFlags $0020} // Winapi.Windows.IMAGE_FILE_LARGE_ADDRESS_AWARE { App can handle >2gb addresses } Or better try 64 bit if possible.- 76 replies
-
- thread
- eoutofresources
-
(and 2 more)
Tagged with:
-
Path1.Data.FlattenToPolygon will return an array of points. Use DistanceFromPointToLine procedure LineEcuation(var a, b, c: Double; x1, y1, x2, y2: Double); begin if Abs(x1*y2 - x2*y1) < 1E-20 then begin if (Abs(x1) > 1E-20) or (Abs(x2) > 1E-20) then begin//Ecuation a*x + y = 0 if (Abs(x1) > 1E-20) then a := -y1 / x1 else a := -y2 / x2; b := 1; c := 0; end else begin//Ecuation x = 0 a := 1; b := 0; c := 0; end; end else begin//Ecuation a*x + b*y + 1 = 0 b := (x2 - x1) / (x1*y2 - x2*y1); a := (y1 - y2) / (x1*y2 - x2*y1); c := 1; end; end; //X0, Y0 point //Xd1, Yd1, Xd2, Yd2 - points of the line function DistanceFromPointToLine(X0, Y0, Xd1, Yd1, Xd2, Yd2: Double): Double; var a, b, c: Double; begin LineEcuation(a, b, c, Xd1, Yd1, Xd2, Yd2); Result := Abs(a * X0 + b * Y0 + c) / Hypot(a, b); end; I also think so.
-
Splitting up quotes doesn't work anymore
Cristian Peța replied to Remy Lebeau's topic in Community Management
For years I asked me how are you doing this. Now i know. Then I found a solution that I supposed you are using: if you still see the message that you want to quote after starting your message then you can go to that post, insert the text and press "Quote selection". It will insert the quote where the cursor is in you new message. I have not tried if this works going back on an other page. -
Delphi 11.3, issue after encrypting exe file -> bad symbols @ GUI
Cristian Peța replied to o815's topic in Delphi IDE and APIs
If not encrypted is working (it is?) then must to be the encryption-decryption that is changing something. -
combining two characters to a string switches them
Cristian Peța replied to dummzeuch's topic in RTL and Delphi Object Pascal
It is because calling convention Right-to-left parameter order? -
combining two characters to a string switches them
Cristian Peța replied to dummzeuch's topic in RTL and Delphi Object Pascal
Project1.dpr.20: s := ReadChar1 + ReadChar2; 0008E605 E8BEFFFFFF call $0008e5c8 0008E60A 8BD0 mov edx,eax 0008E60C 8D45EC lea eax,[ebp-$14] 0008E60F E8289CFEFF call $0007823c 0008E614 8B45EC mov eax,[ebp-$14] 0008E617 50 push eax 0008E618 E897FFFFFF call $0008e5b4 0008E61D 8BD0 mov edx,eax 0008E61F 8D45E8 lea eax,[ebp-$18] 0008E622 E8159CFEFF call $0007823c 0008E627 8B55E8 mov edx,[ebp-$18] 0008E62A 8D45FC lea eax,[ebp-$04] 0008E62D 59 pop ecx 0008E62E E8B59DFEFF call $000783e8 First call to $0008E5C8 is ReadChar2. It is with '5'. Project1.dpr.10: begin 0008E5C8 55 push ebp 0008E5C9 8BEC mov ebp,esp 0008E5CB 51 push ecx Project1.dpr.11: Result := '5'; 0008E5CC 66C745FE3500 mov word ptr [ebp-$02],$0035 Project1.dpr.12: end; 0008E5D2 668B45FE mov ax,[ebp-$02] 0008E5D6 59 pop ecx 0008E5D7 5D pop ebp 0008E5D8 C3 ret 0008E5D9 8D4000 lea eax,[eax+$00] -
combining two characters to a string switches them
Cristian Peța replied to dummzeuch's topic in RTL and Delphi Object Pascal
But ReadChar2 is called first and will read the first char from file -
combining two characters to a string switches them
Cristian Peța replied to dummzeuch's topic in RTL and Delphi Object Pascal
Probably I do not understand something and you code do not compile for me. This is working as expected for me. It will show "OK". PS. Now I understand: ReadChar2 is called first and will read the first char from file. uses System.SysUtils; function ReadChar1: Char; begin Result := 'P'; end; function ReadChar2: Char; begin Result := '5'; end; procedure ReadHeader(out _w, _h, _Depth: Integer); const PGM_Magic_Number = 'P5'; var s: string; begin s := ReadChar1 + ReadChar2; if s <> PGM_Magic_Number then raise Exception.Create('File is not a valid PGM file:') else Writeln('OK'); end; var _w, _h, _Depth: Integer; begin ReadHeader(_w, _h, _Depth); Readln; end. -
There is TUniImage.ClientEvents.ExtEvents.mousemouve where you can write some JavaScript. In this script you can call to execute the TUniImage.OnAjaxEvent event calling ajaxRequest(sender, 'eventname', ['param1=value1']) from JavaScript
-
TParallel Version and TTask Version
Cristian Peța replied to stacker_liew's topic in RTL and Delphi Object Pascal
TParallel.For will not start 1000 threads so fast like a for loop but will use a thread pool and wait for a thread to finish before starting an other.