Jump to content

Sue King

Members
  • Content Count

    38
  • Joined

  • Last visited

Community Reputation

5 Neutral

About Sue King

  • Birthday 12/26/1951

Technical Information

  • Delphi-Version
    Delphi 10.1 Berlin

Recent Profile Visitors

80 profile views
  1. Sue King

    Alternative directory for .drc & .map files?

    You could compile to the source/development directory and use Build Events after compile to copy it to the Applications folder for testing.
  2. Sue King

    Using dxgettext on Windows 10

    R124 does not show the problem in the test application. All versions until R47 do show the problem. R47 does not. I have been able to get R115 working by commenting out HookLoadResString.Enable. In earlier versions that didn't work, there were different changes I made that 'fixed' the error. It seems to me that under most conditions the error doesn't show, but when it does, its symptoms are unpredictable. The test that @dummzeuch created generating exceptions in a multithreaded application (which is what is happening in the demo) did not create the right conditions to show the error. The nexus code is very much more complex. @mael The test program is one of the example projects provided by Nexus. It is in Examples->Delphi->Remoting->Client to Client Messaging. I have simply added gnugettext.pas to the project. To generate the problem, Click on Connect and then Disconnect. The program stops responding and has to be killed as it generates a never ending loop trying to close sockets used for messaging. I think you should be able to recompile this example with the trial dcus. I've posted nexus to confirm this but haven't had a response yet.
  3. Sue King

    Using dxgettext on Windows 10

    I have found a possible solution to this. In TGnuGettextInstance.dgettext I replaced UTF8Decode with UTF8ToUnicodeString Is there any reason why UTF8ToUnicodeString could not be used instead of UTF8Decode ? As far as I can see the difference is that UTF8Decode returns a widestring, and UTF8ToUnicodeString returns a UnicodeString, which is what the result field is defined as. Does this mean there is an extra conversion from WideString to UnicodeString that might be causing the issue ?
  4. Sue King

    Using dxgettext on Windows 10

    This test does not show the problem. I was about to try something multi threaded myself, so I'm using your test as a base and looking at the code that does fail to try and make your test more like the failing test. This is giving me more insight into the code that is actually failing so I will try again to catch the exception that shows in the call stack. In the test I'm running, I am not calling any of the gnugettext functions directly, like AddDomain. It is a Nexus demo with gnugettext.pas added to the dpr. All calls to gnugettext are done indirectly using LoadResString (as far as I can see). There are also no .mo files for translating. Nexus hooks into the exception handler and has its own processing of exceptions before they are raised. Early versions of gnugettext did not cause issues. I did do some investigating to see when the problem was introduced, which I think I mentioned in an earlier post. I took another approach to see if it is related to the processor - trying it on another machine that has an Intel processor, not an AMD. It still goes into a loop, so that rules that idea out.
  5. Sue King

    Using dxgettext on Windows 10

    I don't think that the IDEFixPack has anything to do with gnugettext translations. I was wondering if the bug found in IDEFixPack might also be in some assembler called somewhere by something in gnugettext. It was a long shot as the bug is related to converting utf8 strings.
  6. Sue King

    Using dxgettext on Windows 10

    This might be completely off beam, but I thought it worth raising. There was a problem in IDEFixPack with some older AMD processors which involves converting UTF8 strings. Quoting from the thread about this issue : << This fixes the usage of a SSE 4.1 CPU instruction ("ptest") in a code block that only checked for SSE 2. A function that converts UTF8Strings that contain only ASCII characters to UnicodeStrings used an SSE 4.1 CPU instruction. But the SSE instructions are only used if there are more than 15 characters in the UTF8String. >> Might this relate to the problem I'm having with gnugettext ? In the context of IDEFixPack, the bug caused older CPUs to throw 0xC000001D "illegal instruction" exception. I'm not seeing the exception, but I think there is an exception in the call stack that I haven't yet been able to capture as it occurs.
  7. Sue King

    IDE Fix pack for Rio

    @Kryvich In one of my tests I opened the dfm in Notepad++, changed the encoding from UTF-8 to ANSI and made another change so that it was saved. This didn't change anything. I normally have my dfm's as text - my issue was with a form, not a datamodule, though I doubt that makes any difference. I tried converting the dfm to binary, saving and then converting back to text, but it didn't make any difference with the previous version installed. I'm just happy now that I can use the pack - the IDE loads so much better.
  8. Sue King

    IDE Fix pack for Rio

    Wow ! I would never have found that in my attempts to see what was going wrong. Many thanks.
  9. Sue King

    IDE Fix pack for Rio

    @jbg I have tested uData.pas as well as a couple of my other projects. All good. Many thanks for this fantastic helper. I am curious though. On Friday I created a new project in Rio that was very similar to one that showed the problem. The new one loaded without any problem. I was in the process of trying to make the projects as similar as possible to see what was different. The sample form I was about to load up was very simple, and quite different to uData.pas. Do you know what it was that triggered the error in some conditions but not others ?
  10. Sue King

    IDE Fix pack for Rio

    My processor is AMD Phenom II X6 1090T. @Kryvich uData generates the error on my machine.
  11. Sue King

    Using dxgettext on Windows 10

    I've asked on the Nexus forum about this, posting this call stack from the debugger. gnugettext.TGnuGettextInstance.LoadResString($676444) gnugettext.LoadResStringW($676444) nxllUtils.nxRaiseLastOSError(True,0) nxtwWinsockTransport.TnxWinsockClientConnection.DoRecv((no value),32) nxtwWinsockTransport.TnxWinsockClientConnection.Read((nxptBasePooledTransport.TnxBasePooledTransport.btMessageReceived,$7E790030)) nxptBasePooledTransport.TnxBaseCallbackThread.InnerExecute nxllThread.TnxInternalInitThread.DoExecute nxllThread.TnxThread.Execute nxptBasePooledTransport.TnxBaseCallbackThread.Execute :0047a030 ThreadProc + $4C :00409e7e ThreadWrapper + $2A :76d1fe09 KERNEL32.BaseThreadInitThunk + 0x19 :77d0662d ntdll.RtlGetAppContainerNamedObjectPath + 0xed :77d065fd ntdll.RtlGetAppContainerNamedObjectPath + 0xbd This sequence is repeated for each time through the endless loop. The translated text first time through is '[unknown]'. If I don't actually The suggestion was that maybe there is something in LoadResString that causes issues when called in the context of a different thread. The Nexus code I'm trying to use has multiple threads involved so maybe there is a race condition somewhere.
  12. Sue King

    IDE Fix pack for Rio

    32 bit compiler, I'll see if I can narrow it down a bit and create a sample project that shows the error.
  13. Sue King

    Using dxgettext on Windows 10

    I've spent some hours in the debugger trying to see what is going on. Unfortunately the Nexus code is multi-threaded and it makes it hard to follow what is going on. Before I go back to them, I've played around with the code inTGnuGettextInstance.dgettext. It seems as though calling utf8encode, and then utf8decode can trigger the looping, but it may be that something is happening that I don't understand. That is, changing to code to add var lResult: UnicodeString; lUTF8String: UTF8String; begin ... end else begin lUTF8String := utf8encode(szMsgId); lResult := UTF8Decode(lUTF8String); Result := szMsgId; ... causes the loops. While running, if I jump over the utf8decode in the debugger (4 times), it then completes. If utf8decode is not called it works fine. I noticed that while it is looping, the message is [unknown]. When I skip the utf8decode with the debugger, it shows [Operation aborted] the first 2 times through, and then '[unknown]' the next 2 times, and then doesn't need to call it again as it has completed whatever it is doing successfully. If this doesn't give you any clues, then I'll talk to Nexus. I wanted to do all I could before raising it with them. At the moment, I've think I reached the end of my knowledge with trying to debug this. The call stack in the debugger doesn't appear helpful. Thanks for looking at this.
  14. Sue King

    Using dxgettext on Windows 10

    Thanks for the explanation about why the changed test isn't a fix. From what I can see in the debugger, it is not an error in finalization - the process is not being terminated when the error occurs. The loop involves repeatedly calling ResourceStringGettext. The test app has a class that uses a winsock. Something is happening when the winsock is closed that causes a loop, possibly an exception getting a string. The workarounds I've tried mean I can open and close the socket multiple times in the app. Without it, the app hangs on the first close. This version does not help.
  15. Sue King

    Using dxgettext on Windows 10

    Nexus does not hook that function. I have checked with the Nexus team. I have found a work around in gnugettext.pas. In TGnuGettextInstance.ResourceStringGettext add a test for refcount = 0 so that it starts with if (MsgId='') or (ResourceStringDomainListCS=nil) or (ResourceStringDomainListCS.RefCount=0) then begin Result := MsgId; exit; end;
×