Skip to main content
Mar 11, 2021 9:29 PM UTC

STOP RUN at line? in program P $ DRAWBITMAP ()

Hello. In my point of sales software, the invoice header is a .bmp which I print with the instruction. Only today on a pc my program does STOP RUN at line? in program P $ DRAWBITMAP (). I have tested the program on all PCs and only on that one does the error occur. I have verified that the .bmp file exists and replaced it with a fresh file. The problem has continued. I have uninstalled and installed rmcobol cobol version 12.17 and the problem continues. All this leads me to think that there is a problem with Windows 10 and rmcobol, can someone help me to know what is happening?

27321 CALL "P$DrawBitmap" USING "milogo.bmp",
27322 IZQUIERDO, TOPE, "Absolute", "Inches",
27323 ANCHO, ALTO, "Inches"
27324 WRITE REG-SAL FROM SPACES AFTER
27325 ADVANCING 1 LINES.

    33 replies

    Dominique Sacre
    Rocketeer
    Mar 11, 2021 9:58 PM UTC

    Hello. In my point of sales software, the invoice header is a .bmp which I print with the instruction. Only today on a pc my program does STOP RUN at line? in program P $ DRAWBITMAP (). I have tested the program on all PCs and only on that one does the error occur. I have verified that the .bmp file exists and replaced it with a fresh file. The problem has continued. I have uninstalled and installed rmcobol cobol version 12.17 and the problem continues. All this leads me to think that there is a problem with Windows 10 and rmcobol, can someone help me to know what is happening?

    27321 CALL "P$DrawBitmap" USING "milogo.bmp",
    27322 IZQUIERDO, TOPE, "Absolute", "Inches",
    27323 ANCHO, ALTO, "Inches"
    27324 WRITE REG-SAL FROM SPACES AFTER
    27325 ADVANCING 1 LINES.

    Before we take this further, it's odd that it suddenly started happening. 

    Did you recently apply some Windows updates?  It appears a recent update broke printing, although the reports say it's resulting in a system crash.  Microsoft has withdrawn those updates.

    https://www.bleepingcomputer.com/news/microsoft/windows-10-crashes-when-printing-due-to-microsoft-march-updates/ 


    UPDATE: Microsoft has released an "out-of-band" fix that should be offered as an "Optional Update".  If the Windows Update client is not yet offering the fix, It can also be downloaded directly from here:

    https://support.microsoft.com/en-us/topic/march-18-2021-kb5001649-os-builds-19041-870-and-19042-870-out-of-band-ebbe0617-3a63-467a-aaaa-2a4c68a6de33  

    For Windows 10 2004 and 20H2, the direct download page:

    https://www.catalog.update.microsoft.com/Search.aspx?q=KB5001649 

    I can confirm that it fixes the P$DRAWBITMAP problem. 

    ANOTHER UPDATE: The March 17 update was pulled by Microsoft, but now it's back again.  If you tried to get it and couldn't, try again.

    A virtual comedy of errors.

    https://www.bleepingcomputer.com/news/microsoft/windows-10-kb5001649-update-is-rolling-out-again-to-fix-printing/ 

     

    Mar 11, 2021 10:37 PM UTC

    Hello. In my point of sales software, the invoice header is a .bmp which I print with the instruction. Only today on a pc my program does STOP RUN at line? in program P $ DRAWBITMAP (). I have tested the program on all PCs and only on that one does the error occur. I have verified that the .bmp file exists and replaced it with a fresh file. The problem has continued. I have uninstalled and installed rmcobol cobol version 12.17 and the problem continues. All this leads me to think that there is a problem with Windows 10 and rmcobol, can someone help me to know what is happening?

    27321 CALL "P$DrawBitmap" USING "milogo.bmp",
    27322 IZQUIERDO, TOPE, "Absolute", "Inches",
    27323 ANCHO, ALTO, "Inches"
    27324 WRITE REG-SAL FROM SPACES AFTER
    27325 ADVANCING 1 LINES.

    March 9, 2021 - KB5000802 (OS builds 19041.867 and 19042.867) this is the last update that windows made on the pc.

    Juan Urraburu
    Participating Frequently
    Mar 11, 2021 10:43 PM UTC

    March 9, 2021 - KB5000802 (OS builds 19041.867 and 19042.867) this is the last update that windows made on the pc.

    Hi Wascar and Uwe,

    I created a case yesterday (STOP RUN at line? in program P$DRAWBITMAP ()) as a customer reported P$Drawbitmap SelectObject failed on various customers but only in some PCs when printing a BMP file.

    I just asked them to remove those Windows updates to check if that solves the problem.

    Regards,

     

    Dominique Sacre
    Rocketeer
    Mar 11, 2021 11:14 PM UTC

    March 9, 2021 - KB5000802 (OS builds 19041.867 and 19042.867) this is the last update that windows made on the pc.

    Well, that's certainly suspicious. You could try removing KB5000802 -- instructions are in the linked article. If you do, please reply and let us know if it helped. Based on Juan's report, this could be a widespread problem.
    Dominique Sacre
    Rocketeer
    Mar 11, 2021 11:15 PM UTC

    Hi Wascar and Uwe,

    I created a case yesterday (STOP RUN at line? in program P$DRAWBITMAP ()) as a customer reported P$Drawbitmap SelectObject failed on various customers but only in some PCs when printing a BMP file.

    I just asked them to remove those Windows updates to check if that solves the problem.

    Regards,

     

    Hi Juan: thanks! Please reply and let us know if this helped. I'll make sure support is aware of this thread.
    Mar 12, 2021 9:11 AM UTC
    Hi Juan: thanks! Please reply and let us know if this helped. I'll make sure support is aware of this thread.

    Hello. Thank you very much Uwe, and Juan Manuel. I proceeded to uninstall the latest windows 10 update and the problem has been fixed.

    Mar 12, 2021 9:13 AM UTC

    Hi Wascar and Uwe,

    I created a case yesterday (STOP RUN at line? in program P$DRAWBITMAP ()) as a customer reported P$Drawbitmap SelectObject failed on various customers but only in some PCs when printing a BMP file.

    I just asked them to remove those Windows updates to check if that solves the problem.

    Regards,

     

    Hello. Thank you very much Uwe, and Juan Manuel. I proceeded to uninstall the latest windows 10 update and the problem has been fixed.
    Juan Urraburu
    Participating Frequently
    Mar 12, 2021 6:47 PM UTC
    Hello. Thank you very much Uwe, and Juan Manuel. I proceeded to uninstall the latest windows 10 update and the problem has been fixed.
    Confirmed! Removing the update solved the problem.
    Dominique Sacre
    Rocketeer
    Mar 12, 2021 7:39 PM UTC
    Confirmed! Removing the update solved the problem.
    That's fantastic! Thanks for confirming.
    Dominique Sacre
    Rocketeer
    Mar 12, 2021 7:39 PM UTC
    Hello. Thank you very much Uwe, and Juan Manuel. I proceeded to uninstall the latest windows 10 update and the problem has been fixed.
    That's fantastic! Thanks for confirming.