open AL crash with EXC_BAD_ACCESS

carlo
Unregistered
 
Post: #1
Hey guys

im new not only to idevgames but im also new to openAl. im currently enrolled in a graphic programming class and for the final project we had free reign on what to do. i decided to do a graphical robot (very primitive!) but i wanted to add sound for when my robot is transforming. Now the problem is it works fine with out audio (well more or less at the moment) but once i extend my program to the openAL framwork (xcode) it crashes and none of the animations work. Mad

any help would be appreciated. i would post the code but im up to like 1000 lines of code already :0)

thanks guys
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Post the crash log, and the functions of yours that show up in the crash log, with any relevant context (eg. class declarations) or nobody can help you.
Quote this message in a reply
carlo
Unregistered
 
Post: #3
Blink
first off, thanks OneSadCookie for the tip on forums, this is actually the first time im using this method for help Smile

so ive been working at this all day and now i dont even know what i did and now the animations work. however now the sound doesnt! Mad

here are some code fragments

these are some initialization values
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#include <OpenAL/alut.h>

#define SHOULDER_TURN 1
#define ELBOW_TURN 1
#define UP_LEG_MOVE 1

double MECHX = 0;//x component for the initial positon of robot
double MECHY = 0;//y component for the initial positon of robot
double MECHZ = 0;//z component for the initial positon of robot


this is where I initialize most things for the audio set up

#define NUM_BUFFERS 3
#define NUM_SOURCES 3
#define NUM_ENVIRONMENTS 1

ALfloat listenerPos[]={0.0,0.0,0.0};
ALfloat listenerVel[]={0.0,0.0,0.0};
ALfloat listenerOri[]={0.0,0.0,-1.0, 0.0,1.0,0.0};

ALfloat source0Pos[]={ 0.0, 0.0, 0.0};
ALfloat source0Vel[]={ 0.0, 0.0, 0.0};


ALfloat source1Pos[]={ 0.0, 0.0, 0.0};
ALfloat source1Vel[]={ 0.0, 0.0, 0.0};

ALfloat source2Pos[]={ 0.0, 0.0, -4.0};
ALfloat source2Vel[]={ 0.0, 0.0, 0.0};

ALuint buffer[NUM_BUFFERS];
ALuint source[NUM_SOURCES];
ALuint environment[NUM_ENVIRONMENTS];
int GLwin;

ALsizei size,freq;
ALenum format;
ALvoid *data;

void initAudio(void)
{
alutInit(0, NULL);

alListenerfv(AL_POSITION,listenerPos);
alListenerfv(AL_VELOCITY,listenerVel);
alListenerfv(AL_ORIENTATION,listenerOri);

alGetError(); // clear any error messages

if(alGetError() != AL_NO_ERROR)
{
printf("- Error creating buffers !!\n");
exit(1);
}
else
{
printf("init() - No errors yet.");

}

// Generate buffers
alGenBuffers(NUM_BUFFERS, buffer);

alutLoadWAVFile("Volumes/Zoe HD/Spy.wav",&format,&data,&size,&freq);
alBufferData(buffer[0],format,data,size,freq);
alutUnloadWAV(format,data,size,freq);

alGetError(); /* clear error */
alGenSources(NUM_SOURCES, source);

if(alGetError() != AL_NO_ERROR)
{
printf("- Error creating sources !!\n");
exit(2);
}
else
{
printf("init - no errors after alGenSources\n");
}

alSourcef(source[0],AL_PITCH,1.0f);
alSourcef(source[0],AL_GAIN,1.0f);
alSourcefv(source[0],AL_POSITION,source0Pos);
alSourcefv(source[0],AL_VELOCITY,source0Vel);
alSourcei(source[0],AL_BUFFER,buffer[0]);
alSourcei(source[0],AL_LOOPING,AL_TRUE);

}

This is where initAudio is called

void init(void)
{
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(fovY, (double) winWidth / (double) winHeight, near, far);

glEnable(GL_DEPTH_TEST);

GLfloat specular [] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat shininess [] = { 100.0 };
GLfloat position1 [] = { 1.0, 1.0, 1.0, 0.0 };

// Set the clear color to black
glClearColor(0.0, 0.0, 0.0, 0.0);

// Set the shading model
glShadeModel(GL_SMOOTH);
// Set the polygon mode to fill
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);

