Thursday 3 May 2012

AGK V1070 Bug Hunt

A new version of AGK was released on Tuesday ( 1st May 2012 ), Version 107.0.

This has been promised for some time, it adds a number of new commands and fixes a number of issues with the last release (which was version 106.5).

After removing the old version and installing the new one, the Build-It project was recompiled and tested to make sure it still works.

While most of the app appears to work normally, now the panel no longer displays the object icon as it did before.
It appears that the new version has introduced a "bug".

There are two approaches to this.
  • Revert back to the old version and wait for a fix
  • Find out why it no longer works and report the bug.
The problem with the first option is that the developers of AGK may not yet be aware of the bug, they will have tested the new commands and fixes for previous bugs, but this may not be part of that code.

If everyone simply reverts back to the old version, without looking into the cause, it may be some time before the bug is found - let alone fixed.

As this project worked fine before the upgrade, we know for certain it's the change to AGK which has caused it, we don't know specifically what is not working, but we have an idea where it will be found.

It is something to do with the objects being displayed.

The fact that some icons are visible, that these are in the right place and show the right icon and the fact that only the groups with members are shown indicates that the code involved in this is probably still OK.

This eliminates the following from possible causes.
  • Object and Image Load - as some objects are correct and all are loaded the same way.
  • Base96 Encoding / decoding - as this is needed to show group icons.
  • Panel update routines - as the same code is used for objects and groups.
The problem appears to be with showing group members, which are stored in the .detail field of the object array.

Adding the following code to the main loop will show the current contents of certain key variables.
print( "PanelGroup() : " + chr(34) + str( PanelGroup() ) + chr(34) )
for i=1 to topObject()
   print(str(i)+" : " + chr(34) + ObjectDetail(i) + chr(34) )
next i
This prints the currently selected group icon from PanelGroup(), to verify the correct group is being used.  The quotes were not actually needed here, but were simply left over from the code copied to make this line.

Then it loops through objects loaded displaying the .detail field for each array entry.
This should contain the encoded string for group members and descriptions for objects. It appears the problem is with the former.

Since only groups which have members are currently shown in the panel - and these ARE being shown, the group membership codes are getting lost after this fact is checked.  Somewhere in the LoadObjectData() function.  Probably as the member objects are converted to codes.

While dumping information to the screen has worked well for us so far, we have reached the limit of what we can find out with this method, to track this issue down, we are going to need more advanced diagnostics.

No comments:

Post a Comment