Cubasis 3.5.1 Froze and I suspect the cause

@LSlowak Lars,

Cubasis froze on me for the first time last night, although over time it has exhibited other issues, which I suspect are related to what eventually caused it to freeze. Shutting down Cubasis did not resolve the issue, only a restart did. But I’m not surprised by that.*E

** Edit: I should have been more clear. “…only a restart of the iPad resolved the freeze issue.”

I suspect a problem in the way Cubasis shuts down in iOS. It doesn’t appear to be releasing memory resources as it should, and sometimes audio connections are not completely released either.

  1. iOS includes a system method for shutting down apps which includes triggering the 3 small dots at the top the screen. Cubasis never displays that system tool, so that’s one hint that the shut-down coding in Cubasis should be reviewed to be sure Apples shutdown method is being called as it should be.

  2. I use the keyboard shortcut method to close apps (cycle to the running app and hit Cmd-Q). If the iPad still think indicates the microphone or any part of an audio connection is still in use by Cubasis, then I will go to the screen showing all running apps and drag Cubasis off the screen.

Even after doing both of those things to shut down Cubasis, I still sometimes fight with audio connections showing as being in use by Cubasis. They should be completely released at that point. Then restarting the iPad is the only solution.

It “seems” that after having to force a Cubasis shutdown over and over during a single runtime session, the iPad’s memory is gradually being depleted a little more each time, until finally, only restarting the iPad restores all available memory and, of course, all the audio connections are cleared.

As iPads get more and more memory, problems like this take longer to roar their ugly heads, but eventually they do affect a running system in unexpected ways.

Could this also be the source of other unresolved reported Cubasis issues?
That could explain why you can’t find a fix for some issues.
The code for those function may be working just fine.
Failures could be a result of depleting or not properly released memory resources and audio connections not properly broken. It’s certainly worth exploring.

RECOMMENDATION to Developers Testing this issue:

  1. Start Cubasis and load a few plugins.
  2. Shutdown Cubasis.
  3. Check the iPad’s system resources and hardware connections.
  4. Repeat the above 3 steps and compare the results.
    Unfortunately, iOS uses sandboxes and grabs all available resources, so even “seeing an app caused memory leak” from improper shutdown of Cubasis, might be difficult to confirm.
    I would think that the Apple Software Group have tools to help developers find these kind of hard to confirm “memory leaks”. The audio connections not releasing are probably easier to prove or disprove.

That’s why I began pointing to the Apple iOS system method that uses the system tool at the top of the screen to close/shutdown apps.

“Fixing” that implementation might resolve multiple seeming unrelated issues!

I hope this helps.
John

@LSlowak Lars, here is a screen shot of iOS 17.1.2 showing the present active apps when I press and hold Cmd-Tab. iOS 17.1.2 shows Safari and the Desktop as the ONLY currently active apps.

The second shot is my Control Center window showing Cubasis 3 controlling my microphone with a connection to the iOS System Services, even though Cubasis is not even an active app in iOS’s list of active apps. Cubasis at this point is only partially connected and that’s through hardware control (microphone). Hmmmm…. something is very fishy about how that is possible! I surmise it’s because Cubasis is not shutdown from its running status properly. That’s a logical conclusion with what I’m seeing. To clear this hardware connection so other apps can use the microphone, I MUST restart my iPad.

In the third screen shot I’m showing what is lacking to shut down Cubasis in the Hub. This is the System dropdown menu when you press on the 3 dots top center of the screen. Notice that the last command on that menu is Close, to Close the currently running app that menu is residing over. But in Cubasis Hub, that System menu is not even present as the 3 dots are not at the top of the screen. Some apps, if you tap at the top center of the screen, the 3 dots which activate the dropdown System menu will appear after a couple taps. However, tapping at the top center of the Cubasis Hub does nothing. The System dropdown menu never appears. Why not? Something is wrong or missing in Cubasis code to shut down the app properly!

Now I’m giving the developers something to work from. This is more than a theory. I feel I am providing solid evidence of the shutdown issue (Cubasis not properly shutting down from missing or incorrect code in the app).

