No announcement yet.

Divide error

  • Filter
  • Time
  • Show
Clear All
new posts

  • Divide error

    I wanted to keep from having to make this
    post but i dont know what else to do.
    I took Pbanim.bas and modified it to
    do the gradient a little different
    and put my own BMP file and text on it.
    I then shell to a pbcc program and using
    contools do a progress bar and some message
    boxes. It runs great here and looks great.
    I'm hoping to use it for a setup program.
    I dont actually copy anything at the moment.
    When I sent it to my son-in-law, however,
    he gets the window frame then an error
    message i named it setup1)
    SETUP1 caused a divide error in module SETUP1.EXE at 015f:004044e9.
    EAX=00000318 CS=015f EIP=004044e9 EFLGS=00010246
    EBX=0064f6e0 SS=0167 ESP=0064f6b4 EBP=0064f760
    ECX=c960b4c0 DS=0167 ESI=00001152 FS=296f
    EDX=00000000 ES=0167 EDI=00000000 GS=0000
    Bytes at CS:EIP:
    f7 7d 80 89 85 78 ff ff ff c7 05 b8 72 40 00 03
    Stack dump:
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000
    I have error traps in every sub which i was hoping would tell me
    where the error was.

    Can you tell me how to proceed. I can send the code if you would like. As i said, it runs flawlessly on my system (win95) either
    through the interpreter or compiled and even when put in a different folder.

    [email protected]
    Client Writeup for the CPA

    Links Page

  • #2
    I'm afraid you'll need to do some detective work, Fred.

    Have you added any error checking to the code?

    Add #DEBUG ERROR ON to your code, and maybe write data to a "log" file as the code progresses until you can narrow down the cause of the problem.

    Note that PBANIM is not a genuine PowerBASIC example file (it is code provided by a customer).

    Best of luck!

    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    mailto:[email protected]


    • #3
      Thanks Lance I'll try those things.

      Client Writeup for the CPA

      Links Page


      • #4
        I'm embarrassed. I renamed one of the bmp files "bgtm16.bmp" to something else and got the error. (I hadnt sent it to my son-
        in-law as it wasnt one i was using - ill have to check how
        and what it is exactly). But that seems to be it. Should have
        checked something like that first thing. oh well, live and learn.

        Client Writeup for the CPA

        Links Page