Navigation  without Java Scripts

Visual Prolog Technical Support

Known Problems in Visual Prolog 5.02

We are currently aware of the following problems in Visual Prolog 5.02. Note please that a lot of problems have been solved in Visual Prolog   5.1. You can order a new Visual Prolog 5.1 CD now.

Known Compiler Problems
Known Problems in the PROLOG.LIB
Known Problems in the Visual Development Environment
Known Problems in the VPI
Known Problems with the Debugger
Known Problems with the PDC Link Editor
Known Problems with the PDC's Document Handling Package

Known Compiler Problems

Last call optimization does not work for functions and Class methods

Please be aware of this. It is going to be implemented in one of the following versions.

A problem with multiple inheritance

If a class has more than one parent, then while using an object of such class for access to base class methods, the multiple inheritance engine does not always work properly.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

An error in using of a non-static object

Since the current version of Visual Prolog does not check whether an object exists, an attempt to use a non-static class member (a predicate or a fact) after deleting of an appropriate object causes an error.

Example
CLASS cA
   PREDICATES
      p1
ENDCLASS
   FACTS - base1
     f1(cA)
IMPLEMENT cA
CLAUSES
    p1.
ENDCLASS
GOAL
      A = cA::new,
      assert(f1(A)),
      A:delete,
      f1(OA),
      OA:p1. %GPF

Bug with not(not( x ))

In the following example compiler deletes double not in Visual Prolog 5.1 (build 564) and previous versions.

PREDICATES
nondeterm x(integer)
CLAUSES
x(1).
x(1).
x(1).
PREDICATES
not_test
CLAUSES
not_test :-
not(not(x(1))),
write("Hello"), nl,
fail.
not_test.
GOAL
not_test.
Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

Missed detection of absence of  LOCAL SINGLE FACT initialization in the CLAUSES section.

In some complex cases, the compiler cannot correctly detect that a LOCAL SINGLE FACT was not initialized by one and only one clause.

Procedure checking

We are still missing one analysis function to be used while checking procedure predicates. We are unable to check that there must be one non-failing clause for each possible combination of the input parameters.
Ex. it will give a problem when append is used in the (i,i,o) procedure version like:
 
  PREDICATES
    append(list,list,list) - procedure(i,i,o)
  CLAUSES
    append([],L,L).
    append([H|L1],L2,[H|L3]):-
         append(L1,L2,L3).      
It is easy to see that this predicate will not fail because there is no matching on the second parameter and for the first parameter there is a clause that will match for both the empty list and the nonempty list!
The Visual Prolog compiler can still not detect this, but will give a warning for a possible failure!

Known Problems in the PROLOG.LIB

The Visual Prolog "external database" has different formats in 16 and 32 bit

This is inconvenient and will be changed in a future version. One of the results is that the 16bit VDE uses one .VPR file for a project and the 32bit VDE uses another format. The program VIPCONVERT must be used to switch between the platforms.

Problems of trapping exceptions in the DLL's.

If a GPF or other exception happens in a prolog .DLL, which is called from a Prolog main program, and linked in statically, this exception is trapped in the main program (but not as expected in the .DLL). After this exception is trapped wrongly you should not make further calls to the .DLL, but instead close down your application.
There are no problems when calling a .DLL dynamically, and in proper debugged programs this situation will not happen.

Bug in the storage/11 predicate

When the storage/11 predicate  in the Visual  Prolog DLL is called from Visual Basic or Delphi application, the predicate returns a wrong value for UsedStack.

not(bound(_))does not convert "fail" to "true"

Workaround
In most cases, it is be possible to change:
not(bound(_)) to free(_),
not(free(_)) to bound(_)
Version Info
The information applies to  Visual Prolog 5.1, build 564.

Known Problems in the VDE

Problem with directories and files, which names contain spaces

The VDE, the linker and the compiler have problems with using external  compilers and linkers placed in directories, which names contain spaces.

Visual Prolog does understand quoted filenames like "c:\program files\msvc\bin\link.exe" but the problem is that the PATH to a compiler is set in one place, and  utility names are set in other places. This creates problems in   concatenating of the two items.

Workaround

Things work if you manually modify the scripts. A little trick you might use, if you have some tools installed under PROGRAM FILES\, is that you instead refer to the short DOS name, e.g.  "PROGRA~1".

Recommendations

Do not  install Visual Prolog into the directories, which names contain spaces.
Do not use the directories with such names in your projects if you need to refer to the PATH.

