×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

indi_svbony_ccd crashes on capture

  • Posts: 3
  • Thank you received: 0
I've been trying to get KStars & Ekos working on Raspberry Pi with my SVBONY 905C as a guide scope.

When I attempt to capture from the camera using either PHD2 or Ekos, the driver crashes immediately.

I built INIDI, KStars, and PHD2 from source.

INDI Library: 2.0.4
Code v2.0.4. Protocol 1.7.

According to Ekos, the driver is version 1.5, interface 6, SDK version 1.11.4.

I tried to collect some logs, however I don't see anything useful when the crash occurs.

Here's the log output generated by launching Ekos, connecting to the camera, and attempting to take a preview exposure:
gist.github.com/jtleniger/08e836caa8e738608e15de00f7c7a8c5

And here's the log output from running `indiserver -vvv indi_svbony_ccd >> indi_svbony_ccd.log 2>&1`, opening PHD2, attempting to connect, and starting the process to create a dark library:
gist.github.com/jtleniger/5c35bf9a863bc2f241641650b4a4d397

Let me know if I can provide anymore information or if there are other troubleshooting steps I can take. I know the camera operates, because I can take exposures using PHD2's built in SVBONY driver, just not INDI.
6 months 2 weeks ago #96431

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
AH! I was able to get more useful logs using ekosdebugger.

This is probably the relevant part:
Thread 2.4 "indi_svbony_ccd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x73bff1c0 (LWP 1892)]
__GI_strcmp (p1=<optimized out>, p2=<optimized out>) at strcmp.c:39
#0  __GI_strcmp (p1=<optimized out>, p2=<optimized out>) at strcmp.c:39
#1  0x0040a628 in SVBONYBase::sendImage (this=0x437a18, type=<optimized out>, duration=1) at /home/justin/astro-soft-stable/indi-3rdparty/indi-svbony/svbony_base.cpp:1076
#2  0x0040a9ec in SVBONYBase::grabImage (this=this@entry=0x437a18, duration=duration@entry=1, send=send@entry=true) at /home/justin/astro-soft-stable/indi-3rdparty/indi-svbony/svbony_base.cpp:1060
#3  0x0040d3fc in SVBONYBase::workerExposure (this=0x437a18, isAboutToQuit=std::atomic<bool> = { 47 }, duration=1) at /home/justin/astro-soft-stable/indi-3rdparty/indi-svbony/svbony_base.cpp:171
#4  0x769b1734 in std::function<void (std::atomic<bool> const&)>::operator()(std::atomic<bool> const&) const (__args#0=..., this=<optimized out>) at /usr/include/c++/12/bits/std_function.h:591
#5  operator() (__closure=0x41dc8c) at /home/justin/astro-soft-stable/indi/libs/indibase/thread/indisinglethreadpool.cpp:44
#6  std::__invoke_impl<void, INDI::SingleThreadPoolPrivate::SingleThreadPoolPrivate()::<lambda()> > (__f=...) at /usr/include/c++/12/bits/invoke.h:61
#7  std::__invoke<INDI::SingleThreadPoolPrivate::SingleThreadPoolPrivate()::<lambda()> > (__fn=...) at /usr/include/c++/12/bits/invoke.h:96
#8  std::thread::_Invoker<std::tuple<INDI::SingleThreadPoolPrivate::SingleThreadPoolPrivate()::<lambda()> > >::_M_invoke<0> (this=0x41dc8c) at /usr/include/c++/12/bits/std_thread.h:252
#9  std::thread::_Invoker<std::tuple<INDI::SingleThreadPoolPrivate::SingleThreadPoolPrivate()::<lambda()> > >::operator() (this=0x41dc8c) at /usr/include/c++/12/bits/std_thread.h:259
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<INDI::SingleThreadPoolPrivate::SingleThreadPoolPrivate()::<lambda()> > > >::_M_run(void) (this=0x41dc88) at /usr/include/c++/12/bits/std_thread.h:210
#11 0x767fe068 in ?? () from /lib/arm-linux-gnueabihf/libstdc++.so.6
#12 0x766118e0 in start_thread (arg=0x73bff1c0) at pthread_create.c:442
#13 0x76690a1c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:74 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


Seems to be coming from this block of code in the driver:
        SetCCDCapability(GetCCDCapability() | CCD_HAS_BAYER);
        auto bayerString = getBayerString();
        // Send if different
        if (strcmp(bayerString, BayerT[2].text))
        {
            IUSaveText(&BayerT[2], bayerString);
            IDSetText(&BayerTP, nullptr);
        }


App & driver debug log zip attached.
Last edit: 6 months 2 weeks ago by Justin. Reason: fixing formatting
6 months 2 weeks ago #96438
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 179
  • Thank you received: 25
Try using indi_svbony_ccd built with the latest indilib/indi-3rdparty/indi-svbony source code.
The indi_svbony_ccd from INDI 3rd party drivers 2.0.4 has just been refactored and is a bit unstable.
It is recommended to use the newer source code.
6 months 2 weeks ago #96449

Please Log in or Create an account to join the conversation.

  • Posts: 179
  • Thank you received: 25
If the crash reproduces in the latest revision of the source code, try replacing the following CODE-A with CODE-B in the function SVBONYBase::Connect() in svbony_base.cpp.
My local revision includes this fix and will be merged into the master repository with the other fixes around November 2023.

CODE-A
    if (mCameraProperty.IsColorCam)
        cap |= CCD_HAS_BAYER;

CODE-B
    if (mCameraProperty.IsColorCam)
    {
        cap |= CCD_HAS_BAYER;
        IUSaveText(&BayerT[2], getBayerString());
        IDSetText(&BayerTP, nullptr);
    }
The following user(s) said Thank You: Justin
6 months 2 weeks ago #96450

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
The crash does reproduce in the latest version, however compiling with that change fixed the issue!

Thank you so much!
6 months 2 weeks ago #96453

Please Log in or Create an account to join the conversation.

  • Posts: 179
  • Thank you received: 25
Hi Jasem

I have PR'd several issues fixes including this issue.
Since there is a conflict with the last commit, please adopt my PR to resolve it. I do not have "resolve conflicts" privileges.
Last edit: 6 months 2 weeks ago by tkakura.
6 months 2 weeks ago #96462

Please Log in or Create an account to join the conversation.

  • Posts: 179
  • Thank you received: 25
A fix for this issue was merged into GitHub on October 19, 2023.
6 months 1 week ago #96582

Please Log in or Create an account to join the conversation.

Time to create page: 0.748 seconds