![]() |
PosEX dosn't work on 64-bit - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: PosEX dosn't work on 64-bit (/thread-3669.html) |
PosEX dosn't work on 64-bit - mondoedp - 11-30-2023 Hello, I'm just trying new 15.5.2 version that resolved some issues. I use Delphi 10.2 Tokyo. Going forward on my tests, I noticed that, when I compile in 64-bit platform, the function StrUtils.PosEx doesnt'work properly. (I don't call it directly, but it's used (for example) in System.IOUtils (TPath, TDirectory, TFile)). By example: PosEx(':','C:\SVN\Mydirectory',3) return 2 (that is the right value if I call PosEx(':','C:\SVN\Mydirectory',1)) while it must return 0 (as 32-bit does). Also notes that in a normal vcl application (no-intraweb) it works in 64-bit too. Perhaps it depends by some directive but I wasn't able to find it. Could you have a check? Thanks Alberto Pilat RE: PosEX dosn't work on 64-bit - rlebeau - 11-30-2023 (11-30-2023, 11:20 AM)mondoedp Wrote: By example: That is something you need to report to Embarcadero, AToZed has no control over those RTL functions. FWIW, I can't reproduce what you describe in Delphi 12. PosEx(':','C:\SVN\Mydirectory',3) returns 0 in 64bit, as expected. RE: PosEX dosn't work on 64-bit - jeroen.rottink - 12-01-2023 Hi Albert, Intraweb replaces the RTL functions Pos and PosEx for the 64-bit platform. This is done by IW_ApplyRTLPatch(). Code: // Std RTL functions Pos() and PosEx() are EXTREMELLY SLOW on x64 All calls are redirected to IW.Common.Strings.IWPosEx. That said. I tested it with IW15.4.2 on both 32-bit and 64-bit and both produce 0 as a result. Calling IWPosEx directly also results in 0. Attached my testcase. RE: PosEX dosn't work on 64-bit - mondoedp - 12-01-2023 (11-30-2023, 10:38 PM)rlebeau Wrote:(11-30-2023, 11:20 AM)mondoedp Wrote: By example: Thanks Remy but, as I said, the normal behavior outside intraweb application works good. The problem with PosEX happens in IW applications, so it's why I posted here the problem. Now I'll try the patch as suggested by Jeroen. Regards. (12-01-2023, 09:54 AM)jeroen.rottink Wrote: Hi Albert, Thanks Jeroen, but it still doesn't work. I think the bug was introduced in 15.5.x (in 15.3.12 it worked for sure). Do you have the possibility to test your case with 15.5.2? Regards RE: PosEX dosn't work on 64-bit - jeroen.rottink - 12-01-2023 (12-01-2023, 11:22 AM)mondoedp Wrote: Thanks Jeroen, No, I can't use IW15.5.2 currently. I have to release a project soon and don't want to change frameworks etc if not needed. So my testcase in your environment doesn't produce two times 0? RE: PosEX dosn't work on 64-bit - mondoedp - 12-01-2023 (12-01-2023, 04:26 PM)jeroen.rottink Wrote:(12-01-2023, 11:22 AM)mondoedp Wrote: Thanks Jeroen, Exactly, IWPosEx ever return 0, while PosEX continue to return 2. (in 15.3.12 they both return 0 and I assume that it's correct till 15.4.2). I wait for some action from Alexandre Machado... RE: PosEX dosn't work on 64-bit - mondoedp - 12-11-2023 Hi Alexandre, are you able to have a look on the notified problem? Thanks RE: PosEX dosn't work on 64-bit - Alexandre Machado - 12-12-2023 I'll have a look and get back to you ASAP RE: PosEX dosn't work on 64-bit - Alexandre Machado - 12-12-2023 The issue has been fixed. We will deliver an update very soon. Cheers, RE: PosEX dosn't work on 64-bit - Alexandre Machado - 12-12-2023 Hi Alberto, this issue has been fixed in the new update 15.5.3. This was broken due to a wrong compiler directive that needed to change because of the FPC compatibility. As a positive consequence, we took care to include your test case and a few others in our unit test suite to prevent such issues in the future. |