Build crashes access violation

Added by Hakware about 6 years ago

I am having some trouble with getting my build to work. It logs in and suddenly pukes out

"Access Violation exception generated at 0x68F46518, thread attempts to write at 0x68F46518.
The thread attempted to read from or write to a virtual address for which it does not have the appropriate access."

edit:
Copy all distro files except ryzom exe produces

"Access Violation exception generated at 0x661C6518, thread attempts to write at 0x661C6518.
The thread attempted to read from or write to a virtual address for which it does not have the appropriate access."
Changed memory location in question

I dont know what this means as its obviously cryptic. The downloaded binary of Ryzom operates like it should but my compiled version does not.

win 7 x64
MSVC 9
no errors on compile.


Replies (11)

RE: Build crashes access violation - Added by kervala about 6 years ago

Did you check your logs ?

You can also launch it within VC++ and when it crashes you'll notice where (it's best to either enable symbols -DWITH_SYMBOLS=ON or use the Debug configuration).

RE: Build crashes access violation - Added by Hakware about 6 years ago

Trying to run using debug is not productive as it crashes even before the release compile crashes. I have went an extra step and also compiled this on another box I setup just to troubleshoot and it comes up with the same access violation problem.

Here is the last bit of the log before the access violation, There are no errors in any of the log and it doesnt seem to actually log why its crashing.

2012/06/28 00:33:44 INF 100c ryzom_client_r.exe client.cpp 572 WinMain : Login of Ryzom success
2012/06/28 00:33:44 INF 100c ryzom_client_r.exe client.cpp 575 WinMain : Post-Login Init of Ryzom...
2012/06/28 00:33:44 WRN 100c ryzom_client_r.exe ligo_config.cpp 547 NLLIGO::CLigoConfig::errorMessage : Can't open the file for reading.
2012/06/28 00:33:44 WRN 100c ryzom_client_r.exe init.cpp 1257 postlogInit : Can't load primitive class file
2012/06/28 00:33:45 DBG 100c ryzom_client_r.exe sheet_id.cpp 361 NLMISC::CSheetId::loadSheetId : Finished loading sheet_id.bin: 124146 entries read
2012/06/28 00:33:45 WRN 100c ryzom_client_r.exe sheet_id.cpp 389 NLMISC::CSheetId::init : SHEETID: Loading without known sound sheet id, please update sheet_id.bin with .sound sheets
2012/06/28 00:33:45 DBG 100c ryzom_client_r.exe audio_mixer_user.cpp 368 NLSOUND::CAudioMixerUser::initDriver : AM: Init Driver 'AUTO' ('auto')...
2012/06/28 00:33:45 DBG 100c ryzom_client_r.exe dynloadlib.cpp 203 NLMISC::CLibrary::loadLibrary : Loading dynamic library 'nel_drv_xaudio2_win_r.dll'
2012/06/28 00:33:45 WRN 100c ryzom_client_r.exe sound_driver_xaudio2.cpp 138 NLSOUND::CSoundDriverXAudio2::CSoundDriverXAudio2 : XA2: Creating CSoundDriverXAudio2
2012/06/28 00:33:45 DBG 100c ryzom_client_r.exe audio_mixer_user.cpp 423 NLSOUND::CAudioMixerUser::initDevice : AM: Init Device...
2012/06/28 00:33:45 INF 100c ryzom_client_r.exe sound_driver_xaudio2.cpp 299 NLSOUND::CSoundDriverXAudio2::initDevice : XA2: Initializing CSoundDriverXAudio2
2012/06/28 00:33:45 WRN 100c ryzom_client_r.exe listener_xaudio2.cpp 32 NLSOUND::CListenerXAudio2::CListenerXAudio2 : XA2: Initializing CListenerXAudio2
2012/06/28 00:33:45 WRN 100c ryzom_client_r.exe music_channel_xaudio2.cpp 31 NLSOUND::CMusicChannelXAudio2::CMusicChannelXAudio2 : XA2: Initializing CMusicChannelXAudio2
2012/06/28 00:33:45 WRN 100c ryzom_client_r.exe music_channel_xaudio2.cpp 31 NLSOUND::CMusicChannelXAudio2::CMusicChannelXAudio2 : XA2: Initializing CMusicChannelXAudio2
2012/06/28 00:33:45 WRN 100c ryzom_client_r.exe music_channel_xaudio2.cpp 31 NLSOUND::CMusicChannelXAudio2::CMusicChannelXAudio2 : XA2: Initializing CMusicChannelXAudio2
2012/06/28 00:33:45 WRN 100c ryzom_client_r.exe music_channel_xaudio2.cpp 31 NLSOUND::CMusicChannelXAudio2::CMusicChannelXAudio2 : XA2: Initializing CMusicChannelXAudio2
2012/06/28 00:33:45 INF 100c ryzom_client_r.exe load_form.h 878 loadForm : loadForm(): Loading packed file 'sounds.packed_sheets'
2012/06/28 00:33:45 INF 100c ryzom_client_r.exe load_form.h 950 loadForm : Don't update the packed sheet with real sheet
2012/06/28 00:33:45 INF 100c ryzom_client_r.exe audio_mixer_user.cpp 586 NLSOUND::CAudioMixerUser::initDevice : AM: Initialized audio mixer with 32 voices, WITHOUT EAX and with 16 bits PCM sample source.
2012/06/28 00:33:47 INF 100c ryzom_client_r.exe load_form.h 878 loadForm : loadForm(): Loading packed file 'user_var_binding.packed_sheets'
2012/06/28 00:33:47 INF 100c ryzom_client_r.exe load_form.h 950 loadForm : Don't update the packed sheet with real sheet
2012/06/28 00:33:47 INF 100c ryzom_client_r.exe load_form.h 878 loadForm : loadForm(): Loading packed file 'sound_groups.packed_sheets'
2012/06/28 00:33:47 INF 100c ryzom_client_r.exe load_form.h 950 loadForm : Don't update the packed sheet with real sheet

