google-ar / arcore-unreal-sdk

ARCore SDK for Unreal
https://developers.google.com/ar/
Apache License 2.0
277 stars 122 forks source link

AR Core - Augmented Images crashes on Samsung Galaxy S7 edge #31

Closed SirLouLou closed 6 years ago

SirLouLou commented 6 years ago

Hi,

I downloaded the latest AR Core package (version 1.3), and build the Augmented Images application on my Samsung Galaxy S7 edge (SM-G935F). I did this all in Unreal Engine 4.20.

After the build, the application launched and asked me permission for camera use. After I accepted, the screen goes black and crashed. And this happend multiple times, even used previous versions of package / engine but it didn't work.

I have AR Core installed and even have installed some AR Core applications. I even did a successful build on the 'AR Handheld' template from Unreal. So it has to do something with the package because I also tried to launch the HelloAR package and didn't work either.

I made a logcat for you:

Log-augmentedimages.txt

Tnx in advance!

bopangzz commented 6 years ago

It looks like it crashes because it has a corrupted AugmentedImageDatabase. Not sure how could that happened though. Can you attach the log when you build the application in Unreal editor?

SirLouLou commented 6 years ago

You're right, I see some errors in the build log. But don't know what those mean. Below you can find the build log:

Log-BuildUE4.txt

Thank you very much for the fast response!

bopangzz commented 6 years ago

It is possible that the arcoreimg tool couldn't add some of your images because it doesn't have enough feature point. Can you try run the arcoreimg tool in the command line and see if you have any images that has 0 score?

See https://developers.google.com/ar/develop/c/augmented-images/arcoreimg for details.

SirLouLou commented 6 years ago

I tried, and that's not the problem. I used the standard images that came with the package. I didn't change anything from the package. I immediately build the package on my S7 edge and it continuously crashes after opening. The 'AR handheld template' works just fine, so i don't get it why this won't work :(

Below some screenshots of my settings, if that may help:

image

image

image

image

bopangzz commented 6 years ago

Sorry I didn't realized you are building the Augmented Image sample. The image in that sample should work without problem. It looks like there is something wrong with the augmented image cooking process. The handheld ar works fine because it didn't load the augmented image database.

I wonder if it is because you have space in your Unreal Engine. Can you try put your Unreal Engine to a path without space and try package again? In particular, try remove space in the path in this command

../../../Engine/Plugins/Runtime/GoogleARCore/Tools/Windows/arcoreimg.exe build-db --input_image_list_path=S:/Program Files/Unreal Engine/UE_4.20/Engine/Plugins/Runtime/GoogleARCore/Intermediate/ARCoreImgTemp/image_list.txt --output_db_path=S:/Program Files/Unreal Engine/UE_4.20/Engine/Plugins/Runtime/GoogleARCore/Intermediate/ARCore

SirLouLou commented 6 years ago

Hi bopangzz,

I did what you said and did even more than that. I deleted UE4.20, all the SDK's and all the CodeWorksforAndroid installation. I reinstalled everything and installed them directly on my S: drive (SSD). I downloaded a fresh ARCORE package from GIT and got the same result, the application crashes after launch.

image

image

It seems that the Google ARCore plugin isn't correctly loading at the beginning. Maybe it doesn't connect with the plugin correctly and cannot create the augmented images database.

image

Below you can find the UE4 log from this last build:

Log-BuildUE4-V2.txt

Below you can find the logcat when I launch the application on my S7 edge

It doens't want to upload. See my next comment for the logcat

image


Perhaps it is clearer for you if I show you the code that is highlighted in UE4 below:

Below you can find all code lines displayed in YELLOW in UE4:

image

image

image

image

image

Below you can find all code lines displayed in RED in UE4:

image

image

image


ps. I'm located in Europe, so our interactions could intefere depending on the time difference :)

SirLouLou commented 6 years ago

Here you have my logcat from when I launch the application:

adbLogCat-V2.txt

Again, Tnx!

SirLouLou commented 6 years ago

Hi bopangzz,

I want to let you know that I've read some simelar issues on this GIT and tried the following, but no results.

image

image

I also duplicated the the original database and deleted the old one, like BryanChrisBrown did above (also changed the name to 'none'. But still crashes after launch on S7 edge:

image

image


There is also an error that keeps repeating:

Folder doesn't exist:

image

And indeed, if I go to this path, the folder 'Tools' is missing in the GoogleARCore pluginsfolder.

image

Don't know why its missing, but every time when this error shoes up, the augmented image database is failing its build. So maybe there is a connection.

image

For my master thesis I am working on a project to showcase the possibilities of Augmented Reality in Marketing and advertisement. In mid August, I will have my first presentation. I hope this issue will fix before the end of this week, so I can start building my project in UE4 :/

Nevertheless, I'm convinced that ARCore will be a breakthrough in 2019 and wish you developers all the luck with solving the problems that it will carry with :) 🥇

bopangzz commented 6 years ago

Hmm, it looks like the binary build of Unreal Engine is missing the Tools folder inside GoogleARCore plugin. You might need to use the source code version of Unreal Engine and build your self. You can find the source code version of 4.20 here: https://github.com/EpicGames/UnrealEngine of if you want to get the latest GoogleARCore integration, you can use Google's version of Unreal Engine which you can find here: https://github.com/google-ar-unreal/UnrealEngine. Note that the Google's version is currently on 4.19 for now.

bopangzz commented 6 years ago

Also, if you want to keep use the binary version of Unreal Engine. You can use the source code version of Unreal Engine and run the setup.bat script inside it. That script should download the Tools folder in GoogleARCore plugin and you can try copy it to the binary version folder.

SirLouLou commented 6 years ago

Hi bopangzz,

Tnx for the tip! It's late at the moment. I will try this tomorrow morning and will update you on it.

SirLouLou commented 6 years ago

Hi bopangzz,

After a lot of hassle (deleting, installing and debugging the installation of the source code UE4 & Visual Studio) I finally got a working build of the augmented reality ARCore package. I even uploaded a custom image and everything is tracking very well on my Galaxy S7 Edge :)

I finally can go and build my AR application in Unreal.

Tnx for all the help! :)

SirLouLou commented 6 years ago

A screenshot from my phone:

image

bopangzz commented 6 years ago

@SirLouLou Glad you got it working! Just curious, are you using 4.20 source code version or Google's 4.19 branch?

SirLouLou commented 6 years ago

First I tried to install Google's 4.19 branch. But when trying to install the GenerateProjectFiles.bat file, it gave me an error and didn't wanted to generate the projectfiles. I then installed the source code from Unreal version 4.20 but it gave me the same error. After re-installing, installing,... I did some research and found a solution on this post

I needed to install the "NuGet package manager" in Visual Studio Installer, which Unreal never mentioned (or updated) in their documentation files. I tried another time and it did generate all the project files and after that I could successfully launch the UE4 source code and build the Augmented Images package on my phone.

In short: I sticked with the 4.20 source code version of Unreal, but I think that Google's branch would have worked fine, apart from the general error it gave on the GenerateProjectFiles.bat file, but that isn't an issue from your development team's side.

I hope this information may be useful to you, when solving other problems in this branch. If I could help in any way don't hesitate to message me :)

bopangzz commented 6 years ago

Yeah, good to know that 4.20 source code version works fine!

bopangzz commented 6 years ago

The following issues mentioned on this thread should be fixed in the ARCore 1.4 release: