Jump to content

Morten Skovrup

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

4 Neutral
  1. Morten Skovrup

    TActionMainMenuBar (indirectly) kills Application

    @Kas Ob. Thanks a lot! - It helped narrow down the bug (looking in Call Stack helped - not sure why I didn't do that before...): The error comes from Vcl.ABAccessibility.TActionBarAccessibility.accHitTest. I'm not sure why it's called when YouDao is enabled - else it doesn't get called. In TActionBarAccessibility.accHitTest the following code generates the error (my comment) : function TActionBarAccessibility.accHitTest(xLeft: Integer; yTop: Integer; out pvarChild: OleVariant): HResult; var Pt: TPoint; Control: TControl; begin VariantInit(pvarChild); TVarData(pvarChild).VType := VT_I4; Control := nil; Result := S_FALSE; if FActionClient is TActionBarItem then begin Pt := FActionClient.ActionBar.ScreenToClient(Point(xLeft, yTop)); Control := FActionClient.ActionBar; if Control <> nil then begin pvarChild := TCustomActionControl(Control).ActionClient.Index + 1; //This line fails - TCustomActionControl(Control).ActionClient is not assigned! Result := S_OK; end; If the "if Control <> nil then" line is replaced by: if (Control <> nil) and (not (Control is TCustomActionMainMenuBar)) then Then the error is gone 🙂 Again thanks a lot (and I'll make sure to create a bug-report in QualityCentral)
  2. Hi, I have an application that fails on some Chinese systems. When I say fail, I mean that the program simply stops running - no warning, error or anything - main Window just disappears. I'm btw. using MadExcept and it never even gets triggered - the program just disappears... The reason is that the translation tool "YouDao" (http://dict.youdao.com/?keyfrom=cidian) is active. YouDao works by translating everything that's beneath your cursor when you move around on the screen (i.e. it probably tries to get hold of a handle of the control below the cursor and reads its text/caption property and then translates). It turns out that whenever the cursor hovers above an item in a TActionMainMenuBar (main item will do - for example "File" menu), the Delphi program fails when YouDao tries to get the text of the TActionMainMenuBar. A simple application with a TActionManager a TActionMainMenuBar and just one action will reproduce the error when YouDao is installed (actually the Delphi IDE fails the exact same way - the menu in Delphi IDE is a TActionMainMenuBar). And yes, it will solve all problems if users turn off YouDao, but YouDao is quite popular in China, so that's really not an option ;-). ebugging gives the following result: --------------------------- Debugger Exception Notification --------------------------- Project TestActionMainMenu.exe raised exception class $C0000005 with message 'access violation at 0x0046cb93: read of address 0x00000005'. And pressing "Break" leads to line 6062 in System.Classes (first line after begin): function TCollectionItem.GetIndex: Integer; begin if FCollection <> nil then Result := FCollection.FItems.IndexOf(Self) else Result := -1; end; So I assume that the object holding a TCollectionItem at this point has a dangling pointer... Pressing F9 just get the following (and thereafter entering loop to above place in code until pressing <Ctrl+F2>): --------------------------- Debugger Fault Notification --------------------------- Project C:\Projects\Win32\Debug\TestActionMainMenu.exe faulted with message: 'system exception (code 0xc000041d) at 0x004ded2f'. Process Stopped. Use Step or Run to continue. --------------------------- I've tried to put a breakpoint that leads to the error, but I haven't been able to find which Delphi method gets called when YouDao tries to read the TActionMainMenuBar item... One more hint (I don't know if it's useful at all): when I do remote debugging (using PAServer), then program does not fail - it seems like the remote debugger prevents YouDao from reading the text in the TActionMainMenuBar (this was my first try). But when the Delphi IDE is installed on the local machine, then debugging gives the above result. So my question is: a) Has anybody experienced anything similar and could give a hint on how to search for a place to fix the issue in TActionMainMenuBar? Or just a hint for a better debugging strategy... b) Alternatively suggest a replacement for TActionMainMenuBar (preferably something that looks like a standard menu) Thanks, Morten
  3. Morten Skovrup

    DPM Package Manager - presentation

    How about "Deliver". Have a go yourself at making it mean something - as for example "Delphi intelligent package manager" and then something with "version" 🙂
  4. Morten Skovrup

    Thinfinity VirtualUI - cloud-based conversion

    Example of a "large" VCL app (120 MB exe, using dll's, DB,...) running on VirtualUI. App is intended for desktop only, but VirtualUI allows to support users on MAC's, Linux... Works just fine, but needs a few more lines of code to handle uploads, downloads, etc. but it's doable. Resource use is heavy, but basically a matter of hardware on the server side. Go to: http://coolselector.danfoss.com/ and launch "Coolselector Online" a bit down the page.
×