Project

General

Profile

Bug #165

Rainbow commands cause Zone event handlers to fail.

Added by Brian Flanagan about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
02/09/2020
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

Example: Help_80 from AMOSPro_Examples.

In 0.9.4, the zone event handlers don't work.

Check out the +, -, and Quit handlers since Med music isn't working yet.
Commenting the rainbow commands in line 106 will allow them to work.

See below:

Set Rainbow 1,0,196,"","","(1,1,15)(2,-1,15)" : Rainbow 1,0,53,196
#1

Updated by Francois Lionet about 4 years ago

  • Status changed from New to Feedback
  • Assignee set to Francois Lionet
  • Target version set to 0.9.5

Zones work fine here even with rainbows... and I do not understand how this could happen, zones and rainbows are two VERY different parts of the code.
Can you try with the latest version 0.9.5 when I publish it?

#2

Updated by Brian Flanagan about 4 years ago

I tested this with version 0.9.5. It still fails.

If I comment the rainbow commands, the event handlers start working again.

I did more testing and determined that the program does continue to run briefly, but locks up after the 3rd iteration of the Do Loop. The Mouse Zone command is always returning 0. Commenting the Rainbow commands allows the program to continue running.

To test this, I added the following code to the Do Loop.

MYCOUNT=0
Do 
   M=Mouse Zone
   Inc MYCOUNT : Locate 0,0 : Print "Zone: ";M,MYCOUNT

If I comment the Rainbow commands, I'll see the zone number appear when the mouse is moved over each of the buttons. I'll also see the count on the loop iteration.

If I leave the Rainbow commands active, the loop count will go to 3, and the AOZ application will freeze. I also can't break out with Ctrl-C.

I understand that the commands are not directly related in the code, but my suspicion is that the Rainbow command still has some kind of problem with a memory/buffer overflow. Remember that in the past, I've had problems with Rainbow commands not only crashing AOZ, but also Chrome and Windows! At first, I thought that perhaps the rainbows over-wrote the area of memory containing the zone data, thus causing the Mouse Zone to always return 0. Since the program stops running after the 3rd iteration of the loop, perhaps something else is going on?

#3

Updated by Brian Flanagan about 4 years ago

In additional testing on other programs I've seen the same problem with the
rainbow command causing Zones to fail, so I'd call this a confirmation:

Help_52 from AMOSPro_Examples exhibits the exact same behavior:

  1. None of the zones work.
  2. Commenting the Rainbow commands on line 83 & 84 makes all the zones work again.

Oh, and BTW, the rainbows don't display either. (They didn't work in Help_80 either.)

#4

Updated by Baptiste Pillot about 4 years ago

  • Description updated (diff)
#5

Updated by Brian Flanagan almost 4 years ago

  • Status changed from Feedback to Closed

Re-tested in 0.9.8.1. Working!

Also available in: Atom PDF