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 18, 2021 12:02 PM UTC

    It appears others are discovering the problem, and Microsoft is now aware (see the comments).

    https://stackoverflow.com/questions/66607946/calling-windows-selectobject-in-a-printer-compatible-device-context-returns-null 

    Hi everybody,

    I would like to thank you for your assistance. Please keep us inform.

    Dominique Sacre
    Rocketeer
    Mar 18, 2021 8:50 PM UTC

    Hi everybody,

    I would like to thank you for your assistance. Please keep us inform.

    Hi everybody

    Can anybody tell  me what updates to remove from windows server 2012 R2 in order to avoid

    the error message on P$DRAWBITMAP?

    Thanking you in advance.

    Mar 18, 2021 9:00 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.

    Hello.

    I have had problems to block windows update, I have deactivated all the possible options and every day windows re-install again. So far I have seen that this works for me.

    Computer Management,
    Services and Applications
    services
    windows update
    right click
    properties
    startup type = disable
    service status = stop, apply

    Dominique Sacre
    Rocketeer
    Mar 18, 2021 9:20 PM UTC

    Hi everybody

    Can anybody tell  me what updates to remove from windows server 2012 R2 in order to avoid

    the error message on P$DRAWBITMAP?

    Thanking you in advance.

    Depending on which build of Windows 10 you have, it will be one or more of these patches:

    wusa /uninstall /kb:5000802
    wusa /uninstall /kb:5000808
    wusa /uninstall /kb:5000822
    wusa /uninstall /kb:5000809

    You can also go to "View Update History" -> "Uninstall Updates" and find and remove the patches.  But note that Wascar Guerrero1 reports that they get reinstalled unless you disable updates or set them to "notify-only" or "download only".

    Dominique Sacre
    Rocketeer
    Mar 18, 2021 9:25 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.

    Microsoft has now realized that there are more printing issues, and these appear to cover what we are seeing.  Here's some info:

    https://www.bleepingcomputer.com/news/microsoft/microsoft-warns-of-more-printing-issues-caused-by-march-updates/ 

    Quoting from the article:

    The printing issues highlighted by Microsoft include :

    • Elements of the document might print as solid black/color boxes or might be missing, including barcodes, QR codes, and graphics elements, such as logos.
    • Table lines might be missing. Other alignment or formatting issues might also be present.
    • Printing from some apps or to some printers might result in a blank page or label.

    Microsoft is working on a fix for these issues and will provide a solution during the coming days.

     

    Dominique Sacre
    Rocketeer
    Mar 19, 2021 12:48 PM UTC

    Microsoft has now realized that there are more printing issues, and these appear to cover what we are seeing.  Here's some info:

    https://www.bleepingcomputer.com/news/microsoft/microsoft-warns-of-more-printing-issues-caused-by-march-updates/ 

    Quoting from the article:

    The printing issues highlighted by Microsoft include :

    • Elements of the document might print as solid black/color boxes or might be missing, including barcodes, QR codes, and graphics elements, such as logos.
    • Table lines might be missing. Other alignment or formatting issues might also be present.
    • Printing from some apps or to some printers might result in a blank page or label.

    Microsoft is working on a fix for these issues and will provide a solution during the coming days.

     

    So we have to wait Microsoft to fix this problem, hοping to be soon.

    Thanks a lot

    Dominique Sacre
    Rocketeer
    Mar 19, 2021 3:35 PM UTC

    So we have to wait Microsoft to fix this problem, hοping to be soon.

    Thanks a lot

    Good morning, Microsoft has already solved the problem and already has an update that solves the problem, although the automatic update fails if the emergency can be downloaded and installed by hand.
    Dominique Sacre
    Rocketeer
    Mar 19, 2021 6:39 PM UTC

    So we have to wait Microsoft to fix this problem, hοping to be soon.

    Thanks a lot

    Yes -- there is no work-around because Windows is returning an error code when an image is rendered onto the page. If we ignore the error, it won't help as that simply prints the page without the image.

    UPDATE: ON EXCEPTION will not catch this error, which is an operation that should not ever fail.

    Microsoft says the fix will be available in a matter of days.

    Mar 20, 2021 9:38 AM 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.

    Hello everyone. I have had difficult days as many people call me every morning to tell me that the problems related to BMP printing continue. Finally I have decided to use the windows option that blocks updates for 7 days. I would have liked it to be for a year, but it is not. If you are experiencing the same problems as me, then it is time to block windows updates for 7 days and reschedule it every 7 days. Hope I get a solution soon.

    Dominique Sacre
    Rocketeer
    Mar 22, 2021 3:37 PM UTC

    Hello everyone. I have had difficult days as many people call me every morning to tell me that the problems related to BMP printing continue. Finally I have decided to use the windows option that blocks updates for 7 days. I would have liked it to be for a year, but it is not. If you are experiencing the same problems as me, then it is time to block windows updates for 7 days and reschedule it every 7 days. Hope I get a solution soon.

    Greetings, 
    Microsoft already has an update that solves the problem,

    it is KB5001649
    it must be located in optional updates.