News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Chasing a paint bug

Started by jj2007, May 31, 2019, 06:17:21 PM

Previous topic - Next topic

LiaoMi

The graphics break down after a while and sometimes since launch, even if you don't touch the windows inside, changing only the main window, the picture looks a little different, but the imprint is obvious.

jj2007

Thanks, LiaoMi and Biterider. It seems I need to take a thorough look at it again...

jj2007

New version - the painting should work on Win10 and WinXP now :skrewy:

LiaoMi

Quote from: jj2007 on June 03, 2019, 10:03:29 PM
New version - the painting should work on Win10 and WinXP now :skrewy:

Hi jj2007,

I know you hate me already  :greensml:, I must say that the program works much better now, since distortions occur less frequently .. I notice that the error occurs when I switch focus to other programs .. and the first time during the start, a white square appears, sometimes, in this white square, I see my cursor on a black background..

jj2007

Quote from: LiaoMi on June 03, 2019, 10:25:52 PMI know you hate me already  :greensml:

No, I am really grateful for your testing :thumbsup:

At least now it paints the lines on Win10 and WinXP - on Win7-64, that always worked. Guess what was the error that caused ValueOverflow...? GdipDrawLinesI wants a fresh FPU, a simple fninit solved the problem. Obviously an undocumented "feature".

Here is version 4 - one more little glitch fixed.

Biterider

Hi JJ
I could not see any glitches, but the console window shows the following when sizing the complete window.
Biterider

jj2007

Thanks, Biterider - it's fixed in the previous post, version 4.

LiaoMi

#22
1. While the map is displayed, when the inner window is resized, flicker occurs, associated with moving the actual image to the upper left corner, so a complete redrawing is performed. I see three frames of resizing, the first resizing, in the second a window with a new size but the old picture, the third is the final transformation of the picture (after checking this effect is visible on all windows).

2. Sphere when resizing sticks on the mouse

3. At the first start and quickly changing the size, distortions appear

4. When you repeatedly resize the window, the yellow sphere disappears

The effect of the destruction of the picture is almost imperceptible, but it occurs after the black square is displayed in the corner of each of the mini windows. This black square on the left always displays the elements of an another window, depending on the focus of the mouse.


jj2007

Thanks a lot, that will keep me busy for a while, I'm afraid... :sad:

LiaoMi

Quote from: jj2007 on June 03, 2019, 11:39:58 PM
Thanks a lot, that will keep me busy for a while, I'm afraid... :sad:

I think it's all the consequences of a single error in the code, because everything works perfectly, but suddenly, after a noticeable failure, subsequent distortion occurs. Here is the new effect at the start, immediately after the start, I did not have time to do anything, duplicates were displayed at the moment when interacting with the cursor ... Probably some kind of confusion with handlers, because Your program can duplicate pictures of third-party applications.

jj2007


jj2007

Version 5 - one more bug fixed, which was triggered by the tooltip that appears when hovering over the map, or clicking into a country.  The culprit, btw, was a non-initialised local variable.

It works fine now on my Win7 and Win10 machines. Working memory is stable, no leaks. In the XP VM, the Chinese text is not displayed, otherwise it works even there. There is a bit of flicker when resizing the entire window, but that is unavoidable, it seems.

Hitting H activates the animated GIF. You may have to resize the window to see it. On WinXP only, if you size it to a very small width and the GIF is active, it will complain about a ValueOverflow. No such problem on Win7 and Win10.

Grateful for feedback.

Biterider

Hi JJ
On my Win10/64 machine I didn't see any problems. Hitting "H" I got
QuoteinvRect
eax             1
$Err$()         Der Vorgang wurde erfolgreich beendet.__
Rockphorr       -1

invRect
eax             1
$Err$()         Der Vorgang wurde erfolgreich beendet.__
Rockphorr       0
several times, but I don't know what it should mean...

Biterider


hutch--

JJ,

In XP you may have to install the east asian fonts.

jj2007

@BiteRider: just a remainder from debugging, everything OK
@Hutch: yes, but I don't care for the VM, it's just for verifying if my stuff is still running on XP

Thanks to everybody who helped me chase these bugs :thumbsup: