[Logic v2.4.9] Having several analyzers active leads to crashes and bad behavior

I have a few different low level analyzers active. I’m trying to capture data on 4 channels at 10 MHz, not particularly fast. Problem is:

  • About half of the time, Logic 2 crashes shortly after I press the start button.
  • The other half of the time, I get weird visual behavior. Here are some examples:
  • Very occasionally it works okay. Seems to be better the fewer analyzers that are active.

In this photo, the traces are just thick bands without any edges displayed. Zooming fully out or fully in does nothing to change this. Note the timescale here. I have my cursor over the gray trace and it properly displays the time between edges, but not the edges themselves.

This photo is similar, except it stopped drawing anything after the ~8us mark. Analyzers are marked as done, but no bubbles are displaying.

These analyzers work if I load them after the capture is complete, usually. Occasionally they cause the program to crash.

Any ideas here? Getting really frustrating trying to capture data with the analyzers active.

This behavior has been around since at least v2.4.1, probably earlier.

Saving a capture as an SAL file and loading it in a new instance of Logic2 leads to some interesting things.

  • The capture is 3s long, but no data outside of this 20us sample has any traces visible.
  • The analyzers complete quickly (green checkmark), but Logic2 still hogs the cpu and takes up quite a bit of memory. Note that I’m not outputting any results to the console, so there’s no reason Logic should be hogging the cpu after the analyzer is complete.
  • As I’m writing this, memory usage is at 10 GB and rising. What the heck is taking up 10 GB of storage?

Last line of the log file when it crashes is this:

[2023-08-15 22:51:08.740] [main] [info] [saleae_log.cpp:70] flushing log due to SetUnhandledExceptionFilter

@kostka Wow, this is quite strange behavior. There’s a lot to unpack, and hopefully we can get to the bottom of this soon. I have some follow up questions for you, and I may want to tackle one or a few issues at a time.

  1. First off, I wanted to quickly answer your qustions / observations below with my hunch…

I suspect the behavior below is to blame. This is something we want to optimize and improve at some point, however, we haven’t been able to prioritize working on it due to other projects on our plate.

  1. To help us look into the crashes you reported…

can you share your machine ID with us? We’d like to look into any uploaded error reports your PC may have sent to us at the time of those crashes.

  1. For the visual issue reported below…

This is super strange. Is there a way we can reproduce it over here? For example, if we were to open your .sal capture file (and perhaps if needed, add the necessary custom analyzers into the software), would that potentially reproduce the visual issue? If so, could you send those files over?

@timreyes Thanks for the reply.

  1. Will check this out

  2. MachineID: 018f5a76-1a3b-4cf4-80bb-0c198dbed65a

  3. Yes, I’d rather not post it publicly so I sent it to you in a private message.

@kostka Thanks! I moved our discussion to email since some of the information you sent over is sensitive / private. Let’s continue our chat there.

Hi Tim,

Thanks for this.

Regarding (1), I can confirm Logic uses a TON of disk space. For a 7 MB SAL file, it is currently using 3 GB of disk space in the temp folder and climbing. Is there anything I can do to say “don’t index anything” ? It doesn’t seem like it. It’s so sad that indexing, a feature I don’t want or need, is completely killing the performance here. Even if I don’t stream to the data table or console, it still does this. Frustrating.

Also, I am noticing an issue in the analyzer I sent. I have been using this analyzer for a while but am now noticing that the starting/ending ticks it’s giving to the results are wrong. Let me debug and get back to you. I’m not sure where the fault lies. I hope it’s on my end and fixing the bug will simply make things work, but we will see. Stay tuned.

Regards,
Tim

@kostka I sent you a reply to our private email chain, per your request to keep the sensitive information you have provided private. Let’s continue our chat there.

@timreyes
This turned out to be mostly due to an analyzer issue. I had made some (I thought) minor changes a few months ago, didn’t test them, forgot about them, then ran into this issue. Apologies for not realizing that, but thanks for the responses and email correspondence.

This bug in the analyzer caused (1) a lot of AddFrame calls with overlapping durations and (2) a lot of AddFrame calls with incredibly long timescales. I expect some combination of these was causing the visual artifacts in the screenshots and the crashing. I’ve since added some logging functionality to the analyzer so I can see what’s happening and report any errors to the log file.

Logic still does use a ton of disk space when the analyzers are active. My SSD shows 100-200MB/s of activity for a long time after running the analyzer, even for small data sets. IMO that’s a problem but one you’re already aware of and I’m not trying to solve in this thread.

Thanks again. You can close this one out.

@kostka Thanks for the update, and glad you got that figured out! Yes, the issue with disk space use is likely caused by the issue described in the support article I linked previously, and we currently haven’t optimized that behavior yet unfortunately.