Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera Access issue #1323

Closed
Portal-Doctor opened this issue Mar 16, 2024 · 8 comments
Closed

Camera Access issue #1323

Portal-Doctor opened this issue Mar 16, 2024 · 8 comments

Comments

@Portal-Doctor
Copy link

Portal-Doctor commented Mar 16, 2024

I'm now getting an EXC_BAD_ACCESS (SIGABRT), indicates a crash caused by a memory access violation in Sparrow when trying to read the camera for a Seed Signer import. This type of error often occurs when an application tries to read or write to memory that hasn't been allocated, or that has been deallocated. The specific address causing the problem is at 0x00000000000000b4, which suggests an attempt to access memory near the beginning of the address space, often indicative of a null pointer dereference or a similar issue.

The crash occurs in a thread named Java: atomic-processor-1.

@Portal-Doctor
Copy link
Author

Portal-Doctor commented Mar 16, 2024

Notes: This is now occurring on a 2.3 GHz Dual-Core Intel Core i5 Macbook Pro for Sparrow-1.8.2-x86_64 and Sparrow-1.8.4-x86_64 when trying to read from the camera during XPUB key import.


Translated Report (Full Report Below)

Process: Sparrow [4363]
Path: /Applications/Sparrow.app/Contents/MacOS/Sparrow
Identifier: com.sparrowwallet.sparrow
Version: 1.8.4 (100)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501

Date/Time: 2024-03-16 13:01:34.2695 -0500
OS Version: macOS 13.6.5 (22G621)
Report Version: 12
Anonymous UUID: 7DE4A2BB-62C9-E196-8C11-6AC24870CFF0

Sleep/Wake UUID: 2256026F-EF9D-49AD-9F67-56FEE76659A7

Time Awake Since Boot: 24000 seconds
Time Since Wake: 2696 seconds

System Integrity Protection: enabled

Crashed Thread: 75 Java: atomic-processor-1

Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000000b4
Exception Codes: 0x0000000000000001, 0x00000000000000b4

Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Sparrow [4363]

VM Region Info: 0xb4 is not in any region. Bytes before following region: 140737486618444
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
shared memory 7fffffe58000-7fffffe59000 [ 4K] r-x/r-x SM=SHM

Application Specific Information:
abort() called

Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x7ff802bf1552 mach_msg2_trap + 10
1 libsystem_kernel.dylib 0x7ff802bff6cd mach_msg2_internal + 78
2 libsystem_kernel.dylib 0x7ff802bf8584 mach_msg_overwrite + 692
3 libsystem_kernel.dylib 0x7ff802bf183a mach_msg + 19
4 CoreFoundation 0x7ff802d0bfff __CFRunLoopServiceMachPort + 145
5 CoreFoundation 0x7ff802d0aa80 __CFRunLoopRun + 1365
6 CoreFoundation 0x7ff802d09ec1 CFRunLoopRunSpecific + 560
7 Foundation 0x7ff803b97273 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 216
8 libglass.dylib 0x12a7d94a2 0x12a7cc000 + 54434
9 libglass.dylib 0x12a7d9f05 Java_com_sun_glass_ui_mac_MacApplication__1enterNestedEventLoopImpl

Model: MacBookPro14,1, BootROM 526.0.0.0.0, 2 processors, Dual-Core Intel Core i5, 2.3 GHz, 8 GB, SMC 2.43f11
Graphics: Intel Iris Plus Graphics 640, Intel Iris Plus Graphics 640, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Memory Module: BANK 0/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C3531324D3332443250462D3039
Memory Module: BANK 1/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C3531324D3332443250462D3039
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x170), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1772.1)
AirPort:
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB30Bus
USB Device: USB2.0 Hub
USB Device: USB 2.0 Hub
USB Device: USB Keyboard
USB Device: USB Receiver
USB Device: USB3.0 Hub
USB Device: Mass Storage Device
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.5

@craigraw
Copy link
Collaborator

Thanks for the bug report. It looks similar to #1215. Are you able to find the same problematic stack in #1215 (comment) in the Java hs_err_pid<pid>.log crash dump? I've put some guidance to find it in that issue.

Unfortunately I haven't been able to reproduce this somewhat rare issue myself, but I'm starting to get enough information to report the bug on the OpenIMAJ driver. Any help narrowing this down would be much appreciated.

@craigraw
Copy link
Collaborator

I also have an idea this bug might be avoidable by changing the value of SCAN_LOOP_WAIT_MILLIS in WebcamScanDevice. If you run from source (instructions in the project README) changing this value to a higher number might reduce the scan interval sufficiently that a thread race problem does not occur.

@Portal-Doctor
Copy link
Author

Portal-Doctor commented Mar 17, 2024 via email

@Portal-Doctor
Copy link
Author

Portal-Doctor commented Mar 17, 2024 via email

@Portal-Doctor
Copy link
Author

Portal-Doctor commented Mar 17, 2024 via email

@Portal-Doctor
Copy link
Author

I turned on the Use HD Camera Resolutuon setting under the View menu and it's working now!

@craigraw
Copy link
Collaborator

Great - that's the other thing to try :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants