sparrowwallet / sparrow

Desktop Bitcoin Wallet focused on security and privacy. Free and open source.
https://sparrowwallet.com/
Apache License 2.0
1.34k stars 190 forks source link

Crash opening webcam scan on MacOS Intel #1215

Open Thats77 opened 10 months ago

Thats77 commented 10 months ago

creating a new wallet in sparrow 1.8.1 on a mac intel and selecting scan airgapped keeps crashing sparrow. all wallets selected to scan are crashing the sparrow wallet

craigraw commented 10 months ago

Please take a look for a crash dump file. It will be named hs_err_pid<pid>.log (the <pid> will be some number) and will either be in the root folder (/) of your Mac, or in a temporary folder under /var/folders/ (for example, /var/folders/7y/cvqm9r6n0cgddhm921cm1zwc0000gn/T/). You can use Go > Go To Folder in Finder to see these locations.

If you find it, please attach it here. Alternatively you can email it to craig at sparrowwallet.com

craigraw commented 10 months ago

Please try the following:

  1. Close Sparrow
  2. In Finder, click Go > Go To Folder... and enter ~/.sparrow in the textbox
  3. Look for the config file when the folder opens and open it in a text editor like TextEdit
  4. Look for the value "hdCapture" and set it from true to false. So
  "hdCapture": false,

Save the file, close it, open Sparrow and try scanning again.

craigraw commented 10 months ago

Thanks for the quick feedback. Your two recent posts are contradictory though - was it false and you set it to true, or the other way around?

Thats77 commented 10 months ago

I did exactly the opposite of what you suggested.

Thats77 commented 10 months ago

"hdCapture": true, - this is working

false wasn't working

craigraw commented 10 months ago

It appears that your system does not support the lower 640x480 scanning resolution for some reason.

Notes for further debugging:

This issue appears to exist only on some Macbook Pro 14" Intel systems. Both reported incidents were running macOS Ventura.

Problematic stack:

SIGSEGV (0xb) at pc=0x00000001089a9430, pid=2255, tid=82435

Stack: [0x0000700007955000,0x0000700007a55000],  sp=0x0000700007a54420,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
v  ~StubRoutines::jlong_disjoint_arraycopy
V  [libjvm.dylib+0xab75db]  Unsafe_CopyMemory0(JNIEnv_*, _jobject*, _jobject*, long, _jobject*, long, long)+0x10b
J 877  jdk.internal.misc.Unsafe.copyMemory0(Ljava/lang/Object;JLjava/lang/Object;JJ)V java.base@18.0.1 (0 bytes) @ 0x000000011047a20c [0x000000011047a120+0x00000000000000ec]
J 747 c1 jdk.internal.misc.Unsafe.copyMemory(Ljava/lang/Object;JLjava/lang/Object;JJ)V java.base@18.0.1 (33 bytes) @ 0x00000001090290ac [0x0000000109028860+0x000000000000084c]
J 957 c1 java.nio.ByteBuffer.getArray(I[BII)Ljava/nio/ByteBuffer; java.base@18.0.1 (121 bytes) @ 0x000000010907b65c [0x000000010907b220+0x000000000000043c]
J 956 c1 java.nio.ByteBuffer.get([BII)Ljava/nio/ByteBuffer; java.base@18.0.1 (54 bytes) @ 0x000000010907aa94 [0x000000010907a880+0x0000000000000214]
J 1067 c1 java.nio.ByteBuffer.get([B)Ljava/nio/ByteBuffer; java.base@18.0.1 (9 bytes) @ 0x00000001090b68cc [0x00000001090b67c0+0x000000000000010c]
j  com.sparrowwallet.sparrow.control.WebcamScanDevice.getImage()Ljava/awt/image/BufferedImage;+52 com.sparrowwallet.sparrow@1.8.1
j  com.github.sarxos.webcam.ds.cgt.WebcamGetImageTask.handle()V+17 com.github.sarxos.webcam.capture@0.3.13-SNAPSHOT
j  com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run()V+14 com.github.sarxos.webcam.capture@0.3.13-SNAPSHOT
j  java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+92 java.base@18.0.1
j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5 java.base@18.0.1
j  java.lang.Thread.run()V+11 java.base@18.0.1
v  ~StubRoutines::call_stub
V  [libjvm.dylib+0x527d56]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x2b6
V  [libjvm.dylib+0x526db7]  JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*)+0x147
V  [libjvm.dylib+0x526e83]  JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, JavaThread*)+0x63
V  [libjvm.dylib+0x5cfb08]  thread_entry(JavaThread*, JavaThread*)+0x98
V  [libjvm.dylib+0xa7ebdc]  JavaThread::thread_main_inner()+0xcc
V  [libjvm.dylib+0xa7d16f]  Thread::call_run()+0xcf
V  [libjvm.dylib+0x8ac35b]  thread_native_entry(Thread*)+0x14b
C  [libsystem_pthread.dylib+0x61d3]  _pthread_start+0x7d
C  [libsystem_pthread.dylib+0x1bd3]  thread_start+0xf
Thats77 commented 10 months ago

I appreciate everything. Onward and upward ✌️

schmonet commented 9 months ago

Hi guys,

i have a similar issue, although the logs may be different. I am running Sparrow 1.8.1 under Win 10 Pro x64 22H2 on IMac Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz 3.70 GHz (Bootcamp native install). I am using the buit-in FaceTime HD-Camera that works in all other apps i have (Kamera, Zoom, Browser ...)

After opening the scan-option under Airgapped Hardware Wallet, Sparrow behaves unresponsive in both modes using HD or non HD option, whil only in HD option i get a black preview in the window.

Log says:

2024-01-12 10:00:15,017 ERROR [atomic-processor-1] c.s.s.c.WebcamScanDevice [null:-1] Timeout when requesting image!
2024-01-12 10:00:20,589 ERROR [frames-refresher-[0]] c.s.s.c.WebcamScanDevice [null:-1] Timeout when requesting image!

Don't find any config file in C:\Users\User\AppData\Local\Sparrow\runtime

any suggestions how i could proceed? Thanks!

craigraw commented 9 months ago

@schmonet This is a different problem. Please open a separate Github issue.

x0zzz commented 3 months ago

I had the same issue as the OP, except with v1.9.1, and setting hdCapture to false fixed it.