Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Windows Error at run-time...

Reply
Thread Tools

Windows Error at run-time...

 
 
Reimar Twelker
Guest
Posts: n/a
 
      07-21-2004
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
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      07-21-2004
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
 
Reply With Quote
 
 
 
 
John Harrison
Guest
Posts: n/a
 
      07-21-2004
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
 
Reply With Quote
 
JKop
Guest
Posts: n/a
 
      07-21-2004

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


-JKop
 
Reply With Quote
 
Reimar Twelker
Guest
Posts: n/a
 
      07-22-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Windows logon Screen in Windows 7 and Windows 2008 Tech Guy Windows 64bit 0 04-27-2011 12:59 PM
Windows error 126 loading a dll on windows 2000 luis Python 1 07-25-2007 07:16 PM
!Windows Live Mail replace Outlook Express on Windows XP and Windows Mail on Vista... Max Burke NZ Computing 8 05-18-2007 12:10 AM
Windows Explorer error using Windows 2000 Rod Computer Support 5 05-23-2006 06:53 PM
Windows XP keeps restarting automatically before system finishes booting. GET ERROR: "We apologize for the inconveience but windows was not shutdown properly...." DaWurm Computer Support 3 11-15-2003 11:29 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57