×

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

Bi-monthly release with minor bug fixes and improvements

Re:Polar Alignment cause Ekos to crash

  • Posts: 16
  • Thank you received: 1
Hi. I have also been having same problem with ekos crashing after 3rd image in polar alignment. I did start my own thread before I saw this one. 
also after having a quick look at your log file there is an error that is same as in my log file.

MouseArea: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
[2021-09-27T22:21:14.531 BST WARN ][ default] - qrc:/qml/mount/mountbox.qml:428: ReferenceError: xi18n is not defined.

it may be nothing an sure means nothing to me but after the 3 Rd or 4th crash I narrowed the time in the log to the time it crashed.
also I tried lowering the slew speed which still crashed after 3rd image
. Let's hope we get this fixed.
thank you
Last edit: 2 years 6 months ago by Robert.
2 years 6 months ago #76037

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

  • Posts: 1208
  • Thank you received: 559
Mohamed,

Honestly, I think the best way to catch this is to instrument the code by adding lots of log messages to try and understand where it's crashing.
Since you can compile, and since you can re-create this crash reliably, if you PM me I can send you a version of several files modified with a lot more logging. Perhaps that will give us a clue.

Hy
2 years 6 months ago #76038

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

  • Posts: 319
  • Thank you received: 25
Hello Hy

I was able to perform remote debugging yesterday and I located where the crash signal is coming from. It comes after the 3rd rotation from
FITSData::findWCSBounds @ fitsdata.cpp ln 2519

I think also I found an issue in ln 2550
for (int y = 0; y < height(); y++)

I think it should be
for (int y = 0; y < height() - 1; y++)

But after fixing it, the error persists.

I shall continue my debugging today and will keep you posted...

 
2 years 5 months ago #76069

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

  • Posts: 319
  • Thank you received: 25
I also updated ln 2556
for (int x = 1; x < width() - 1; x++)

to
for (int x = 0; x < width() - 1; x++)

to include the full width of the image. This should not cause any problem but I thought I may want to include full width in calculations
2 years 5 months ago #76070

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

  • Posts: 1208
  • Thank you received: 559
Mohamed,

I'm not sure why you think it's a bug to have "y <  height()" , but probably doesn't matter much either way.

However, as a diagnostic, let's remove the drawing of the Equatorial Grid altogether, so we can see if the problem is somehow inside there.
Can you add the following line, e.g. inside alignview.cpp, right at the start of the AlignView::drawOverlay() method, and recompile and test?

    if (isEQGridShown()) toggleEQGrid();

After that, does it still crash?
Hy
 
2 years 5 months ago #76075

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

  • Posts: 319
  • Thank you received: 25
Hello Hy

You are correct, the y<height() has no problem. It was my misunderstanding.

When working with simulators in morning I found that if I selected “limited resources mode” the code doesn’t reach and skip this area of the code. I shall try this tonight as a workaround, and if failed I shall apply your code changes and try again…
2 years 5 months ago #76077

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

The crash is happening in the updateMinMax lambda function and reported as stack smashing... but why? It would be great to have 3 images captured in Ekos rotated 30 degrees apart so we can try to replicate this using the simulator using the same images. So you can forget about PAA, and just capture an image, then rotate 30 degree manually, then capture another image (each image should be saved) then zip the 3 images and let's try to run this using simulator on raspberry pi.
2 years 5 months ago #76101

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

  • Posts: 319
  • Thank you received: 25
Just to confirm that using the “limited resource mode” is working as workaround till this problem is fixed.

@Hy
I didn’t have to change the code to avoid this method/function.

@Jasem
Sure I can send you the images set you requested (and I will), but remember that I tried to replicate the problem using Ubuntu and even another raspberry pi connected to the same hardware via Indi as a server and I was not able to replicate the problem.

The only way I was able to replicate the problem was through raspberry pi working as dev device doing remote deployment and debugging on the rig itself.
Last edit: 2 years 5 months ago by Mohamed.
2 years 5 months ago #76114

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

  • Posts: 1208
  • Thank you received: 559
Mohamed,

Would you be willing to test out a shot-in-the-dark fix for me?
Obviously, when you test this, disable limited-resources-mode, so that it would normally crash after your 3rd iteration.

You would need to clone my fork of my KStars repo and test with a new branch (called wcs-fix1) from the current HEAD in that  codebase:
  cd SOME_NEW_PLACE_TO_PUT_A_TEMPORARY_KSTARS
  git clone  invent.kde.org/murveit/kstars.git
  cd kstars
  git checkout wcs-fix1
and then compile that KStars tree I suppose the same way you've set up other compiles, and execute the binary you compile, and run your test.
This has a few small changes to fitsdata.cpp, fitsview.cpp, fitsview.h which you could see by using git difftool.

It it works, of course great and let me know. If not, please send along a log with at least FITS debugging enabled.

Thanks,
Hy

 
2 years 5 months ago #76136

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

  • Posts: 319
  • Thank you received: 25
@Hy

I did and it crashed again. Below are the log files

 

File Attachment:

File Name: log_22-14-00.txt
File Size:380 KB


 

File Attachment:

File Name: kstars_deb...4-00.txt
File Size:5 KB
2 years 5 months ago #76144
Attachments:

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

  • Posts: 1208
  • Thank you received: 559
Mohamed,

I pushed another check in there.  Can you please try again?

Go to the same fork and git pull, then compile and test as before.
You should see 2 new commits. 

Thanks
Hy

commit ea46ab2e40781557aa4a6fa034111ef534218a97 (HEAD -> wcs-fix1, origin/wcs-fix1)
Date:   Wed Sep 29 23:09:51 2021 -0700

    refactor the min/max checks

commit 032c53edb1eee7621377ea4bba585bd8b1ae5e81
Date:   Wed Sep 29 22:52:53 2021 -0700

    Check for null inside of the min/max loop



 
Last edit: 2 years 5 months ago by Hy Murveit.
2 years 5 months ago #76149

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

  • Posts: 319
  • Thank you received: 25
@Hy

Crashed again. PFA logs

 

File Attachment:

File Name: kstars_deb...2-16.txt
File Size:6 KB


 

File Attachment:

File Name: log_19-52-16.txt
File Size:3,642 KB
2 years 5 months ago #76182
Attachments:

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

Time to create page: 0.426 seconds