// Define material properties of specular color and degree of
// shininess.
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);
glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, shininess);

// Set the GL_AMBIENT_AND_DIFFUSE color state variable to be the
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glEnable(GL_COLOR_MATERIAL);

// Create a Directional Light Source
glLightfv(GL_LIGHT0, GL_POSITION, position1);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);

glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
initAudio();
} // init()

this is part of the handleSpecialFunc(); passed to the glutKeyboardFunc() so that i could just press t and the transfomation would occur and the music would play

else if(key == 'm')
{
shoot(20);
}
else if(key == 't')
{
transformHEAD(25);
transformARMS_X(10);
transformLEGS_X(10);
alSourcePlay(source[0]);
}
else if(key =='k')
{
alutExit();
exit(0);
}

i dont know if this funcion is necessary but ill post it nonetheless just in case
this is the function that displays my robot

void displayMECH(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(cameraX, cameraY, cameraZ, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);

drawTORSO();

glPushMatrix();
glTranslatef(transformMechX,transformMechY,transformMechZ);
drawHEAD();
glPopMatrix();

glPushMatrix();
glTranslatef(leftArmX,leftArmY,leftArmZ);
drawLeftSHOULDER();
drawLeftUPPER_ARM();
drawLeftELBOW();
drawGUN();
if(not_shot)
{
drawBULLET();
}

if(BULLETY < -0.3 && BULLETY > -0.5)
{
drawEXPLOSION();
}
glPopMatrix();

glPushMatrix();
glTranslatef(rightArmX, rightArmY,rightArmZ);
drawRightSHOULDER();
drawRightUPPER_ARM();
drawRightELBOW();
glPopMatrix();

drawHIP();

glPushMatrix();
glTranslatef(leftLegX,leftLegY,leftLegZ);
drawLeftHIP_JOINT();
drawLeftUPPER_LEG();
drawLeftKNEE();
drawLeftCHIN();
glPopMatrix();

glPushMatrix();
glTranslatef(rightLegX,rightLegY,rightLegZ);
drawRightHIP_JOINT();
drawRightUPPER_LEG();
drawRightKNEE();
drawRightCHIN();
glPopMatrix();

glutSwapBuffers();
}
and finally my main

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowSize(winWidth, winHeight);
glutInitWindowPosition(1, 1);

alutInit(&argc, argv) ;

glutCreateWindow("mech");
init();
glutDisplayFunc(displayMECH);
glutKeyboardFunc(handleSpecialDownKeys);
glutReshapeFunc(handleReshape);

glutMainLoop();
} // main(int, char**)

im not sure as to how many times the alutInit function should be used? if one in main and one in initAudio(); i may have mis understood in the tutorial i used Wacko
Quote this message in a reply
carlo
Unregistered
 
Post: #4
now! i found out why the music isnt playing, i forgot to put the leading "/" in the path to the music. the file im trying to play is 20 mb in size could that be the prob?
Quote this message in a reply
carlo
Unregistered
 
Post: #5
here is the crash report

Date/Time: 2006-03-29 17:30:06 -0400
OS Version: 10.3.9 (Build 7W98)
Report Version: 2

Command: mechSoldier
Path: /Users/CHAMP/mechSoldier/build/mechSoldier
Version: ??? (???)
PID: 1643
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0 Crashed:
0 <<00000000>> 0x00000000 0 + 0
1 libstdc++_ZeroLink.dylib 0x00333e50 std::basic_ostream<char, std::char_traits<char> >::operator<<(double) + 0x94
2 mechSoldier.ob 0x000a62d0 shoot(int) + 0x48 (mechSoldier.cpp:293)
3 mechSoldier.ob 0x000a6248 liftArm2Shoot(int) + 0x4c (mechSoldier.cpp:283)
4 com.apple.glut 0x86ed237c __glutTimerCallBack + 0x48
5 com.apple.CoreFoundation 0x901c4500 __CFRunLoopDoTimer + 0xf4
6 com.apple.CoreFoundation 0x901c1860 __CFRunLoopRun + 0x5c8
7 com.apple.CoreFoundation 0x901c5d74 CFRunLoopRunSpecific + 0x148
8 com.apple.HIToolbox 0x92886e10 RunCurrentEventLoopInMode + 0xac
9 com.apple.HIToolbox 0x9288d53c ReceiveNextEventCommon + 0x17c
10 com.apple.HIToolbox 0x928af638 BlockUntilNextEventMatchingListInMode + 0x60
11 com.apple.AppKit 0x92e822ac _DPSNextEvent + 0x180
12 com.apple.AppKit 0x92e98d2c -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 0x74
13 com.apple.glut 0x86eb8ca8 -[GLUTApplication _runMainLoopUntilDate:autoreleasePool:] + 0x48
14 com.apple.glut 0x86eb8e50 -[GLUTApplication run] + 0x118
15 com.apple.glut 0x86ed2d28 glutMainLoop + 0xa4
16 mechSoldier.ob 0x000abe54 main + 0xb4 (mechSoldier.cpp:1147)
17 mechSoldier 0x00001a74 start + 0x1c8
18 dyld 0x8fe1a278 _dyld_start + 0x64