Conversion of HAM to 5.0 format is irreversible

After conversion of .HAM file to the 5.0 format, it is not possible to go back As soon as VIPCONV has converted a .HAM file to the new 5.0 format, it can not be converted back to the 4.0 format.

Possible BUG when updating source code with the help of Code Experts

In some circumstances (a large source file and a relatively slow computer), there is a significant delay while the source file is being updated.  If during this time, you hit the Edit Code button, then the source update can be wrong, because a Code Expert initiates a new update operation while the previous one is not finished.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

Workaround
  1. Avoid using of large source files.
  2. Check whether the previously activated Code Expert action had been accomplished before you activate new Code Expert action. These actions are: "OK", "Edit Code", "Delete Code", "Declaration", "Layout", "Add Clause", and "Update Code".

Problem with a non-existing Project name in  a Command line

When the VIP.EXE (both 16 and 32 bit) is started with a non-existing .VPR filename in a Command line, it does not report an error, but loads the last loaded project instead.

Using Ctrl-X, Ctrl-C or Ctrl-V in the Menu Editor

Ctrl-X, Ctrl-C or Ctrl-V do not work if you are editing a constant prefix. in the Menu Editor.

Workaround

Use the right-mouse pop-up menu.

Problem in the multiprogrammer mode

The Code Expert setting for Automatic update of Source code of a resource is not saved, when there is no changes in a resource (dialog, menu etc.) if a project was opened from a .PRJ file.

Wrong generation of RES files for some bitmaps

See description

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

A problem with  Visual Studio 6.0  resource compiler.

Visual Studio resource compiler rc.exe in Visual Studio 6.0 has been moved to the location different from the location in previous versions.

This means that if a Visual Prolog programmer specifies, that the Code Generator should generate *.RC and *.H files for the resources in his project, and uses Visual Studio 6.0 resource compiler, build scripts do not work correctly.

Workaround

It is necessary to change a rule for resource compilation manually with the help of the Options|Project|Make Options|Rules menu item. For example:

rc->res:$(CDIR)..\common\msdev98 \BIN\RC -r -I$(CDIR)INCLUDE\ -fo $(OBJDIR)$*.RES $(OBJDIR)$*.RC

Remark: The red part is added.

Bug with saving changes in a project, when "AutoSave Project on Exit" option in the Environment dialog is turned off.

When "AutoSave Project on Exit" option in the Environment dialog is turned off, and changes were done using Dialog Attributes, Window Attributes, or Toolbar Attributes dialogs:

  1. The Question dialog "Save current project" is not invoked on exit, except cases when:
Constant names were changed;
"Storing in Separate File" flag was turned ON/OFF.
  1. Any changes in the dialogs Dialog Attributes, Window Attributes, and Toolbar Attributes are not saved on exit, except changes of constant name and "Storing in Separate File" flag state.
Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

Bug with saving changes in a topic, when  "AutoSave Project on Exit" option in the Environment dialog is turned off.

When "AutoSave Project on Exit" option in the Environment dialog is turned off, and a topic name, a topic context string, or topic content were changed, these changes are saved automatically without a warning.

Problems with read-only .PRJ files

  1. If a user opens a project from a read-only .PRJ file, no message describing that this file is read-only is generated.
  2. After choosing Project | Save Project menu item, the following invalid message is generated in the Message window:

Project <PrjFilePath>.PRJ saved

Version Info

The information in the item 2 applies to  Visual Prolog 5.1, build 564, and previous versions.
In the build 565 the following message is generated:

"Project components has been saved"

Help Maker: a problem with importing  .RTF files containing graphics

The current version of the Visual Prolog does not allow to import the .RTF files containing graphics. An attempt to import .RTF file with embedded objects causes the necessity to restart Visual Prolog. Nevertheless, it does not mean you cannot import file with graphics at all, because it is possible to replace embedded objects in the source .RTF file with the references to image files.

HCP Help Compiler hangs Visual Prolog if root VIP directory name is longer than 8 characters

HCP Help Compiler hangs Visual Prolog during HCP.EXE DOS session while compiling Help if root VIP directory name is more than eight characters.

Version Info

The information applies to  Visual Prolog 5.1 and previous versions.

The "Help Topics" window is not initially activated when WIN32 on-line Help is run.

"Help Topics" window can be activated only by clicking on the "Help Topics" button in the Help window.

Workaround

Please see a detailed description.

A printing problem

