SGPro crashes without warning loading long target list

Replace text between single * with your own descriptions. Leave text between double ** to maintain formatting. You can delete these instructions.

Useful Info

OS: Windows 10
Ver: 3.1.0.411

Description

Been looking forward to this release as earlier comments suggested that larger target/event lists would be possible. (I select the visible targets from this list as required). However having put together a 200+ target/event list and loaded it appeared to load fine and then started " loading xxx in the background" this appeared to take 26 minutes using up to 80+% of a powerful CPU - but the list was already loaded according to the dump 26 minutes before - what it was doing in this period is a mystery?

Steps to Reproduce this Issue

Load a large target/event list (200+) should do it - I have added my example to the dropbox link below

Logs
Dropbox link to log zipped and sgf file.

To get logs: In SGPro click the Help->Open Log or if you are looking for logs from a previous session, Help->Open Log Folder and search by date.

Im not sure what this is for… the background load is performing as expected here… for that many targets, ~26 minutes is not abnormal. The CPU consumed is irrelevant as the background load will only eat CPU when it is idle… if something more important needs the CPU, it will get it.

Sorry the log I have attached seems to show the targets are already loaded. BUT that is not the problem - a look at the end of the dump shows an exception which exits SGPro without any message or recovery.

I still have a problem that a 800K file takes 26 minutes to load and then fails without warning. While this is loading it looks like it is working and on a previous attempt the sequence had actually started an autofocus run and then the background load finished and SGPro disappeared leaving all my equipment hanging.

As supplementary information these targets are a list of variable stars with optimised event settings all targets are deselected on loading and list provided by Astroplanner is used to manually check the targets which pass the citeria for that evening, above local horizon, distance from the Moon etc. etc.

Oh, I see. Your machine ran out of memory with this sequence. I’ll need to think about this for a bit.

I was running windows task master as this was loading and there was no sign of a memory problem - I have 8Gb of ram and your application is running in 32 bit mode? This is on a 64 bit mode machine plus a swap file of just about any size you like. If you load the sgf file in the Dropbox while you are running your code in debug mode I think a lot will be revealed! (Have written over a million lines of C++ for windows 95 thru windows 10 in a previous lifetime :wink:

This is not a traditional memory problem, but rather a restriction that Windows places on individual processes (specifically) “window handles”… this sequence depleted the number allowed for a single process.

I have a temporary fix that will at least allow you to load the sequence… it is essentially a “lazy load” version. If SGPro detects a very large number of targets, it will not background load, but rather load elements for a target when clicked. More work is needed to make this work properly… if you clicked on all the targets, you would still experience a crash.

That works for me… in the trade we call that just in time loading! And this is how I would use it. I would like to raise the question of why so many windows handles? If you feel you would like to discuss this off this forum as it would be very technical I would be happy to act as sounding board. As I say got most of the tea shirts in this area. :slight_smile:

Actually “Lazy Loading” is what it’s called in the trade: Lazy loading - Wikipedia

Resource contention issues are not a new obstacle for us in SGPro… We know exactly how to fix it, we just lack the time to do it.

In the olden days it was JIT as in complier code but now I am really showing my age - clue wrote my first program in 1970!

But enough of that - any feel for timescales to fix or a temporary fix?

Yep, I am going to release in the next couple hours.

What a star!

Look forward to it . Signing off now it is late evening here

Thank you :smile:

Ok… this fix, while not ideal, should be “less temporary” in that it will load and cache up to 30 targets (still on-demand), but on the 31st, will start to “unload” targets from cache.

Thanks Ken - have just loaded all my targets - very quickly! and selected a sub set - all working fine. Would be nice if the weather in the UK now cooperated for the final test on running the sequence!

Thanks for the very fast support.

1 Like