Thread 1:
0 libSystem.B.dylib 0x900078b8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007438 mach_msg + 0x38
2 com.apple.CoreFoundation 0x901c15e8 __CFRunLoopRun + 0x350
3 com.apple.CoreFoundation 0x901c5d74 CFRunLoopRunSpecific + 0x148
4 com.apple.audio.CoreAudio 0x914b04b8 HALRunLoop::OwnThread(void*) + 0x104
5 com.apple.audio.CoreAudio 0x914b02ec CAPThread::Entry(CAPThread*) + 0x30
6 libSystem.B.dylib 0x90024990 _pthread_body + 0x28

Thread 2:
0 libSystem.B.dylib 0x90018e78 semaphore_timedwait_signal_trap + 0x8
1 libSystem.B.dylib 0x9000ea14 _pthread_cond_wait + 0x268
2 com.apple.audio.CoreAudio 0x914b2ef8 CAGuard::WaitFor(unsigned long long) + 0xdc
3 com.apple.audio.CoreAudio 0x914b2df8 CAGuard::WaitUntil(unsigned long long) + 0x130
4 com.apple.audio.CoreAudio 0x914cdcec HPIOThread::WorkLoop() + 0x358
5 com.apple.audio.CoreAudio 0x914ce894 HPIOThread::ThreadEntry(HPIOThread*) + 0x1c
6 com.apple.audio.CoreAudio 0x914b02ec CAPThread::Entry(CAPThread*) + 0x30
7 libSystem.B.dylib 0x90024990 _pthread_body + 0x28

PPC Thread State:
srr0: 0x00000000 srr1: 0x4000f030 vrsave: 0x00000000
cr: 0x22022248 xer: 0x00000000 lr: 0x0030f38c ctr: 0x00000000
r0: 0x00333e50 r1: 0xbfffec90 r2: 0x80adf030 r3: 0x80ae29ac
r4: 0x00000020 r5: 0x5e4e3e2c r6: 0x5e4e3e2c r7: 0x00000001
r8: 0x00000000 r9: 0x00000000 r10: 0x00000268 r11: 0x0038e500
r12: 0x00000000 r13: 0x00000000 r14: 0x00000000 r15: 0x00000001
r16: 0x00000001 r17: 0x00000000 r18: 0xa01c12b0 r19: 0x00000000
r20: 0x0000c65f r21: 0x00000000 r22: 0x00510c60 r23: 0x00510d58
r24: 0xa01c4414 r25: 0xa00016b4 r26: 0x80ae3da4 r27: 0x80ae3d9c
r28: 0x80ae2984 r29: 0x00000020 r30: 0x80ae3da0 r31: 0x000a62b0

