Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

What does it mean!? (Cruddy Error)

Options
  • 08-12-2004 2:59pm
    #1
    Registered Users Posts: 1,253 ✭✭✭


    Hey all,

    What does it mean if a C file will compile no problems but when executed it causes a Windows error and Windows shuts it down?

    Does it mean that Windows is crud!? Even if it does whats the bottom line for me? How can I get this bit of code to work??

    Cheers,
    Gob.

    Ps: I didnt write the code but I need it to work for a project. Its uber important! :eek:


Comments

  • Registered Users Posts: 1,038 ✭✭✭rob1891


    run the program through a debugger, that will show you where in the code the program dies, it's probably a buffer overrun.


  • Registered Users Posts: 6,508 ✭✭✭daymobrew


    You could post the code here, as an attachment, and a bored developer might have a wee gander at it. Be sure to say what compiler you are using and what version of Windows you have.


  • Registered Users Posts: 1,253 ✭✭✭gobby


    Well, I did a wee bit of debugging and I have found where the error occurs. Have to examine that file. I think that it prob is where the wrong element of an array is trying to be accessed. I wont post the code just yet cos its not just one file. Theres a directory full of files and not all of them are relevent. The error that I get is an access violation one.

    Thanx btw...


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,687 Mod ✭✭✭✭Capt'n Midnight


    gobby wrote:
    What does it mean if a C file will compile no problems but when executed it causes a Windows error and Windows shuts it down?

    Does it mean that Windows is crud!? Even if it does whats the bottom line for me? How can I get this bit of code to work??
    This program was rejected by a compiler
    10 GOT 10


    this variation compiled ok and when it ran they had to reboot the VAX 11/780 mainframe because it was using so much process time that they couldn't get in to stop it.
    10 REM
    20 GOTO 10


    Moral - if you don't get compiler errors then there are no obvious synthax errors. However, logical errors may abound.

    If only compilers had an option...
    On Error Then Fix


  • Registered Users Posts: 4,475 ✭✭✭corblimey


    Or how about

    On Error Do What I Meant You To Do In The First Place


  • Advertisement
  • Registered Users Posts: 2,660 ✭✭✭Baz_


    corblimey wrote:
    Or how about

    On Error Do What I Meant You To Do In The First Place... YOU DAMN BASTARD MACHINE!!!

    thats more like it.


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    gobby wrote:
    Hey all,

    What does it mean if a C file will compile no problems but when executed it causes a Windows error and Windows shuts it down?

    Does it mean that Windows is crud!? Even if it does whats the bottom line for me? How can I get this bit of code to work??

    Cheers,
    Gob.

    Ps: I didnt write the code but I need it to work for a project. Its uber important! :eek:
    I think it means you don't know the difference between compile-time and run-time errors.

    jc


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    Altough the fact that windows shuts down does show it as being a bit crap. A good OS should keep going no matter what programming errors we make.


  • Registered Users Posts: 6,508 ✭✭✭daymobrew


    stevenmu wrote:
    Altough the fact that windows shuts down does show it as being a bit crap. A good OS should keep going no matter what programming errors we make.

    Windows doesn't shut down, it correctly shuts the app down. That's how I read it.
    gobby wrote:
    Windows shuts it down


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    closed this damned thread.


  • Advertisement
  • Registered Users Posts: 1,253 ✭✭✭gobby


    Jesus lads, no need to go starting silly debates.

    Appologies for this thread. Im in my final year (Engineering) and I do know the difference between compile time and run time errors. Just very stressed and looking for a quick fix. Shame that sort of thing doesnt exist.

    Thanks to all for replying. If I get time I will prob post the problem with some proper detail.

    Close thread...


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    daymobrew wrote:
    Windows doesn't shut down, it correctly shuts the app down. That's how I read it.
    Ah, I misread, apologies to Mr. Gates.


  • Registered Users Posts: 7,276 ✭✭✭kenmc


    gobby wrote:
    Im in my final year (Engineering) and I do know the difference between compile time and run time errors.
    Are you sure???? No offense, but the first thing you said was
    gobby wrote:
    What does it mean if a C file will compile no problems but when executed it causes a Windows error and Windows shuts it down?
    Does it mean that Windows is crud!?
    Doesn't sound like a very scientific solution to a problem. Sounds more like "This doesn't work, something is wrong, windows is something => windows is wrong" to me. (you're right, windows IS crud, but thats besides the point though)
    As a programmer you will quickly learn that *you* have almost always made the mistake. You. Not someone else, not the compiler, not the chip manufacturer, you. Only when you have PROVED that it is not you, can you start to blame others. But you've to find out who to blame specifically, not everyone. And even if you didn't write the code, but have compiled it, it's YOUR job to see whats wrong with the environment you have. Maybe it was written for WinXP and you're on Win2K. Or maybe win98 and you're on NT... maybe you've got a different version of a dll file... there could be countless things wrong.

    for what it's worth it sounds like a memory error - thats how windows usually behaves when you get a memory access error. in *nix it'd be a core dump


Advertisement