node-pcsclite
                                
                                 node-pcsclite copied to clipboard
                                
                                    node-pcsclite copied to clipboard
                            
                            
                            
                        Nw.js integration - Application Killed On Reader Disconnect
Hi pokusew,
we're trying to fix the issue that happens in Windows environment under NW.js framework. The library works great, but if the reader is physically removed from the computer the application closes without errors.
With some tinkering around I managed to get the Chromium dump file
FAULTING_IP: 
pcsclite+2911
5e2d2911 8931            mov     dword ptr [ecx],esi
EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 5e2d2911 (pcsclite+0x00002911)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000001
   Parameter[1]: 00000000
Attempt to write to address 00000000
PROCESS_NAME:  App.exe
ADDITIONAL_DEBUG_TEXT:  
Use '!findthebuild' command to search for the target build information.
If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols.
FAULTING_MODULE: 76f80000 ntdll
DEBUG_FLR_IMAGE_TIMESTAMP:  58be8ef6
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".
EXCEPTION_PARAMETER1:  00000001
EXCEPTION_PARAMETER2:  00000000
WRITE_ADDRESS:  00000000 
FOLLOWUP_IP: 
pcsclite+2911
5e2d2911 8931            mov     dword ptr [ecx],esi
FAULTING_THREAD:  00000754
DEFAULT_BUCKET_ID:  WRONG_SYMBOLS
PRIMARY_PROBLEM_CLASS:  WRONG_SYMBOLS
BUGCHECK_STR:  APPLICATION_FAULT_WRONG_SYMBOLS_NULL_POINTER_WRITE
LAST_CONTROL_TRANSFER:  from 5a749113 to 5e2d2911
STACK_TEXT:  
WARNING: Stack unwind information not available. Following frames may be wrong.
0acdfc08 5a749113 097e8530 5e2d26b0 097e8530 pcsclite+0x2911
0acdfc58 745a62c4 097d6ad0 745a62a0 3b2c89b7 node+0x1b9113
0acdfc6c 76fe0fd9 097d6ad0 38419a2e 00000000 KERNEL32!BaseThreadInitThunk+0x24
0acdfcb4 76fe0fa4 ffffffff 77002ef8 00000000 ntdll+0x60fd9
0acdfcc4 00000000 5a798dbb 097d6ad0 00000000 ntdll+0x60fa4
SYMBOL_STACK_INDEX:  0
SYMBOL_NAME:  pcsclite+2911
FOLLOWUP_NAME:  MachineOwner
MODULE_NAME: pcsclite
IMAGE_NAME:  pcsclite.node
STACK_COMMAND:  ~17s; .ecxr ; kb
BUCKET_ID:  WRONG_SYMBOLS
FAILURE_BUCKET_ID:  WRONG_SYMBOLS_c0000005_pcsclite.node!Unknown
WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/App_exe/0_0_0_0/58adc762/pcsclite_node/0_0_0_0/58be8ef6/c0000005/00002911.htm?Retriage=1 
It seems that on reader disconnect library tries to perform NULL pointer write operation which force closes the whole application. I can't seem to figure out which part of the code does that?
Bests, Boris
Hi @boris-savic,
Thank you for posting your issue. I am quite busy now, I will look into it more deeply as soon as I have some time.
I am using this library in Electron (under Windows 10) and it works well (even on reader disconnect – previously is caused errors but they are fixed now).
Checklist:
- What version of Windows do you use? Windows 10?
- Please make sure you are using the latest version of this library (0.4.17) (check the module folder in node_modules).
I will let you know once I find out more.
@VojtechStep Please can you look at it? Thank you.
Hi,
OS: Windows 10 (latest updates) Lib version: 0.4.17 (latest)
I'll take a look at it during this weekend
Any update on the issue?
Not yet, I'll have a look at it as soon as I have some time
Hello, any progress? Can I provide any more useful information?
Fixed with nwjs 0.23.0...
@boris-savic, @Klemen1337 so can I close this issue?
Same bug for the Electron.