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

viewcam crashing julia #382

Open
anandijain opened this issue Jan 3, 2023 · 1 comment
Open

viewcam crashing julia #382

anandijain opened this issue Jan 3, 2023 · 1 comment

Comments

@anandijain
Copy link

anandijain commented Jan 3, 2023

not sure if this is specific to my arch or julia version

julia> versioninfo()
Julia Version 1.9.0-beta2
Commit 7daffeecb8c (2022-12-29 07:45 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 8 on 4 virtual cores
Environment:
  JULIA_NUM_THREADS = 8

julia> using GLMakie

julia> using VideoIO

julia> devs = VideoIO.init_camera_devices()
Ptr{VideoIO.libffmpeg.AVInputFormat} @0x0000000176e68998

julia> logi_name = VideoIO.CAMERA_DEVICES[2]
"Logitech Webcam C930e"

julia> VideoIO.viewcam(logi_name)
1   HIToolbox                           0x00000001a1d005c8 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 120
2   HIToolbox                           0x00000001a1d00188 _ZN15MenuBarInstance14EnableAutoShowEv + 60
3   HIToolbox                           0x00000001a1ca3310 SetMenuBarObscured + 372
4   HIToolbox                           0x00000001a1ca2ee8 _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh + 172
5   HIToolbox                           0x00000001a1c9cfcc _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 296
6   HIToolbox                           0x00000001a1c63cd0 _NotifyEventLoopObservers + 176
7   AppKit                              0x000000019b9db5b0 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 2428
8   AppKit                              0x000000019b965ab8 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 1984
9   AppKit                              0x000000019b965124 -[NSWindow(NSEventRouting) sendEvent:] + 284
10  AppKit                              0x000000019b96425c -[NSApplication(NSEvent) sendEvent:] + 1920
11  libglfw.3.3.dylib                   0x00000002851171e8 _glfwPlatformPollEvents + 184
12  nfnZR_2ytpR.dylib                   0x00000002a1b06034 julia_pollevents_11522 + 492
13  ???                                 0x00000002a579c0d0 0x0 + 11366154448
14  ???                                 0x00000002a54ac484 0x0 + 11363075204
15  ???                                 0x000000028ec94170 0x0 + 10985488752
16  libjulia-internal.1.9.dylib         0x0000000102d59190 do_call + 188
17  libjulia-internal.1.9.dylib         0x0000000102d57960 eval_body + 1480
18  libjulia-internal.1.9.dylib         0x0000000102d57fb0 jl_interpret_toplevel_thunk + 264
19  libjulia-internal.1.9.dylib         0x0000000102d6f3f0 jl_toplevel_eval_flex + 4996
20  libjulia-internal.1.9.dylib         0x0000000102d6f244 jl_toplevel_eval_flex + 4568
21  libjulia-internal.1.9.dylib         0x0000000102d6f244 jl_toplevel_eval_flex + 4568
22  libjulia-internal.1.9.dylib         0x0000000102d6fea8 ijl_toplevel_eval_in + 156
23  sys.dylib                           0x000000011a1071bc japi1_eval_user_input_60556 + 936
24  sys.dylib                           0x000000011a18cdb4 julia_YY.1018_39039 + 1296
25  libjulia-internal.1.9.dylib         0x0000000102d4c78c jl_f__call_latest + 76
26  sys.dylib                           0x0000000119a4f374 julia_run_main_repl_37003 + 1248
27  libjulia-internal.1.9.dylib         0x0000000102d99004 true_main + 192
28  libjulia-internal.1.9.dylib         0x0000000102d98ef8 jl_repl_entrypoint + 200
29  julia                               0x000000010275ff6c main + 12
30  dyld                                0x00000001981afe50 start + 2544

[89122] signal (11.2): Segmentation fault: 11
in expression starting at REPL[6]:1
_ZN9libunwind10CFI_ParserINS_17LocalAddressSpaceEE9decodeFDEERS1_mPNS2_8FDE_InfoEPNS2_8CIE_InfoE at /usr/lib/system/libunwind.dylib (unknown line)
Allocations: 40452888 (Pool: 40444549; Big: 8339); GC: 234
@giordano
Copy link
Member

giordano commented Feb 2, 2023

Works fine for me on a MacBook M1 like yours, at least with the builtin camera:

julia> using VideoIO, GLMakie

julia> devs = VideoIO.init_camera_devices()
Ptr{VideoIO.libffmpeg.AVInputFormat} @0x000000014a954998

julia> logi_name = VideoIO.CAMERA_DEVICES[1]
"FaceTime HD Camera"

julia> VideoIO.viewcam(logi_name)

julia> versioninfo()
Julia Version 1.10.0-DEV.469
Commit c18909d655* (2023-02-01 14:13 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.6.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 4 virtual cores

What's "Logitech Webcam C930e"? Is that an external webcam?

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