Connecting Tech Pros Worldwide Forums | Help | Site Map

Windows Error at run-time...

Reimar Twelker
Guest
 
Posts: n/a
#1: Jul 22 '05
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

Victor Bazarov
Guest
 
Posts: n/a
#2: Jul 22 '05

re: Windows Error at run-time...


Reimar Twelker wrote:[color=blue]
> I'm learning OpenGL and unfortunately I am also new to C++...[/color]

The two are relatively orthogonal. You can learn C++ without learning
OpenGL and vice versa.
[color=blue]
> 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![/color]

What kind of help do you expect? Perhaps you should start by reading
the FAQ: http://www.parashift.com/c++-faq-lite/
[color=blue]
>
> ...I don't have to tell you that I don't know ANYTHING about debugging
> in Visual C++ ...:)[/color]

You don't need to know anything about debugging in Visual C++ to be
a decent C++ programmer.
[color=blue]
>
> I think that my problem is caused by some sort of NULL-pointer I am
> writing...[/color]

Yes, looks like it.
[color=blue]
> 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...[/color]

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
John Harrison
Guest
 
Posts: n/a
#3: Jul 22 '05

re: Windows Error at run-time...


On 21 Jul 2004 13:58:44 -0700, Reimar Twelker <existenzquantor@gmx.de>
wrote:
[color=blue]
> 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++ ...:)[/color]

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.
[color=blue]
>
> I think that my problem is caused by some sort of NULL-pointer I am
> writing..[/color]

Seems plausible.
[color=blue]
> 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...
>[/color]

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
JKop
Guest
 
Posts: n/a
#4: Jul 22 '05

re: Windows Error at run-time...



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


-JKop
Reimar Twelker
Guest
 
Posts: n/a
#5: Jul 22 '05

re: Windows Error at run-time...


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
Closed Thread