RE: Build crashes access violation - Added by kervala about 6 years ago

When launching it from VC++, you have to change the "Debugging" -> "Working Directory" path to the folder where client.cfg, client_default.cfg, etc... can be found.

RE: Build crashes access violation - Added by Hakware about 6 years ago

Ok, so I got the working directory set in debug, when I try to test the build it almost immediately comes up with a breakpoint and drops the ryzom error message box File "C:/Users/K/AppData/Roaming/Ryzom/'" not found. while in debug mode this directory does exsist so it is putting the appropriate files in there.

Call Stack

ryzom_client_d.exe!NLMISC::nlFatalError(const char * format=0x033f53fc, ...) Line 179 C++

ryzom_client_d.exe!CClientConfig::init(const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & configFileName={...}) Line 1954 + 0x55 bytes C++
ryzom_client_d.exe!prelogInit() Line 765 C++
ryzom_client_d.exe!WinMain(HINSTANCE__ * hInstance=0x00e50000, HINSTANCE__ * formal=0x00000000, char * cmdline=0x04416b8f, HINSTANCE * _formal=0x00000000) Line 553 C++
ryzom_client_d.exe!
_tmainCRTStartup() Line 578 + 0x35 bytes C
ryzom_client_d.exe!WinMainCRTStartup() Line 403 C
kernel32.dll!760e3677()

which points to nlerror("cannot find client_default.cfg");
in client_cfg.cpp

Log

Log with no filter:
-------------------------------

