[SOLVED] Displaying very long String freezes the application

We are using MOE 1.3.2-beta. We have a very long String (11564 chars in it). When we do System.out.println(s);, the application freezes and we have to force close the execution.

We tried splitting the string in half, and both half properly displayed without freezing the app, so I guess it’s the length of the String that makes the app crash. This obviously shouldn’t be an issue in Java (Strings can go as big as the max value of int), and we don’t get any freeze with our Android version with this string. This seems to be related to MOE.

We can manipulate the variable itself (we transfer it into a NSDictionary<String, Object> and the substring to try splitting it in half did work). Unfortunately, the SDK we use that needs this String does an automatic System.out.println of it in the console, which freezes the app, and we have no way to disable this automatic behaviour of the SDK…

Is there any solution ? Is it a well-known issue ?

EDIT : After more investigation, it seems it might rather come from a synchronize triggered by System.out.println, so I’m marking this as solved for now.

Hi,

could you also make sure that you are running the latest version, MOE 1.3.12, and see if the problem still persists?

Best Regards,
Gergely

Hello, kisg,
I install multi-os-engine android studio plugin, but MOE SDK version is 1.3.8, where and how can I get MOE 1.3.12?
thanks!

Hi,

The Gradle plugin is 1.3.12, and it will pull the correct SDK, which is usually smaller than the Gradle plugin version. This happens because we only update the SDK version if there was a change in it, so you don’t have to download a new version, even if there were only changes in the Gradle plugin.

When I say “you should use the latest MOE”, I usually mean use the latest Gradle plugin, because that will take care of the rest. I will try to be more clear in the future.

Best Regards,
Gergely