Author Topic: Chasing a paint bug  (Read 1717 times)

LiaoMi

  • Member
  • ****
  • Posts: 573
Re: Chasing a paint bug
« Reply #15 on: June 02, 2019, 04:10:20 PM »
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

  • Member
  • *****
  • Posts: 9644
  • Assembler is fun ;-)
    • MasmBasic
Re: Chasing a paint bug
« Reply #16 on: June 02, 2019, 06:36:43 PM »
Thanks, LiaoMi and Biterider. It seems I need to take a thorough look at it again...

jj2007

  • Member
  • *****
  • Posts: 9644
  • Assembler is fun ;-)
    • MasmBasic
Re: Chasing a paint bug
« Reply #17 on: June 03, 2019, 10:03:29 PM »
New version - the painting should work on Win10 and WinXP now :skrewy:

LiaoMi

  • Member
  • ****
  • Posts: 573
Re: Chasing a paint bug
« Reply #18 on: June 03, 2019, 10:25:52 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

  • Member
  • *****
  • Posts: 9644
  • Assembler is fun ;-)
    • MasmBasic
Re: Chasing a paint bug
« Reply #19 on: June 03, 2019, 10:30:52 PM »
I 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

  • Member
  • ***
  • Posts: 374
  • ObjAsm32 + ObjAsm64 = ObjAsm
    • ObjAsm
Re: Chasing a paint bug
« Reply #20 on: June 03, 2019, 10:40:18 PM »
Hi JJ
I could not see any glitches, but the console window shows the following when sizing the complete window.
Biterider

jj2007

  • Member
  • *****
  • Posts: 9644
  • Assembler is fun ;-)
    • MasmBasic
Re: Chasing a paint bug
« Reply #21 on: June 03, 2019, 10:44:04 PM »
Thanks, Biterider - it's fixed in the previous post, version 4.

LiaoMi

  • Member
  • ****
  • Posts: 573
Re: Chasing a paint bug
« Reply #22 on: June 03, 2019, 11:27:05 PM »
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.

« Last Edit: June 04, 2019, 01:02:07 AM by LiaoMi »

jj2007

  • Member
  • *****
  • Posts: 9644
  • Assembler is fun ;-)
    • MasmBasic
Re: Chasing a paint bug
« Reply #23 on: June 03, 2019, 11:39:58 PM »
Thanks a lot, that will keep me busy for a while, I'm afraid... :sad:

LiaoMi

  • Member
  • ****
  • Posts: 573
Re: Chasing a paint bug
« Reply #24 on: June 04, 2019, 02:00:00 AM »
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

  • Member
  • *****
  • Posts: 9644
  • Assembler is fun ;-)
    • MasmBasic
Re: Chasing a paint bug
« Reply #25 on: June 04, 2019, 04:53:58 AM »
Thanks a lot, LiaoMo :thup:

jj2007

  • Member
  • *****
  • Posts: 9644
  • Assembler is fun ;-)
    • MasmBasic
Re: Chasing a paint bug
« Reply #26 on: June 08, 2019, 01:16:06 PM »
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

  • Member
  • ***
  • Posts: 374
  • ObjAsm32 + ObjAsm64 = ObjAsm
    • ObjAsm
Re: Chasing a paint bug
« Reply #27 on: June 08, 2019, 04:30:05 PM »
Hi JJ
On my Win10/64 machine I didn't see any problems. Hitting "H" I got
Quote
invRect
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--

  • Administrator
  • Member
  • ******
  • Posts: 6588
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Chasing a paint bug
« Reply #28 on: June 08, 2019, 05:07:01 PM »
JJ,

In XP you may have to install the east asian fonts.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

jj2007

  • Member
  • *****
  • Posts: 9644
  • Assembler is fun ;-)
    • MasmBasic
Re: Chasing a paint bug
« Reply #29 on: June 08, 2019, 05:16:05 PM »
@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: