Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed crash 'java.lang.IllegalArgumentException: Parameter specified …' #63

Merged
merged 9 commits into from
Oct 17, 2020

Conversation

BrutalCoding
Copy link
Contributor

@BrutalCoding BrutalCoding commented Sep 11, 2020

The onActivityCreated works fine if only ARCore is being used without other plugins that are creating native Activity screen(s), but in my case I was using Admob reward ads and that caused to call this plugin its 'onActivityCreated' too, but with null values. That caused to kill the flutter app instantly.

This commit probably fixes issues with other plugins that are using native Android Activity screen(s), e.g. QR scanners, Admob or Camera. Only tested with Admob reward ads though.

Daniel added 2 commits September 6, 2020 20:50
…as non-null is null'

E.g. when using Admob (reward ad) after ArCoreView() widget has been initialized. That caused the app to crash due to this bug.

if (localObject != null) {
Log.e(TAG, "Modified by BrutalCoding - 1");
if (false) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

The LOG should definitly be removed and the false statement was there on purpose I believe, because localObject (fbx, GLTF, obj) were not working for me. In my personal use case, in order to use local objects, I pass an "file://path/to/something.glb" url which works. The example app you've provided with local objects also don't seem to work hence why I've set false in that condition.

Correct me if I'm wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you do want to merge this PR, I would actually remove localObject from Flutter's side too so people can't try it out and see nothing happening.

If localObject does work, I would be curious how. I've used Android Studio and SceneForm plugin to convert my .gltf to .sfa/.sfb but that plugin is completely broken starting from Android Studio 3.6+. I believe that plugin works with 3.5.x but never got the local object working.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LOG should definitly be removed and the false statement was there on purpose I believe, because localObject (fbx, GLTF, obj) were not working for me. In my personal use case, in order to use local objects, I pass an "file://path/to/something.glb" url which works. The example app you've provided with local objects also don't seem to work hence why I've set false in that condition.

Correct me if I'm wrong

I use sfb file in my example, The sfb files are generated from build.gradle

If localObject does work, I would be curious how. I've used Android Studio and SceneForm plugin to convert my .gltf to .sfa/.sfb but that plugin is completely broken starting from Android Studio 3.6+. I believe that plugin works with 3.5.x but never got the local object working.

Yes, the sceneform plugin doesn't work good. I'm using 1.15.0 with Android Studio 4.0.1 while Android side i'm using 1.13.0 how you can see here.

I will try different local object format inserted inside src/main/assets directly.

Thanks

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this change and resolve conflicts? So I will accept this PR.
We can discuss about local and asset object in another PR. I would like to edit the properties to use sfb file from assets and local object (GLTF) from path like yo do ("file://path/to/something.glb")

@mpowloka
Copy link

Hi, is this PR alive?

The last commit fixes error I suffer in my application. I wonder if I should make my own PR to fix it or if this will be eventually merged.

@giandifra
Copy link
Owner

@BrutalCoding Can you resolve this?

@BrutalCoding
Copy link
Contributor Author

Alright I'll fix it this Saturday @giandifra

@giandifra giandifra merged commit f210ffa into giandifra:master Oct 17, 2020
@mpowloka
Copy link

🎉🎉🎉

@BrutalCoding
Copy link
Contributor Author

Thanks for fixing my leftover mistakes & merging it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants