PRB: Program Using CHAIN Hangs in OS/2 2.0 (96538)



The information in this article applies to:

  • Microsoft Basic Professional Development System for MS-DOS 7.1
  • IBM OS/2 2.0

This article was previously published under Q96538

SYMPTOMS

In OS/2 version 2.0, an attempt to use the CHAIN command in an application that was compiled to use a runtime module (the compiler command line does not include the /O option switch) in OS/2 protected mode (the compiler command line includes the /Lp option switch) fails. The application displays the following message and hangs:
SYS 3175 (access violation)

RESOLUTION

To address this problem, perform one of the following three steps:

  • Specify the /O compiler option switch to make each application a stand-alone executable file. However, this method prevents the application chained to from accessing information in the common shared block.
  • Use OS/2 version 1.1, 1.2, or 1.3 instead of OS/2 version 2.0.
  • Try to rewrite the program so it does not use the CHAIN command.

MORE INFORMATION

Basic Professional Development System version 7.1 was tested with the versions of OS/2 that were available before Basic was released (versions 1.0 through 1.3), but it was not tested with OS/2 version 2.0. The sample program below works properly with OS/2 versions 1.1, 1.2, and 1.3.

Steps to Reproduce Behavior

  1. Compile and link the PROGRAM1.BAS and PROGRAM2.BAS applications.
    'PROGRAM1.BAS
    'Compile options needed: /Lp
    PRINT "Here in program 1"
    CHAIN "PROGRAM2"
    
    'PROGRAM2.BAS
    'Compile options needed: /Lp
    PRINT "Here in program 2"
    					
  2. Run PROGRAM1.EXE in an OS/2 window in OS/2 version 2.0. PROGRAM1 displays its output (Here in program 1). After a pause, the access violation message appears and the application hangs.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:kbprb KB96538