Log Starting [2012/06/29 01:36:59]
2012/06/29 01:36:59 ryzom_client_d.exe INF 1a00 client.cpp 551 : Pre-Login Init of Ryzom...
2012/06/29 01:36:59 ryzom_client_d.exe WRN 1a00 system_utils.cpp 72 : No window has be set with CSystemUtils::setWindow(), progress bar can't be displayed
2012/06/29 01:36:59 ryzom_client_d.exe INF 1a00 init.cpp 404 : CPUInfo: CPUMask before change: 3, after change: 1, CPUID: 178bfbff, hasHyperThreading: NO
2012/06/29 01:36:59 ryzom_client_d.exe INF 1a00 init.cpp 737 : RYZOM VERSION : FV RYZOM CORE (Jun 27 2012 15:20:46)
2012/06/29 01:36:59 ryzom_client_d.exe ERR 1a00 client_cfg.cpp 1954 : cannot find client_default.cfg
-------------------------------
User Crash Callback:
-------------------------------
UserId: 4294967295
HomeId: 0
ShardId: 0
On a Mainland Shard
Application: NotFound
No user entity information
ViewPosition: 0.00 0.00 0.00
Time in game: 0h 0min 0sec
LocalTime: 2012/06/29 01:36:59
ServerTick: 0
ConnectState: NotInitialised
LocalAddress: :0 (0.0.0.0)
Language: <NotExist:LanguageName>
ClientVersion: RYZOM CORE
PatchVersion:
Client is online
NumServerHOP: 0
NumFarTP: 0
NumReselectPerso: 0
Connection Events:
Memory: 1852MB/3834MB
Process Virtual Memory: 135MB
OS: Microsoft Windows 7 Home Premium Edition 64-bit (Build 7600) (6.1 7600)
Processor: AMD Athlon(tm) II P320 Dual-Core Processor / AMD64 Family 16 Model 6 Stepping 3 / AuthenticAMD / 2090MHz / 2 Processors found
CPUID: 178bfbff
HT: NO
CpuMask: 1
NeL3D: No driver
3DCard: ATI Mobility Radeon HD 4200 Series, version 8.14.1.6099
No sound
-------------------------------
ryzom_client_d.exe has triggered a breakpoint

So, when trying to run the debug I am getting even less mileage than when trying to run as a release as mentioned before.
I just wish I knew what the problem was.

Thanks

RE: Build crashes access violation - Added by kervala about 6 years ago

Please could you check if your "Working directory" is correct ?

The error is very explicit... You didn't put the right folder where there is "client_default.cfg". So it tries to use a folder in your user profile.

RE: Build crashes access violation - Added by Hakware about 6 years ago

yep, got it now, did not have it under client, was on build all. Thanks for being patient with me.

output:

'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\dui70.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\actxprxy.dll'
'ryzom_client.exe': Loaded 'C:\ryzom_core_client\nel_drv_xaudio2_win_r.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\X3DAudio1_7.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\XAudio2_6.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\MMDevAPI.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\propsys.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\AudioSes.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\avrt.dll'
First-chance exception at 0x5e326518 in ryzom_client.exe: 0xC0000005: Access violation.
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\dbghelp.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll'
'ryzom_client.exe': Unloaded 'C:\Windows\SysWOW64\powrprof.dll'
'ryzom_client.exe': Unloaded 'C:\Windows\SysWOW64\psapi.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\nlaapi.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\winrnr.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\NapiNSP.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\pnrpnsp.dll'
'ryzom_client.exe': Loaded 'C:\Windows\SysWOW64\wshbth.dll'
The thread 'Win32 Thread' (0x1958) has exited with code 0 (0x0).
ryzom_client.exe has triggered a breakpoint

call stack:

ryzom_client.exe!NLMISC::WndProc(HWND__ * hWnd=0x00140af8, unsigned int message=273, unsigned int wParam=0, long lParam=1312080) Line 133 C++