This issue has existed for a while now, since BEFORE iOS 17 release, so this is NOT some new issue from an iOS upgrade, to be sure.

Hope this helps! I’m really trying to help improve the app, not bashing anyone.

John

Hi @Johne1

Thanks for your messages.
Below please find the feedback from our engineers:

Thanks a lot for the detailed bug report! Sometimes it can happen that a bug in a 3rd-party AUv3 plugin, or in Cubasis 3 itself can cause a freeze. We’ve seen and fixed bugs in the past where two threads deadlocked (waiting for each other forever), which results in an app freeze. However, when this occurs, and the app is quit properly (like you described, or by swiping it away in the iOS multitask switcher), iOS usually terminates Cubasis within seconds. Sometimes it can take tens of seconds, but not longer. If, after a minute, iOS still shows that Cubasis uses audio input, this could be a bug in iOS. It’s very unlikely that this has anything to do with a memory leak, with the amount of memory on the device, or is related to other issues (that are not freezes or crashes).

It would be great if you could help us to further analyze the cause. Please try the following:

  1. Update to iOS 17.2

  2. If the app freeze occurs again, please shutdown Cubasis and wait 1 minute. Does iOS still show that Cubasis is using audio input?

  3. Please check if iOS created any crash log files for Cubasis 3 (or the AUv3 plugins that your project used) at the time when the freeze occurred, and send them to us. Here is how:

  4. Open the Settings App and navigate to the Privacy tab.

  5. Scroll down to Diagnostics and Usage and open the link.

  6. Open Diagnostics and Usage Data to open the Crash Reports.

Best wishes,
Lars

Good morning, Lars,

I updated last night to iOS 17.2.
I already did a restart this morning so I’ll start and stop Cubasis and see if it’s still showing Audio I/O active on Cubasis.

Maybe I wasn’t completely clear, but Cubasis doesn’t have to freeze to display the shutdown problem with the Audio I/O still connected to Cubasis.

I’m going to check the Crash logs right now and if there’s something there, I’ll certainly send it.

Thanks for forwarding my info to the developers and getting back to me.

Appreciate your help,
John

@LSlowak I don’t have access to Crash logs because there is no Diagnostics and Usage link in iOS anymore. There is something in there about Apple gathering diagnostics to help developers with their apps. Steinberg will have to ask Apple for the diagnostics theyve gathered on Cubasis.

I remember in previous versions of iOS seeing Diagnostics and Usage Data, but it’s not there now. To be sure, I used the Search box at the top of Settings and it’s not in my iPadOS 17.2 anywhere that I can find, just what I found above.

Cubasis 3.5.1 is still not releasing the Microphone connection it has with iOS System Services in iOS 17.2. That problem still remains. I have to restart my iPad to make “clean” Audio I/O connections with other music creation tools.

John

@LSlowak As for memory leaks, stopping and restarting Cubasis WITHOUT restarting the iPad, slowing depletes the memory resources. Some iPads (iPad Pros, even before M1 chips) have more RAM so it will take them a lot longer to experience resource (memory) problems, but the problem is real.

I hope someone or a small group will revisit Cubasis’ shutdown code, specifically the way it calls the System shutdown functions. Even prior to Shutdown, anytime Cubasis closes everything but the Hub, the Hub should contain and show the 3 dot System menu at the top of the screen, which includes a menu command (Close) to call the System code to Close the app properly.

If iOS was shutting it down, these connections would be closed properly and the memory and other resources used by the app would be released properly. The fact that’s not happening and the System menu is missing are clear indications that iOS is not shutting down the app and probably some internal code in Cubasis is trying to handle that when it doesn’t and shouldn’t have to. That’s the job of the Operating System, if it was being called to do that.

John

ADDENDUM: I was just in Dorico and when you’re in its Start page (its Hub equivalent), a tap at the top of the screen and the 3 dots with the System menu appear and the Close command on that menu correctly shuts down Dorico and it does not hang on to the MIDI keyboard controller connection or any audio connections.
Whatever the Dorico developers are implementing to shutdown Dorico, Cubasis needs that same code.