node-pcsclite icon indicating copy to clipboard operation
node-pcsclite copied to clipboard

Nw.js integration - Application Killed On Reader Disconnect

Open boris-savic opened this issue 8 years ago • 10 comments

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

boris-savic avatar Mar 27 '17 18:03 boris-savic

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:

  1. What version of Windows do you use? Windows 10?
  2. 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.

pokusew avatar Mar 27 '17 19:03 pokusew

@VojtechStep Please can you look at it? Thank you.

pokusew avatar Mar 27 '17 19:03 pokusew

Hi,

OS: Windows 10 (latest updates) Lib version: 0.4.17 (latest)

boris-savic avatar Mar 27 '17 19:03 boris-savic

I'll take a look at it during this weekend

VojtechStep avatar Mar 27 '17 19:03 VojtechStep

Any update on the issue?

boris-savic avatar Apr 03 '17 11:04 boris-savic

Not yet, I'll have a look at it as soon as I have some time

VojtechStep avatar Apr 03 '17 11:04 VojtechStep

Hello, any progress? Can I provide any more useful information?

boris-savic avatar May 19 '17 18:05 boris-savic

Fixed with nwjs 0.23.0...

Klemen1337 avatar Jun 06 '17 08:06 Klemen1337

@boris-savic, @Klemen1337 so can I close this issue?

pokusew avatar Jun 08 '17 16:06 pokusew

Same bug for the Electron.

abd2561024 avatar Jun 09 '17 13:06 abd2561024