Windows - Unix

M

Mike

Hi
- I get an error on Vista but not on Linux:

An exception (first chance) at 0x71fe76af in X-Plane.exe: 0xC0000005:
Access violation reading location 0x35828000 on.
Unhandled exception at 0x71fe76af in X-Plane.exe: 0xC0000005: Access
violation reading location 0x35828000 on.

What to do? Secondly on Windows I simply include my dll's in the app
folder. (openal etc.) How should I handle this on Unix (Mac and
Linux)?

Many thanks
Michael
 
E

Esa Lakaniemi

Hi
- I get an error on Vista but not on Linux:

An exception (first chance) at 0x71fe76af in X-Plane.exe: 0xC0000005:
Access violation reading location 0x35828000 on.
Unhandled exception at 0x71fe76af in X-Plane.exe: 0xC0000005: Access
violation reading location 0x35828000 on.

What to do? Secondly on Windows I simply include my dll's in the app
folder. (openal etc.) How should I handle this on Unix (Mac and
Linux)?

Many thanks
Michael

How could you possibly be helped if we don't know what you're doing?
 
M

Maxim Yegorushkin

Hi
- I get an error on Vista but not on Linux:

An exception (first chance) at 0x71fe76af in X-Plane.exe: 0xC0000005:
Access violation reading location 0x35828000 on.
Unhandled exception at 0x71fe76af in X-Plane.exe: 0xC0000005: Access
violation reading location 0x35828000 on.

It must be a bug in Vista if it runs all right on Linux.
What to do? Secondly on Windows I simply include my dll's in the app
folder. (openal etc.) How should I handle this on Unix (Mac and
Linux)?

The most authoritative source of knowledge on this subject is "DSO HOWTO
- How To Write Shared Libraries"
http://people.redhat.com/~drepper/dsohowto.pdf
 
M

Mike

image = IMG_Load(pFileName);

