Skip to content
New issue

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

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

Already on GitHub? # to your account

[multi-monitor] getPixelColor with a negative x or y throws an error #160

Closed
btjones opened this issue Feb 4, 2016 · 6 comments
Closed

Comments

@btjones
Copy link

btjones commented Feb 4, 2016

When getPixelColor is called with a negative x or y coordinate an error is thrown. This happen when using multiple monitors and going above or to the left of the main monitor (I've only test on OSX 10.11.2).

This is very similar to #88

Process:               Electron [3957]
Path:                  /Users/USER/*/Electron.app/Contents/MacOS/Electron
Identifier:            com.github.electron
Version:               0.36.5 (0.36.5)
Code Type:             X86-64 (Native)
Parent Process:        node [3956]
Responsible:           Terminal [281]
User ID:               501

Date/Time:             2016-02-04 11:02:13.187 -0500
OS Version:            Mac OS X 10.11.2 (15C50)
Report Version:        11
Anonymous UUID:        FDAB5D50-7C11-4DD7-4BA7-5F8B08177F60


Time Awake Since Boot: 5700 seconds

System Integrity Protection: enabled

Crashed Thread:        0  CrBrowserMain  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
--> 
    __TEXT                 0000000105903000-0000000105904000 [    4K] r-x/rwx SM=COW  /Users/USER/*/Electron.app/Contents/MacOS/Electron

Thread 0 Crashed:: CrBrowserMain  Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation        0x00007fff96978329 CFDataGetBytePtr + 25
1   robotjs.node                    0x000000010e6866fd copyMMBitmapFromDisplayInRect + 403 (screengrab.c:61)
2   robotjs.node                    0x000000010e684dc1 getPixelColor(Nan::FunctionCallbackInfo<v8::Value> const&) + 146 (robotjs.cc:605)
3   robotjs.node                    0x000000010e68584a Nan::imp::FunctionCallbackWrapper(v8::FunctionCallbackInfo<v8::Value> const&) + 131 (nan_callbacks_12_inl.h:175)
…
@Deltatiger
Copy link
Collaborator

@btjones How are your multiple monitors setup ? The Co-ordinate system depends on how your main monitor is setup. The main Monitor's lower left corner is (0, 0) with the X and Y axes increasing to the right and top sides respectively.

Could you please check this information and post your monitor config ?

@octalmage
Copy link
Owner

I don't think this is going to work until we add direct multi monitor support. Each API probably has a different method of dealing with extra displays.

@btjones
Copy link
Author

btjones commented Feb 26, 2016

I hook up an external monitor to my laptop and then alter the arrangement in System Preferences > Displays. So it's not always perfectly lined up at the bottom or the top. Sometimes the main display is on the left, sometimes the right, and they could even be on top of each other.

Bottom line, can't depend on all monitors to be aligned at the bottom with the main display on the left. Depending on the setup there could be negative coordinates which I believe it causing this error.

@octalmage
Copy link
Owner

@btjones For sure, we just don't have multi-monitor support yet. It's on the roadmap!

@oktapodia
Copy link
Collaborator

This issue has been closed because it has been inactive for > 180 days.
You may reopen this issue if it has been closed in error.

@panKt
Copy link

panKt commented Aug 17, 2020

Are there any updates on multi-monitor support?

Thanks

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

No branches or pull requests

5 participants