Windows Error at run-time...

Discussion in 'C++' started by Reimar Twelker, Jul 21, 2004.

  1. Hi there,
    I'm learning OpenGL and unfortunately I am also new to C++...
    My problem is that I am not used to pointers (yet) and my little app
    always crashes at run-time...access violation of some sort.

    The windows message reads:
    ....the expression <memory address> points to <0x00000000>. The process
    'written' could not be executed...

    I have been trying to fix this for a few days now and I NEED HELP!

    ....I don't have to tell you that I don't know ANYTHING about debugging
    in Visual C++ ...:)

    I think that my problem is caused by some sort of NULL-pointer I am
    writing...
    By the way: I have written a class and when I try to create an
    instance, my app doesn't even create an application window but crashes
    on the spot. I came across this (new?) problem when I tried to avoid
    using pointers :| Maybe something is wrong with my class definition
    but I'm not new to OOP, I have been using Java for quite some time...

    Thanx in advance!!
    Reimar
    Reimar Twelker, Jul 21, 2004
    #1
    1. Advertising

  2. Reimar Twelker wrote:
    > I'm learning OpenGL and unfortunately I am also new to C++...


    The two are relatively orthogonal. You can learn C++ without learning
    OpenGL and vice versa.

    > My problem is that I am not used to pointers (yet) and my little app
    > always crashes at run-time...access violation of some sort.
    >
    > The windows message reads:
    > ...the expression <memory address> points to <0x00000000>. The process
    > 'written' could not be executed...
    >
    > I have been trying to fix this for a few days now and I NEED HELP!


    What kind of help do you expect? Perhaps you should start by reading
    the FAQ: http://www.parashift.com/c -faq-lite/

    >
    > ...I don't have to tell you that I don't know ANYTHING about debugging
    > in Visual C++ ...:)


    You don't need to know anything about debugging in Visual C++ to be
    a decent C++ programmer.

    >
    > I think that my problem is caused by some sort of NULL-pointer I am
    > writing...


    Yes, looks like it.

    > By the way: I have written a class and when I try to create an
    > instance, my app doesn't even create an application window but crashes
    > on the spot. I came across this (new?) problem when I tried to avoid
    > using pointers :| Maybe something is wrong with my class definition
    > but I'm not new to OOP, I have been using Java for quite some time...


    When you have pointer problems like the one you described, it is most
    likely in the implementation, not necessarily in the class definition.

    By the way: what C++ book are you using to learn?

    V
    Victor Bazarov, Jul 21, 2004
    #2
    1. Advertising

  3. On 21 Jul 2004 13:58:44 -0700, Reimar Twelker <>
    wrote:

    > Hi there,
    > I'm learning OpenGL and unfortunately I am also new to C++...
    > My problem is that I am not used to pointers (yet) and my little app
    > always crashes at run-time...access violation of some sort.
    >
    > The windows message reads:
    > ...the expression <memory address> points to <0x00000000>. The process
    > 'written' could not be executed...
    >
    > I have been trying to fix this for a few days now and I NEED HELP!
    >
    > ...I don't have to tell you that I don't know ANYTHING about debugging
    > in Visual C++ ...:)


    Visual C++ has an excellent and intuitive debugger, learning how to use it
    would probably be the quickest way of solving your problem. Look on it as
    an opportunity.

    >
    > I think that my problem is caused by some sort of NULL-pointer I am
    > writing..


    Seems plausible.

    > By the way: I have written a class and when I try to create an
    > instance, my app doesn't even create an application window but crashes
    > on the spot. I came across this (new?) problem when I tried to avoid
    > using pointers :| Maybe something is wrong with my class definition
    > but I'm not new to OOP, I have been using Java for quite some time...
    >


    In the absence of any code it's very hard to help. Please post the
    smallest program you can that has this problem.

    Also please note that OpenGL is not on topic in this group. If you program
    is stuffed full of OpenGL code or if the problem is something to do with
    the way you are using OpenGL then you would be better off asking your
    question elsewhere (not sure where tho').

    Perhaps you could read this group's welcome message first, to get an idea
    of what this group is about.

    http://www.slack.net/~shiva/welcome.txt

    john
    John Harrison, Jul 21, 2004
    #3
  4. Reimar Twelker

    JKop Guest

    You're problem here is that you didn't post code.


    -JKop
    JKop, Jul 21, 2004
    #4
  5. Hi again,
    sorry, that I didn't post any code yesterday, hard to give advice
    without having anything to think about...OK, I used (I actually
    clicked here and there...) the VC++ Debugger and voila!...
    problem solved...I hope it lasts:)

    Some of my pointers were bad...

    Thanks all!
    Reimar
    Reimar Twelker, Jul 22, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Cook
    Replies:
    0
    Views:
    442
    Paul Cook
    Nov 6, 2003
  2. Tzury Bar Yochay
    Replies:
    3
    Views:
    479
    Jacob Yang [MSFT]
    Nov 29, 2003
  3. flamesrock
    Replies:
    8
    Views:
    438
    Hendrik van Rooyen
    Nov 24, 2006
  4. iskeletor
    Replies:
    3
    Views:
    356
    Barry Schwarz
    Dec 26, 2006
  5. Pierre Yves
    Replies:
    2
    Views:
    473
    Pierre Yves
    Jan 10, 2008
Loading...

Share This Page