Binary Images Description:
0x1000 - 0x1fff mechSoldier /Users/CHAMP/mechSoldier/build/mechSoldier
0xa4000 - 0xacfff mechSoldier.ob /Users/CHAMP/mechSoldier/build/mechSoldier.build/mechSoldier.build/Objects-normal/ppc/mechSoldier.ob
0xfc000 - 0xfdfff com.apple.aoa.halplugin 2.5.0 /System/Library/Extensions/IOAudioFamily.kext/Contents/PlugIns/AOAHALPlugin.bundle/Contents/MacOS/AOAHALPlugin
0x25c000 - 0x26dfff com.apple.iokit.IOHIDLib 1.3.6 /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib
0x2aa000 - 0x2d3fff com.apple.iSightAudio 7.0.4 /Library/Audio/Plug-Ins/HAL/iSightAudio.plugin/Contents/MacOS/iSightAudio
0x303000 - 0x377fff libstdc++_ZeroLink.dylib /Users/CHAMP/mechSoldier/build/mechSoldier.build/mechSoldier.build/Objects-normal/ppc/libstdc++_ZeroLink.dylib
0x462000 - 0x465fff libMPAEncode0.1.dylib /Library/Application Support/DivXNetworks/libMPAEncode0.1.dylib
0x48a000 - 0x49cfff libdpv10.dylib /Library/Application Support/DivXNetworks/libdpv10.dylib
0x711000 - 0x742fff liblame3.92.dylib /Library/Application Support/DivXNetworks/liblame3.92.dylib
0x1008000 - 0x1068fff libdpus10.dylib /Library/Application Support/DivXNetworks/libdpus10.dylib
0x10b6000 - 0x10cffff GLDriver /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLDriver.bundle/GLDriver
0x1205000 - 0x12cffff com.divxnetworks.DivXCodec 5.2.1 /Library/QuickTime/DivX 5.component/Contents/MacOS/DivX 5
0x16b0000 - 0x17a5fff GLEngine /System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine
0x17b1000 - 0x17cbfff GLRendererFloat /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLRendererFloat.bundle/GLRendererFloat
0x4728000 - 0x49c6fff ATIRadeon8500GLDriver /System/Library/Extensions/ATIRadeon8500GLDriver.bundle/Contents/MacOS/ATIRadeon8500GLDriver
0x4a84000 - 0x4b13fff GLRasterARGB8888D32 /System/Library/Frameworks/OpenGL.framework/Resources/GLRasterARGB8888D32.bundle/GLRasterARGB8888D32
0x7fdf0000 - 0x7fdf1fff com.apple.zerolink 1.1 (3) /System/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/ZeroLink
0x806f3000 - 0x80714fff ??? OpenAL version 1.2.1 (1.0.1d1) /Library/Frameworks/OpenAL.framework/Versions/A/OpenAL
0x80830000 - 0x8090efff libxml2.2.dylib /usr/lib/libxml2.2.dylib
0x80a50000 - 0x80ad4fff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib
0x80c80000 - 0x80c88fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib
0x81f20000 - 0x81f23fff libmx.A.dylib /usr/lib/libmx.A.dylib
0x8262e000 - 0x82fedfff com.apple.QuickTimeComponents.component 7.0.4 /System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/QuickTimeComponents
0x84372000 - 0x84382fff com.apple.Accelerate.vecLib 3.0.3 (vecLib 3.0.3) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x8444e000 - 0x8444ffff libGLSystem.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLSystem.dylib
0x84540000 - 0x8456dfff libssl.0.9.dylib /usr/lib/libssl.0.9.dylib
0x846cc000 - 0x846d8fff com.apple.agl 2.5 (AGL-2.5) /System/Library/Frameworks/AGL.framework/Versions/A/AGL
0x86eb7000 - 0x86ef7fff com.apple.glut 3.2.7 (GLUT-3.2.7) /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT
0x87bab000 - 0x87c9cfff libGLProgrammability.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib
0x88100000 - 0x88236fff com.apple.vImage 1.2.0 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x88999000 - 0x88c47fff com.apple.QuickTime 7.0.4 /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
0x8b9b5000 - 0x8b9befff libz.1.1.3.dylib /usr/lib/libz.1.1.3.dylib
0x8fd50000 - 0x8fd50fff com.apple.Accelerate 1.0.3 (Accelerate 1.0.3) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x8fe00000 - 0x8fe4ffff dyld /usr/lib/dyld
0x90000000 - 0x9014ffff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x901c0000 - 0x9026dfff com.apple.CoreFoundation 6.3.8 (299.36) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x90490000 - 0x904adfff com.apple.audio.SoundManager 3.9 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
0x90584000 - 0x905f3fff com.apple.framework.IOKit 1.3.6 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x9060c000 - 0x9065cfff com.apple.HIServices 1.4.1 (0.0.1d1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x90940000 - 0x909b3fff com.apple.DesktopServices 1.2.5 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x90a20000 - 0x90b7bfff com.apple.Foundation 6.3.8 (500.61) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x910e0000 - 0x91133fff com.apple.bom 1.2.6 (64) /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x9113f000 - 0x9118afff libGLImage.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x9122a000 - 0x91236fff com.apple.help 1.0.1 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x91309000 - 0x91357fff com.apple.print.framework.Print 3.3 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x913a0000 - 0x9145ffff ColorSync /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x914ad000 - 0x91514fff com.apple.audio.CoreAudio 2.1.3 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x915e0000 - 0x91699fff com.apple.QD 3.4.70 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x917b6000 - 0x917eefff com.apple.AE 1.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x91809000 - 0x91812fff com.apple.DiskArbitration 2.0.5 /System/Library/PrivateFrameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x91819000 - 0x91824fff com.apple.opengl 1.3.8 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x91880000 - 0x91942fff com.apple.audio.units.Components 1.3.4 /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio
0x9194f000 - 0x9194ffff com.apple.Cocoa 6.3 (???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x91951000 - 0x91951fff com.apple.CoreServices 10.3 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x91953000 - 0x91953fff com.apple.ApplicationServices 1.0 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x91a2f000 - 0x91aa2fff com.apple.NavigationServices 3.3.3 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices
0x91aea000 - 0x91aeafff com.apple.audio.units.AudioUnit 1.3.3 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x91b10000 - 0x91b2afff libPDFRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libPDFRIP.A.dylib
0x91b50000 - 0x91b5ffff libPSRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libPSRIP.A.dylib
0x91b80000 - 0x91b93fff libRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x91f2f000 - 0x91f49fff com.apple.openscripting 1.2.1 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x91f57000 - 0x91f72fff com.apple.SystemConfiguration 1.7.1 (???) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x92056000 - 0x92061fff com.apple.securityhi 1.2 (90) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x920c0000 - 0x922a7fff com.apple.security 2.4 (177) /System/Library/Frameworks/Security.framework/Versions/A/Security
0x923c4000 - 0x923defff libGL.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x92430000 - 0x92468fff com.apple.LaunchServices 10.3.5 (98.4) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x9278f000 - 0x927b5fff com.apple.FindByContent 1.4 (1.2) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent
0x927c8000 - 0x927d3fff libCSync.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x927f0000 - 0x92827fff com.apple.CFNetwork 1.2.1 (7) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x9283f000 - 0x92852fff com.apple.speech.synthesis.framework 3.2 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x92880000 - 0x92c05fff com.apple.HIToolbox 1.3.7 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x92e70000 - 0x9336ffff com.apple.AppKit 6.3.9 (743.41) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x93920000 - 0x93930fff com.apple.speech.recognition.framework 3.3 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x939a0000 - 0x939b4fff libcups.2.dylib /usr/lib/libcups.2.dylib
0x93a50000 - 0x93a54fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib
0x93a56000 - 0x93af9fff libcrypto.0.9.dylib /usr/lib/libcrypto.0.9.dylib
0x93b2d000 - 0x93b35fff libbsm.dylib /usr/lib/libbsm.dylib
0x93b48000 - 0x93bd2fff com.apple.CoreServices.OSServices 3.0.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x93f5f000 - 0x93fcefff libobjc.A.dylib /usr/lib/libobjc.A.dylib
0x9410d000 - 0x94121fff libCGATS.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x9412a000 - 0x94141fff com.apple.LangAnalysis 1.5.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x9414d000 - 0x9415dfff com.apple.ImageCapture 2.1.5 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x9428c000 - 0x94344fff com.apple.audio.toolbox.AudioToolbox 1.3.4 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x94610000 - 0x9462afff libresolv.9.dylib /usr/lib/libresolv.9.dylib
0x94640000 - 0x94649fff libz.1.dylib /usr/lib/libz.1.dylib
0x946e0000 - 0x9473ffff com.apple.SearchKit 1.0.2 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x94800000 - 0x9488cfff com.apple.ink.framework 101.1.4 (55.12) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x948fa000 - 0x9495cfff libGLU.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x949ba000 - 0x949bafff com.apple.Carbon 10.3 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x94ea0000 - 0x954a6fff libBLAS.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x95500000 - 0x957d0fff libLAPACK.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x958e0000 - 0x95900fff libvMisc.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x95b50000 - 0x95c32fff libicucore.A.dylib /usr/lib/libicucore.A.dylib
0x95dfc000 - 0x95e14fff com.apple.WebServices 1.1.1 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
0x95e40000 - 0x95eadfff libvDSP.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x95ec2000 - 0x95ed8fff com.apple.QuartzCore 1.3 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x95f30000 - 0x9601efff libiconv.2.dylib /usr/lib/libiconv.2.dylib
0x962e6000 - 0x9655ffff com.apple.CoreServices.CarbonCore 10.3.7 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x96980000 - 0x96a48fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib
0x96aa0000 - 0x96acefff libssl.0.9.7.dylib /usr/lib/libssl.0.9.7.dylib
0x96ade000 - 0x96aebfff com.apple.CommonPanels 1.2.1 (1.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x96b50000 - 0x96bdffff ATS /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x96e80000 - 0x96e90fff com.apple.vecLib 3.0.3 (vecLib 3.0.3) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x96eca000 - 0x971a2fff com.apple.CoreGraphics 1.203.30 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x9721a000 - 0x972adfff com.apple.print.framework.PrintCore 3.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x97335000 - 0x9739efff com.apple.htmlrendering 1.1.2 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering
0xefbef000 - 0xefcd1fff libPSIKey.dylib /Library/Application Support/DivXNetworks/libPSIKey.dylib
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
That's not an OpenAL crash, that's a bug in your code -- mechSoldier.cpp line 293 to be precise Rasp
Quote this message in a reply
carlo
Unregistered
 
Post: #7
Holy crap you are absolutely right! thanks very much!!! 2 things now though, could you explain to me why just a call to cout to standard output would crash it? and tell me if this is how you figured that out?
KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
does that (0x002) refer to
2 mechSoldier.ob 0x000a62d0 shoot(int) + 0x48 (mechSoldier.cpp:293)
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
the important information in your crash report is:

Quote:Exception: EXC_BAD_ACCESS (0x0001)

That tells you that it's some kind of memory error. Running over the end of an array is the easiest way to cause this, but certainly not the only one. Almost every crash you get will say this :/

Quote:Thread 0 Crashed:

Thread zero crashed. Unless you're doing multithreading yourself, chances are that you can ignore all the other threads.

Quote:0 <<00000000>> 0x00000000 0 + 0
1 libstdc++_ZeroLink.dylib 0x00333e50 std::basic_ostream<char, std::char_traits<char> >::operator<<(double) + 0x94
2 mechSoldier.ob 0x000a62d0 shoot(int) + 0x48 (mechSoldier.cpp:293)
3 mechSoldier.ob 0x000a6248 liftArm2Shoot(int) + 0x4c (mechSoldier.cpp:283)

liftArm2Shoot (line 283) called shoot (line 293) which called std::cout << someDouble, which jumped off to address zero. Why? Who knows. The fact that you're zero-linked is suspicious -- does your project compile in Release mode?
Quote this message in a reply
carlo
Unregistered
 
Post: #9
well honestly i dont know, ive never had use that mode (well at least i dont know if i ever had), but thanks again for the explanation, you're info have been very helpfull!
Quote this message in a reply
Sabrina
Unregistered
 
Post: #10
Hi,

I have a simular problem. I have a demo tutorial for OpenAL. I compiled and ran it but it crashes on "alGetError()", if I comment this line out and run it, it will crash on another OpenAL statment.

Heres the weird thing, I compiled and ran it under W2K some months ago with no problems. Several weeks ago, I upgraded to XP, now when I compile and run the new version, it will crash. When I run the old executable version no problems; its only when I complie and run (debug or release) does it crash. All my sound drivers are up to date as well as the SDK for OpenAL (ver. 1.1). Since I am using VC7 the project holds all the compiler settings, and these settings were not changed or altered as well as the code itself.

Any suggestions?

Thank you,

Sabrina
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  EXC_BAD_ACCESS with gluBuild2DMipmaps Marjock 3 3,622 Aug 5, 2007 01:38 AM
Last Post: Marjock
  OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS 0ctane 10 7,612 May 28, 2006 01:43 PM
Last Post: OneSadCookie
  Stumped by EXC_BAD_ACCESS maaaaark 8 4,301 Mar 24, 2005 11:19 PM
Last Post: arekkusu
  glGenTextures and EXC_BAD_ACCESS BobbyWatson 1 4,893 Aug 31, 2002 01:48 PM
Last Post: BobbyWatson