If you print several pages beginning with the page different from the first, the first page of a range is spoiled.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

Default setting for "Convert ANSI to OEM" in the Compiler Options dialog

In the versions previous to Visual Prolog 5.1, build 565 the default setting for "Convert ANSI to OEM" option in the Compiler Options dialog is ON. This causes problems with handling of non-English characters, because the second part of the code table is unavailable.

Workaround

Uncheck the "Convert ANSI to OEM" option.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.
Since the build 565, the default setting of the option is OFF.

Known Problems in the VPI

EasyWin does not support C as main Target

Modeless dialog ‘Tab’ problem.

Tab does not work for the modeless dialogs, which have modal dialog as a parent.
 

A problem with setting Enabled/Disabled and Visible/Invisible flags for controls in inactive sheets.

Using of a standard VPI predicate win_SetState  or a Dialog package predicate dialog_SetState for setting Enabled/Disabled and Visible/Invisible flags for controls in inactive sheets does not lead to the expected result.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

Workaround
  1. Beginning from  Visual Prolog 5.1 (build 564) it will be possible to use a new tabdlg_SetState predicate. This predicate correctly handles controls in inactive sheets.
  2. To set Enabled/Disabled and Visible/Invisible flags in the 564 build, a programmer can use the following event coming in the moment of activating of the sheet including the control:
    e_User (SheetId, SheetState)                
    State
    Value
    Active 1
    Inactive 0

win_GetText bug for a multi-line edit control in OS/2

If a multi-line edit control is created using win_SetText with a string more than 1K, win_GetText truncates the text to about 1K.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

Bug in win_Move for task window 

Top is set lower than expected.

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

pict_Open causes  the error 6000

If pict_Open is used in a DLL with a console .EXE, the error 6000 "Bad window handle" is generated.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

pict_Open causes window caption and main menu  flickering

Version Info

The information applies to  Visual Prolog 5.1 and previous versions.

mf_Load/3 BUG under Win32

Predicate mf_Load/3 returns invalid rectangle values if a metafile contains negative coordinates.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

vpi_CreateProcess:  notification bug for 16-bit GUI applications under WIN NT.

While running 16-bit GUI application from 32-bit VPI application using vpi_CreateProcess,  e_EndApplication comes to windows event handler before closing it.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

vpi_CloseProcess cannot close 16-bit application under WinNT

Bug exists only for WIN NT and only for GUI 16-bit application.
When you run 16-bit GUI application from 32-bit VPI application using vpi_CreateProcess, and then try to close 16-bit application by vpi_CloseProcess, nothing happens, i.e. 16-bit application is not closed.

win_GetState returns wsf_Titlebar in a wrong way

If window has a border, the predicate win_GetState returns wsf_Titlebar no matter, whether window has a title bar or not.

Version Info

The information applies to  Visual Prolog 5.1, build 564, and previous versions.

dlg_ChooseColor does not show input custom colors

Since dlg_ChooseColor does not show input custom colors, it is impossible to edit a custom color.

Directory browser does not work with a network path under Win16

The Directory browser uses disk predicate that does not support the network path under Win16.

Known Problems with the PDC Link Editor (Linker)

An internal error while importing DLL functions

Importing of DLL functions with extensions different from .DLL (e.g. winspool.drv) causes an internal error.

Version Info

The information applies to  Visual Prolog 5.1 and previous versions.

Visual Studio 6.0 uses a new format for Import libraries

Workaround:

Use the compatibility option in Visual Studio to generate 5.0 compatible import libraries.

Build problem when an external linker is used

The build process will end with the message "Project not built" in a non-DOS mode if an external linker  output includes the following strings: "fatal" or "error".

Workaround:

Avoid using of file and directory names including sequences  "fatal" or "error" if you are going to use external linkers.

Known Problems with the Debugger

The values of output variables are sometimes not displayed

The values of output variables are sometimes not displayed while using the predicates findall and not.

Sometimes a console application will terminate unexpected after using  hot keys F7/F8.

There are problems sometimes when debugging programs using classes.

Debugger  immediately jumps to the continue point with no visual indication of a fail.

When fail happens, the debugger  immediately jumps to a continue point with no visual indication of a fail.

The debugger will catch all errorexits that happens in the program.

Known Problems with the PDC's Document Handling Package

The .RTF parser bug in using colored fonts

If a colored phrase in an .RTF document is followed by a table (right after), this table erroneously is colored also.

Workaround : add any uncolored char (single blank) just after the colored phrase.