if (image) {
glPixelStorei(GL_UNPACK_ALIGNMENT,4);
XPLMGenerateTextureNumbers(&gTexture[TextureId], 1);
XPLMBindTexture2d(gTexture[TextureId], 0);
gluBuild2DMipmaps(GL_TEXTURE_2D, 4, image->w, image->h, GL_RGBA,
GL_UNSIGNED_BYTE, image->pixels);

it loads 3 pictures correctly with SDL than suddenly (worked
yesterday) with the 4th image i get the above error on Vista but not
on Linux. (at the last line above)


Concerning my dll question i only want to know how to package them for
Mac&Linux. Same as on Windows in the app. folder? (openal, sdl etc.)
Thanks
 
J

Juha Nieminen

Mike said:
Hi
- I get an error on Vista but not on Linux:

An exception (first chance) at 0x71fe76af in X-Plane.exe: 0xC0000005:
Access violation reading location 0x35828000 on.
Unhandled exception at 0x71fe76af in X-Plane.exe: 0xC0000005: Access
violation reading location 0x35828000 on.

What to do?

You start debugging the program, that's what.
Secondly on Windows I simply include my dll's in the app
folder. (openal etc.) How should I handle this on Unix (Mac and
Linux)?

You don't include any dll's, it's that simple. (The unix/linux mentality
is that programs require, but don't provide, dynamically loadable libraries,
and the user has to install them in the system if they aren't already.)
 
R

RB

If you are getting an access exception it means your code is accessing an
address area that is not allowed (many times this is a ptr that comes up zero).
I don't know anything about the exception handling implementation in Linux nor
would I know what addresses are protected in Linux.
But in Vista if you step thru your code (or put a breakpoint or your first chance
exception given addr of 0x35828000, when you get the exception in the output
window it will have have put an arrow on the offending statement on exit, OR
on most MS IDEs you can double click on the error in the output window and it
will take you to the statement), put up a watch window on the ptr or var that is
doing the offense and you will see the illegal addr being accessed as it comes up.
Then all you have to do is fix your code so it has a legal addr.
 
M

Maxim Yegorushkin

image = IMG_Load(pFileName);

if (image) {
glPixelStorei(GL_UNPACK_ALIGNMENT,4);
XPLMGenerateTextureNumbers(&gTexture[TextureId], 1);
XPLMBindTexture2d(gTexture[TextureId], 0);
gluBuild2DMipmaps(GL_TEXTURE_2D, 4, image->w, image->h, GL_RGBA,
GL_UNSIGNED_BYTE, image->pixels);

it loads 3 pictures correctly with SDL than suddenly (worked
yesterday) with the 4th image i get the above error on Vista but not
on Linux. (at the last line above)

You posted seven executable lines. A good first step would be to
identify which line causes the crash.
Concerning my dll question i only want to know how to package them for
Mac&Linux. Same as on Windows in the app. folder? (openal, sdl etc.)

There are different packaging guidelines for Mac and different
distributions of Linux. For Fedora Linux
http://fedoraproject.org/wiki/Packaging/Guidelines
 
V

Vladimir Jovic

Mike said:
Hi
- I get an error on Vista but not on Linux:

An exception (first chance) at 0x71fe76af in X-Plane.exe: 0xC0000005:
Access violation reading location 0x35828000 on.
Unhandled exception at 0x71fe76af in X-Plane.exe: 0xC0000005: Access
violation reading location 0x35828000 on.

What to do? Secondly on Windows I simply include my dll's in the app
folder. (openal etc.) How should I handle this on Unix (Mac and
Linux)?

Remove windows, and work only on linux. Problem solved :)
 
V

Vladimir Jovic

RB said:
If you are getting an access exception it means your code is accessing
an address area that is not allowed (many times this is a ptr that comes
up zero).
I don't know anything about the exception handling implementation in
Linux nor
would I know what addresses are protected in Linux.
But in Vista if you step thru your code (or put a breakpoint or your
first chance
exception given addr of 0x35828000, when you get the exception in the
output
window it will have have put an arrow on the offending statement on
exit, OR
on most MS IDEs you can double click on the error in the output window
and it will take you to the statement), put up a watch window on the ptr
or var that is doing the offense and you will see the illegal addr being
accessed as it comes up.
Then all you have to do is fix your code so it has a legal addr.

I like this way of solving problems. When I think of all those unit
tests that I wasted my time on...
 
M

Mike

ok seems to work again. I probably have a little mess with my
declarations. It's handy to see in the code the unused parts, any way
to see unused declarations?
Eclipse or VC2008

I also defined a preprocessor symbol IBM = 1 is for Windows. Now how
should my code look like?
//if (IBM == 1){
alutInit(0, NULL);
//}
seems wrong.

I won't bother any users to install on Mac/Linux any libs. Should i
try to include those sdl/openal etc. in my main application folder?
Well Linux users
might be ok but i doubt Mac users to be very happy?
Thanks
 
V

Victor Bazarov

ok seems to work again. I probably have a little mess with my
declarations. It's handy to see in the code the unused parts, any way
to see unused declarations?
Eclipse or VC2008

I also defined a preprocessor symbol IBM = 1 is for Windows. Now how
should my code look like?
//if (IBM == 1){
alutInit(0, NULL);
//}
seems wrong.

It would work, of course. Generally if you have a macro defined at all,
and want to check whether it's defined or not during compilation
(preprocessing, actually), you use

#ifdef IBM
... // conditionally compiled code
#endif

If you define it all the time and want to check the value, you do

#if IBM==1
...
#endif

Just open your favorite C++ book and look for the chapter on its
preprocessor.
I won't bother any users to install on Mac/Linux any libs. Should i
try to include those sdl/openal etc. in my main application folder?

I don't know the answer to this. I don't think it has anything to do
with the C++ language.
Well Linux users
might be ok but i doubt Mac users to be very happy?

You should probably ask Mac users. Again, this is not a C++ language issue.

V
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top