user32.dll!74d96238()
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
user32.dll!74d968ea()
user32.dll!74d96899()
user32.dll!74d9cd1a()
user32.dll!74d9cd81()
user32.dll!74dd5f4b()
user32.dll!74dd608c()
user32.dll!74dc2eec()
msctf.dll!75af39f5()
msctf.dll!75af3ad3()
user32.dll!74dd7042()
user32.dll!74d96238()
user32.dll!74d968ea()
user32.dll!74d96899()
user32.dll!74d97d31()
user32.dll!74d97dfa()
ryzom_client.exe!NLMISC::report(const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & title={...}, const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & header={...}, const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & subject={...}, const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & body={...}, bool enableCheckIgnore=true, unsigned int debugButton=1, bool ignoreButton=true, int quitButton=1, bool sendReportButton=true, bool & ignoreNextTime=false, const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & attachedFile={...}) Line 324 + 0x7 bytes C++
ryzom_client.exe!NLMISC::EDebug::createWhat() Line 545 + 0x94 bytes C++
ryzom_client.exe!NLMISC::EDebug::EDebug(_EXCEPTION_POINTERS * pexp=0x032edc54) Line 441 + 0x81 bytes C++
ryzom_client.exe!NLMISC::exceptionTranslator(unsigned int __formal=3221225477, _EXCEPTION_POINTERS * pexp=0x032edc54) Line 985 + 0xa bytes C++
msvcr90.dll!6faddcaa()
msvcr90.dll!6fadd4f5()
msvcr90.dll!6fadd8c0()
msvcr90.dll!6fadd9dd()
msvcr90.dll!6faddb94()
ntdll.dll!76f7b679()
ntdll.dll!76f7b64b()
ntdll.dll!76f7b5ed()
ntdll.dll!76f3010f()
ryzom_client.exe!NLSOUND::CMusicChannelFader::updateVolume() Line 135 + 0x1b bytes C++
ryzom_client.exe!NLSOUND::CMusicChannelFader::play(const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & filepath={...}, unsigned int xFadeTime=500, bool async=false, bool loop=true) Line 167 C++
ryzom_client.exe!NLSOUND::CAudioMixerUser::playMusicChannel(NLSOUND::CAudioMixerUser::TMusicChannel chan=GeneralMusicChannel, const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & fileName={...}, unsigned int xFadeTime=500, bool async=false, bool loop=true) Line 2634 C++
ryzom_client.exe!NLSOUND::CAudioMixerUser::playMusic(const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & fileName={...}, unsigned int xFadeTime=500, bool async=false, bool loop=true) Line 2640 C++
ryzom_client.exe!CSoundManager::playMusic(const stlpx_std::basic_string<char,stlpx_std::char_traits<char>,stlpx_std::allocator<char> > & fileName={...}, unsigned int xFadeTime=500, bool async=false, bool loop=true, bool forceGameMusicVolume=true) Line 1403 + 0x1d bytes C++
ryzom_client.exe!postlogInit() Line 1322 C++
00108a60()

What do you think?

RE: Build crashes access violation - Added by kervala about 6 years ago

It seems like it's a crash in XAudio2 driver and line 135 is :

_MusicFader[i].MusicChannel->setVolume(_MusicFader[i].XFadeVolume * _Gain);

I suspect "MusicChannel" being NULL, but I have no idea why :(

Perhaps Kaetemi could help you, he's the sound driver specialist :)

Did you notice an error in logs ?

RE: Build crashes access violation - Added by Hakware about 6 years ago

well the logs dont show anything pertaining to the crash problem. Thats why this has been a bit frustrating.
the audio is nothing special just a realtek HD audio.

RE: Build crashes access violation - Added by Hakware about 6 years ago

Well since that was leading me nowhere, I deleted everything and re-downloaded a fresh source, went about re-building everything. Do you know why nel_drv_direct3d_win is not building? I dont recall it being in the cmake..

Thanks

RE: Build crashes access violation - Added by kervala about 6 years ago

You should verify in cmake-gui that WITH_DRIVER_DIRECT3D is really checked :)

RE: Build crashes access violation - Added by Hakware about 6 years ago

Kervala, I just want to thank you for the help. But the source just will not compile. I have spent pretty close to a week now attempting to get a compile that would run without error but its just not in the stars. I have used seperate computers, Tried MSVC8, MSVC10 and followed the instructions to the letter. It still looks for direct3d file and if compiled as release I can copy that from the distro and will run till it crashes on the sound init. I was really looking forward to experimenting with it. Seems Im just kicking a dead horse.. Oh well.

(1-11/11)