Jump to content

Sue King

Members
  • Content Count

    35
  • 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

47 profile views
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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 ?
  7. Sue King

    IDE Fix pack for Rio

    My processor is AMD Phenom II X6 1090T. @Kryvich uData generates the error on my machine.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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;
  13. Sue King

    Using dxgettext on Windows 10

    A bit more information. The test app I was using was a sample demo from Nexus that I'd modified to test some units I'd written. To eliminate my code, I went back to the original demo. The problem still occurs, but it may have shed more light on what is happening. In gnugettext.pas, I enabled the HookLoadResString and changed TGnuGettextInstance.LoadResString to Result := 'fred'; This resulted in the app closing properly. Result := ResourceStringGettext('fred'); Resulted in the problem. Putting in some outputdebugstrings, it appears that it is going into a loop calling LoadResStringW. Looking at the Nexus code in the debugger I think at this stage it might be raising a silent exception which is calling LoadResStringW and maybe that is generating an exception somewhere and it is going into a never-ending loop. More time in debugging may pin it down a bit more. Unfortunately my day was unexpectedly interrupted and I haven't been able to do more than this. I may not have more time until mid-next week to do much on it. Things will be a bit unpredicable for the next few days, but if there is anything you can suggest for me to do, I'll do my best to find the time as I'd like to get to the bottom of it. Sue
  14. Sue King

    Using dxgettext on Windows 10

    I haven't done any more on it. I thought I would leave it for a bit and come back to it. I can use the latest version providing I disable HookLoadResString.Enable; I'll have another look today. This is the first time I've needed to look at hooking, so it is new territory for me. The actual code looks OK, but something must be going on that isn't.
  15. Sue King

    Installing Mobile on 10.3..

    Although I have the mobile platforms now, it isn't available for some projects that have been updated. I thought about submitting a case about it, but there are other similar cases listed and I can't wait for a fix, so I'll recreate the .proj files and sort it out that way. I've also found that I can't use IDEFixPack or install ProjectMagician, so there is something odd about the installation. It was installed into a new VM, so there are no upgrade issues. However I am able to move on to new work so that is good. Apart from the way the IDE jumps around the screen, I like working with Rio. That path problem is has been around for years. Pity they can't do something about it. I'm not sure I actually helped with the problem, but I do find it encouraging when I have problems and people have suggestions and comments. Cheers, Sue
×