Error message

This is a discussion on Error message within the C++ Programming forums, part of the General Programming Boards category; I'm new to C++ and I'm trying to learn using a tutorial. the program I use is Dev-C++ 5 Beta ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    2

    Question Error message

    I'm new to C++ and I'm trying to learn using a tutorial. the program I use is Dev-C++ 5 Beta 9.2 (4.9.9.2) from www.bloodshed.net

    In the title bar it says "16 bit MS-DOS Subsystem"
    .Exe Path
    The NTVDM CPU has encountered an illegal instruction.
    CS:0de3 IP:0103 OP:63 6c 75 64 65 Choose 'Close' to terminate the application.

    any help?
    Last edited by Soviet; 10-02-2007 at 06:30 PM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,506
    What code did you try to compile?

    Since Dev-C++ comes with a 32-bit compiler, I'm puzzled as to where the 16-bit MS-DOS is coming from.

    Do you have other compilers installed on your machine, say TurboC ?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    I think the OP is using a relatively old version of Windows. I used to get exactly that sort of error sometimes with Windows 98, but only when my code really trashed the memory. And I mean seriously, completely fried it. Like allocated every last byte or systematically filled the entire memory starting from where mode 13h began.

    (The usual dialog box is the Illegal Operation, End Now one.)

    I think it was some of Windows 98's 16-bit code kicking in, so you wouldn't get that sort of error on modern systems.

    Anyway, since the OP is trying to learn C from a tutorial, I doubt that they could be trashing the memory seriously enough to warrant this. (Of course, they could be. Soviet, can you post the code you were using?) It's more likely that they downloaded some version of Dev-C++ that doesn't work on their system for some reason.

    What operating system are you using? What code did you try to compile? Did this error occur when you ran Dev-C++'s installer, ran Dev-C++ itself, compiled your program, or tried to run it?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    2

    Unhappy

    Im running windows XP sp2, the code I did was the "hello world", and it happend when i tried to run the program. Would you advise to reinstall the older version because a friend of mine told me to install the beta. Might that have something to do with it?

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,506
    The one you have would seem to be the latest one.
    You could try uninstall/reinstall, but to be honest I've no real idea what the problem is.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Registered Abuser
    Join Date
    Sep 2007
    Location
    USA/NJ/TRENTON
    Posts
    127
    This is from microsoft.com:

    Error Message:

    The NTVDM CPU has encountered an illegal instruction.

    User Action:

    Retry the operation. If you still get this message, try to continue. If you are able to continue, you might want to check the results of the running application. Otherwise, terminate the application, then restart it. If you still get this message, contact your technical support group or the supplier of the running application.
    Hehe. I guess microsoft.com won't be much help to you!

    I would assume it's not Dev C++ creating this problem. The problem most likely occured once the DOS command window was opened (to run your HelloWorld promgram).

    That's not to say there's something wrong with MS-DOS on your machine however...

    Might I suggest disabling your internet connections, then running your program.

    If that doesn't work, I'd try your darnedest to run an anti-spyware or something on your puter. It sounds like that's the problem.

  7. #7
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Well, an illegal instruction it may be... the "opcode" spells the text-fragment "clude" - maybe "include", and it's pretty meaningless as instructions (63 = arpl, 6c = insb, 75=jnz, 64=fs: 65= change address size). Whilst almost all those are "useful" instructions, the sequence is fairly meaningless. arpl is not a user-mode instruction, so it's either jumped to a text-string, or it's jumped to the middle of some instructions.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Nice find. I think the text string is more likely.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #9
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,506
    > the "opcode" spells the text-fragment "clude"
    From matsp's analysis, it would look like you renamed a .c file as a .com file (which would cause the 16-bit VDM to be run).

    That and the IP is 103 means that the first 3 characters of the file were in all likelyhood "#in"

    Now, what exactly did you do to compile the program, did you just rename it to see what happened?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  10. #10
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Impressive breakdown, matsp.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21