Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Locking up on FreeDC

edited September 2007 in General
Hi,

I'm encountering a problem that appears to be happening in the unit
ppPrintr.pas (Line 3432) where it is causing the application to freeze:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

procedure TppCustomPrinter.FreeDC;
begin

if FDC = 0 then Exit;

if FCanvas <> nil then
FCanvas.Handle := 0;

DeleteDC(FDC); <<< Freezes / Hangs Here
FDC := 0;

end; {procedure, FreeDC}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -


This doesn't happen all the time, but seems to occur on the odd occasion.
I'm currently using Delphi 7 on a Windows XP workstation with v10.06.

(I've noticed doing a search on the newsgroups that a similar problem was
posted on Fri, 18 Mar 2005 by "Misha Oumantsev", but no resolution was
posted.)

Can you please tell me if you're aware of this problem or if their is a fix?

Thanks & Regards

Adam.

Comments

  • edited September 2007
    This not a known issue.

    Does it happen at Delphi design-time? Does it happen when running the RB
    demos? Does it happen with any application that you build. Or perhaps only
    with a specific configuration?

    Can you provide steps to reproduce?


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2007
    Hi Nard,


    Unfortuantly their doesn't seem to be specific steps to reproduce. It
    happens on occassions, but I can't create something that will cause it to
    crash every time.

    I haven't had it happen in Delphi design time or with the RB demo's. I've
    had some of my users report the issue in an application that I've built -
    but has happened on different machines.

    I know this isn't a lot of helpful information - I was hoping after seeing
    the other post in the NG archives that maybe this was a known issue with a
    simple fix. Doesn't look like this is the case afterall. :-(

    Cheers

    Adam.
  • edited September 2007

    Try to get some reproduceable steps from the users that report the issue.
    Then try to follow those to reproduce it on your machine.

    Also look for differences in their environment. Are they uninstalling the
    printer driver while the app is running. Are they running in a citrix type
    of environment? Etc.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2007
    Hi Nard,


    This situation has been happening for some time. I've only been able to trap
    'where' the freeze occurs after implmenenting Eureka into the application.

    The users are running on Windows XP workstations in a Domain environment.
    (No Citrix or RDC, etc). They are not processing any other requests or doing
    anything else (such as playing with printers / settings) when the problems
    occur.

    The problems aren't reproducable as such. They can run the report at one
    time, and have a lockup. Crash out and re run it again another 10 times, and
    it work, and then at some stage later that morning it will lock up out of
    the blue again.

    I'm not sure what you can do at this point in time if I'm not able to give
    you reproducable steps, and if this problem isn't related to the one
    reported back in 2005 on the newsgroups, and as such I'm not expecting an
    immediate answer.It may not hurt to keep in the back of your mind however,
    just incase you come across something later that you believe may be linked
    to such a problem.

    Thanks & Regards

    Adam.
This discussion has been closed.