×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

EQMOD driver causing phd2 to segfault

  • Posts: 269
  • Thank you received: 53
I posted over at the phd2 forum about a crash when the button for the INDI control panel is pressed. After investigating its looking more like something in the eqmod driver.
If I connect only to the camera in PHD2 then click the INDI button to open the control panel it works fine. Once I connect to the EQMOD driver the same button causes a segfault. Running phd2 in a terminal shows some strange messages when connecting to EQMOD - see the attachment.Also attached is the output from gdb after rebuilding with debugging. It shows the segfault occurring in a call to removeProperty
Third attachment is indi driver log
The same issue occurs on both Raspberry Pi 3 Ubuntu Mate 16.04 and 17.04 and on Ubuntu VM on x64 16.04. I've updated all software to the latest verions.

File Attachment:

File Name: phd2_indi2.txt
File Size:4 KB

File Attachment:

File Name: phd2_gdb_vm.txt
File Size:8 KB

File Attachment:

File Name: indi_eqmod...2_20.log
File Size:10 KB
6 years 6 months ago #18923
Attachments:

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

  • Posts: 210
  • Thank you received: 104
Just to add some more informations.

I have fixed the crash in phd2 by checking null parameter in removeProperty().
Is it expected that baseclient can call removeProperty with a null property?

My eqmod driver do not shot this "Dispatch command error", this is probably related to the null property we receive. Any idea why Ken version do that?
Last edit: 6 years 6 months ago by Patrick Chevalley.
6 years 6 months ago #18929

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

baseclient is not suppose to call removeProperty with null, I just fixed that. However, this points to a problem with the driver as it tries to delete a property that it hasn't defined yet, so have to look in EQMod as well.
6 years 6 months ago #18950

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

  • Posts: 269
  • Thank you received: 53
Could it be related to the 6 SIMULATORxxx properties it is trying to delete? I have no idea where those are cming from
6 years 6 months ago #18954

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

  • Posts: 269
  • Thank you received: 53
I just downloaded PHD2 2.6.3dev7 on Win8.1 (without Patricks fix) and it has the same issue with the INDI button. So its looking pretty clear its the EQMOD driver. Is ther anything I can do to help? I've pulled the indi driver code to have a look but I'm not familiar with how it all hangs together.
Last edit: 6 years 6 months ago by Ken Self.
6 years 6 months ago #19027

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

  • Posts: 210
  • Thank you received: 104
Andy just publish phd2 2.6.3dev8 that include the fix.

I suspect the SIMULATOR* properties get deleted without being created by the eqmod driver when you start with a real mount but not the simulator.
But I am not at home now and have one week more before I can try with my mount.
6 years 6 months ago #19035

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

  • Posts: 269
  • Thank you received: 53
I believe you are right. I've been putting some traces through the driver and phd2 code and it is looking that way.
6 years 6 months ago #19042

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

  • Posts: 269
  • Thank you received: 53
The horizon and alignment properties are also not being created (or rather broadcast) as well. What I found is that my trace for those sets of properties (in EQMod::loadProperties() )show up as a popup in Ekos rather than being logged. So I suspect they are being set up before the interface is ready. If that makes any sense
6 years 6 months ago #19043

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

  • Posts: 269
  • Thank you received: 53
I've made some changes to my local copy of simulator.h and simulator.cpp
Added a property isEnabled to hold the enablement state of the simulator so that in updateProperties, properties are only removed if they had been previously defined
Made equivalent changes to eqmod, align and scope-limits to hold connection status.
With these changes phd2 no longer receives removal of properties that have not been defined.
Whats the best way to supply the changes? Do I just git push?
6 years 6 months ago #19057

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

Submit a Pull-Request at INDI Github page .
6 years 6 months ago #19060

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

  • Posts: 269
  • Thank you received: 53
Some more new tricks for this old dog to learn :)
Pull request submitted.
The following user(s) said Thank You: Jasem Mutlaq
6 years 6 months ago #19063

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

I submitted a simpler change, can you please test that?
6 years 6 months ago #19099

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

Time to create page: 0.315 seconds