mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
397 stars 115 forks source link

nvapi64.dll faulting module #606

Closed bazarte closed 3 years ago

bazarte commented 4 years ago

Fresh install of Windows 10 Nvidia K4200 running latest drivers. v. 436.30

The app will not start. Nothing comes up. Event Viewer has the following error

Faulting application name: attract.exe, version: 2.6.1.0, time stamp: 0x00000000
Faulting module name: nvapi64.dll, version: 26.21.14.3630, time stamp: 0x5d715bfd
Exception code: 0xc0000005
Fault offset: 0x000000000036a271
Faulting process id: 0x3684
Faulting application start time: 0x01d60adc6bd4a4aa
Faulting application path: C:\Attract Mode\attract.exe
Faulting module path: C:\Windows\SYSTEM32\nvapi64.dll
Report Id: b0776f18-5387-48c4-9845-8b8bf3310747
Faulting package full name: 
Faulting package-relative application ID: 
oomek commented 4 years ago

It may be difficult to debug AM for such unusual and expensive card as Quadro.

Let's try with simple things first. Can you try on other cards? Is your pagefile enabled and set to auto?

bazarte commented 4 years ago

I have a K2200 and a K4200 available. Page files are set to auto. Plenty of RAM. DDR4

oomek commented 4 years ago

It's not a matter of not enough ram. Sometimes gpu driver fails where there is not enough pagefile.

Run attract.exe --loglevel debug and attach last_run.log here

bazarte commented 4 years ago

last_run.log

Attract-Mode v2.6.1 (Windows, SFML 2.5.1 +SWF +7z +Curl) avcodec 58.54.100 / avformat 58.29.100 / swscale 5.5.100 / avutil 56.31.100 / swresample 3.5.100

NvAPI: nvapi64.dll loaded

oomek commented 4 years ago

Thank you for the log. I'm gonna prepare a test build tomorrow with extended logging so we can trace the point causing crashes.

bazarte commented 4 years ago

Awesome, Thank you

oomek commented 4 years ago

I've added a sanity check in case AM cannot bind a function's entry point in nvapi library. There is a chance it may even work on Quadro, but without creating a nvidia profile for AM. https://1drv.ms/u/s!Ag7uFeM0f_fziJVyh51NvIgCTk89ug?e=Cw2wPO

oomek commented 4 years ago

Please paste a debug log. I'm interested only in lines starting with NvAPI:

beccobunsen commented 4 years ago

Same here with windows 10 lsc and quadro p400 last driver, only with 2.6.1, 2.5.1 work fine

log:

Attract-Mode v2.6.1 (Windows, SFML 2.5.1 +SWF +7z +Curl) avcodec 58.54.100 / avformat 58.29.100 / swscale 5.5.100 / avutil 56.31.100 / swresample 3.5.100

Dowloaded the fix and : not working

Attract-Mode v2.6.1 (Windows, SFML 2.5.1 +SWF +7z) avcodec 58.54.100 / avformat 58.29.100 / swscale 5.5.100 / avutil 56.31.100 / swresample 3.5.100

oomek commented 4 years ago

Is that it? No NvAPI lines? Did you launch with --loglevel debug ? I forgot to include libcurl. Reuploaded the new version, same link.

beccobunsen commented 4 years ago

Yes same with --loglevel debug, no NvAPI line

oomek commented 4 years ago

But it was there before in your initial log. NvAPI: nvapi64.dll loaded double check please

beccobunsen commented 4 years ago

i m not the same person ! :) This time with --level debug and afterdowload the last version

Attract-Mode v2.6.1 (Windows, SFML 2.5.1 +SWF +7z +Curl) 
avcodec 58.54.100 / avformat 58.29.100 / swscale 5.5.100 / avutil 56.31.100 / swresample 3.5.100

NvAPI: nvapi64.dll loaded
NvAPI: NvAPI_QueryInterface ptr: 0x7ffef77b7f50
NvAPI: NvAPI_GetErrorMessage ptr: 0x7ffef77ba380
oomek commented 4 years ago

Aah, indeed :) Thanks for the log.

bazarte commented 4 years ago

Please paste a debug log. I'm interested only in lines starting with NvAPI:

Here is the last_run.log with the new file

Attract-Mode v2.6.1 (Windows, SFML 2.5.1 +SWF +7z +Curl) 
avcodec 58.54.100 / avformat 58.29.100 / swscale 5.5.100 / avutil 56.31.100 / swresample 3.5.100

NvAPI: nvapi64.dll loaded
NvAPI: NvAPI_QueryInterface ptr: 0x7ffced18ff50
NvAPI: NvAPI_GetErrorMessage ptr: 0x7ffced1924c0 
bazarte commented 4 years ago

Event viewer also gererated the following

Source: Windows Error Reporting
Fault bucket 1939435638909847406, type 4
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: attract.exe
P2: 2.6.1.0
P3: 00000000
P4: nvapi64.dll
P5: 26.21.14.3630
P6: 5d715bfd
P7: c0000005
P8: 000000000036a271
P9: 
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERDB80.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERDBCF.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERDBE0.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERDBE0.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERDC00.tmp.txt

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_attract.exe_971334ec828626ab9bd93998e774db4e63c6cef8_e01b8934_de9e7916-e41f-4c44-8f4c-f574432903dc

Analysis symbol: 
Rechecking for solution: 0
Report Id: 6155f486-6857-41b0-bbc7-f06f42882c4e
Report Status: 268435456
Hashed bucket: 45a4ce63f721bf0d7aea427021f4476e
Cab Guid: 0
oomek commented 4 years ago

It may be caused by Quadro driver not supporting nvapi. I need to think about it, but inability to test it may cause problems.

oomek commented 4 years ago

It definitely fails on NvAPI_Initialize()

beccobunsen commented 4 years ago

Remember, 2.5.1 work fine on Quadro p400

beccobunsen commented 4 years ago

suddenly it work, also in not fixed versions. I activate the compatibily mode with windows 7, as before, but this time whit "Disable Fullscreen Optimizations" on. Then i disabled all Optimizations stuff, and still work. uhm...

oomek commented 4 years ago

This should not be a requirement, wierd stuff.

oomek commented 4 years ago

can you provide the log when it's working please?

bazarte commented 4 years ago

I just downloaded and ran 2.5.1 as beccobunsen recommended. I worked.

bazarte commented 4 years ago

I just downloaded and ran 2.5.1 as beccobunsen recommended. I worked.

last_run.log

beccobunsen commented 4 years ago

last_run.log

oomek commented 4 years ago

AttractMode 2.5.1 does not have NvAPI implemented. That's why it's working.

beccobunsen commented 4 years ago

as log attached , 2.6.1 working in quadro p400, windows 10

oomek commented 4 years ago

I know, It was a response to @bazarte as he provided a log from 2.5.1 I advise to use the compatibility mode for the time being until I figure out the solution.

beccobunsen commented 4 years ago

the weird thing is that still working without compatibility mode on

oomek commented 3 years ago

Fixed in b0d5424038218885fdd9be90ec07620ab578e97f