Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002528 [JEDI VCL] 00 JVCL Components minor unable to reproduce 2005-01-18 12:13 2006-06-27 07:17
Reporter Simes View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00 BETA 2
Summary 0002528: TJvEditor doesn't fully paint the window
Description See attached screenshot. This shows the TJvEditor component in an application. It can be seen that the editor has not full painted it's contents, as some parts of the parent window behind it are still visible. (The window behind is the main application. The JvEditor component is on a modal dialog.) None of the lines in the file being edited are blank. Curiously, it's always alternate lines that are not painted correctly. If the editor is scrolled so the offending lines are off screen, then scrolled back, the problem goes away until the next time the window is covered then uncovered.

None of the JvEditor events are attached to handlers.

This problem is only known to occur on two machines (P3-733, 256MB, Oxygen Labs video card) both running Windows NT, yet the problem does not occur on an identical spec machine running Windows 2K.

The user has many other applications on the same machine, and none of them ever exhibit this sort of problem.

I am unable to reproduce the problem at all, but then I'm also running Win2K or XP. My user tells me the problem happens every time on his NT box.
Additional Information
Tags No tags attached.
Attached Files gif file icon Editor.gif [^] (27,881 bytes) 2005-01-18 12:13

- Relationships

-  Notes
obones (administrator)
2005-01-18 23:49

Which version of the JVCL are you using?
This remings me of a bug from WinNT with TMemo, TRichEdit and al.
Simes (reporter)
2005-01-21 05:05

AHUser (developer)
2005-01-22 07:22

JvEditorCommon.pas::TJvCustomEditorBase.Scroll() should be the problem. It looks like that Windows NET has problems with the Win32API function ScrollDC().

Win32SDK says to ScrollDC: Minimum operating systems Windows 95, Windows NT 3.1.

Does it work if you insert this line before the ScrollDC call?
RUpdate := ClientRect;
Simes (reporter)
2005-01-24 10:41
edited on: 2005-01-24 12:25

No, that line made no apparent difference.

But, if I understand the ScrollDC help correctly, RUpdate is an output parameter from ScrollDC. Should I be assigning R or RClip instead?

AHUser (developer)
2005-01-27 06:21

RUpdate contains the correct value. But I just found out that sometimes it return (0,0,0,0). I have committed an update version that does a complete Invalidate if ScrollDC returns (0,0,0,0). Maybe this helps.
AHUser (developer)
2005-01-27 09:36

This does not seem to be the problem. The (0,0,0,0) is returned when there is really nothing to repaint. I think a possible solution would be to disable optimized scrolling for NT<5.0 as the issue only happens on NT.
Simes (reporter)
2005-01-31 06:59

My user tried the latest version, but it didn't seem any different. The problem still occurred.
AHUser (developer)
2005-01-31 10:55

What happens if you remove the whole {$IFDEF ... ENDIF} Block? If this does not work either, then the bug must be somewhere else.
Simes (reporter)
2005-02-01 11:28

Comment from my user: "...display is actually much worse on NT. Still see the same improper redraw. Before, we could use the scrollbar to scroll up and down a couple of times to get a good display. Now, scrolling up and down doesn't help. Pretty much unusable on our NT systems. I checked on updated video drivers - none available. Still looks normal on Win2K"

Can I just check I commented out the correct code... in TJvCustomEditorBase.Scroll, the vertical scroll block, I commented out the following code:

      {$IFDEF VCL}
      if Abs((OldFTopRow - ScrollPos) * FCellRect.Height) < FEditorClient.Height then
        R := FEditorClient.ClientRect;
        R.Bottom := R.Top + CellRect.Height * FVisibleRowCount;
        R.Left := 0; // update gutter
        RClip := R;
        Inc(RClip.Bottom, CellRect.Height);
          FEditorClient.Canvas.Handle, // handle of device context
          0, // horizontal scroll units
          (OldFTopRow - ScrollPos) * CellRect.Height, // vertical scroll units
          R, // address of structure for scrolling rectangle
          RClip, // address of structure for clipping rectangle
          0, // handle of scrolling region
          @RUpdate // address of structure for update rectangle
        // (ahuser) WinNT seams to have problems with ScrollDC in vertical direction. (Mantis 0002528)
        if (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion < 5) then
          Dec(RUpdate.Top, CellRect.Height);
        Inc(RUpdate.Bottom, CellRect.Height);
        InvalidateRect(Handle, @RUpdate, False);
      {$ENDIF VCL}
AHUser (developer)
2005-02-01 11:48

Yes, that is the code that seems to not work under NT.
obones (administrator)
2005-08-10 08:44

Is this still here?
Simes (reporter)
2005-08-11 02:01

Yes, this has not been resolved
obones (administrator)
2006-04-03 00:55

Any news, anyone?
obones (administrator)
2006-06-08 02:31

obones (administrator)
2006-06-27 07:17

No answers, I'm assuming this is fixed in the latest SVN version [^]

- Issue History
Date Modified Username Field Change
2005-01-18 12:13 Simes New Issue
2005-01-18 12:13 Simes File Added: Editor.gif
2005-01-18 23:49 obones Note Added: 0006223
2005-01-18 23:49 obones Status new => feedback
2005-01-21 05:05 Simes Note Added: 0006237
2005-01-22 07:22 AHUser Note Added: 0006251
2005-01-24 10:41 Simes Note Added: 0006268
2005-01-24 12:25 Simes Note Edited: 0006268
2005-01-27 06:21 AHUser Note Added: 0006297
2005-01-27 09:36 AHUser Note Added: 0006298
2005-01-31 06:59 Simes Note Added: 0006325
2005-01-31 10:55 AHUser Note Added: 0006326
2005-02-01 11:28 Simes Note Added: 0006328
2005-02-01 11:48 AHUser Note Added: 0006329
2005-08-10 08:44 obones Note Added: 0007787
2005-08-11 02:01 Simes Note Added: 0007792
2006-04-03 00:55 obones Note Added: 0008816
2006-06-08 02:31 obones Note Added: 0009430
2006-06-27 07:17 obones Status feedback => resolved
2006-06-27 07:17 obones Fixed in Version => Daily / SVN
2006-06-27 07:17 obones Resolution open => fixed
2006-06-27 07:17 obones Assigned To => obones
2006-06-27 07:17 obones Note Added: 0009687

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker