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

QField ver. 1.8.2 crashes after photo collecting attempt (Android, Samsung Galaxy Tablet) #1671

Open
maciejsznajder opened this issue Feb 8, 2021 · 87 comments

Comments

@maciejsznajder
Copy link

Hi All,

I`m having issue with QField ver. 1.8.2 and its photo widget so I decided to register at GitHub, wondering if anyone had similar problem?

I have created a project in QGIS to perform simple survey to collect photos. Everything works perfect with my Samsung Galaxy Tablet. However, my friend (who has almost similiar tablet) is having issues with the photo widget. Everytime when he attempts to take a picture the QField app crashes.

We had this issue last year already and we solved it by using 'Simple Camera' app from Google Store instead of Samsung`s default camera app. Sadly, this solution is not working anymore.

The 'almost' word might be a key. This time I suspect the different specs of our devices might be the reason of that photo problem but I have no way to prove it, it`s only my guess.

My tablet specs (photo widget works fine)
Galaxy Tab A (2016)
Model no. SM-T585
Android version 8.1.0

My friend`s tablet specs (project crashes)
Galaxy Tab A
Model no. SM-T515
Android version 10

PS. I have just noticed today that QField has been updated to 1.8.3. I haven`t had a chance to look into this new version yet.

@nirvn
Copy link
Member

nirvn commented Feb 8, 2021

@maciejsznajder , could you attach a simple project with which you can replicate the crash?

@m-kuhn
Copy link
Member

m-kuhn commented Feb 8, 2021

Also, Can you check in the settings if "use native camera" is enabled or disabled?

@maciejsznajder
Copy link
Author

Thank you for your responses

@m-kuhn
The "use native camera" is enabled.

@nirvn
PSB zip. It contains two projects which are also zipped.

  • First project is pure QGIS project made with 3.4 Maderia. I embedded picture fields in the pole_survey layer.
  • Second project is the QSYNC pack based on the first. It has the issue described in my original post - when my friend tried to fill the 'p1' field (type: attachment, relative path is set up), his app crashed. As I mentioned before, mine tablet works well, I can easily take and save a picture in the 'p1' field.

QFIELD_S1_test_project.zip

@nirvn
Copy link
Member

nirvn commented Feb 9, 2021

@maciejsznajder , are you saying that the first project that is as you described "pure QGIS" doesn't crash neither for you and your friend whereas the QSYNC packed one does?

@maciejsznajder
Copy link
Author

maciejsznajder commented Feb 9, 2021

@nirvn

No, both things are the very same project.

The difference is that the second one has been turned into QField pack with QSync. I have decided to provide them both just in case.

If I am correct, only the second one (treated with QSync) can be used in QField. And its photo widget doesn`t work on my friend tablet as described previously.

@nirvn
Copy link
Member

nirvn commented Feb 9, 2021

@maciejsznajder , both crashes on your friend's device, right?

@maciejsznajder
Copy link
Author

@nirvn

No, only the second one (the one treated with QSync) was tested on the tablet.

Correct me if I am wrong, but I thought that before I load anything to the QField, I need to export that project via QSync plugin?

@maciejsznajder
Copy link
Author

HI All,

Just in case, my friend tested the QField 1.8.3 and the issue is still there. It seems like QField photo widget can`t work on Android 10 for some reason...

@tdeboss
Copy link

tdeboss commented Mar 12, 2021

In Qgis 1.8.4 on samsung galaxy A70, with android 10, the feature works fine, without any resulting crashes.

@aureliesouvignet
Copy link

aureliesouvignet commented Mar 16, 2021

Hello,
I have the same problem.
I have created a Qgis Project with photos with form.
Configuration OK : tablette samsung galaxy 10 Android 9 / Qfield 1.9
Configurations Crashed :
Smartphone A10 samsung android 10
Qfield 1.8.4
The same project, crashed when I have realised photo.
I used QSync.
The bug is random. The app may load a few photos and crash at the second, or not.
Thank you for your help

@tdeboss
Copy link

tdeboss commented Mar 16, 2021

Interesting. As I am mainly a user and not a programmer, I will continue to follow this topic, try a few devices and report if the same happens to me.

@aureliesouvignet
Copy link

Hello,
I have an other question : How can I change Qfield Version on android 10 ?
On the smartphone playstore there isn't the version 1.9 .
But, on the tablette update whas automatic in Qfield1.9.
I suppose, Qfield's version are conditionned automaticly to android version ...

@giocoro
Copy link

giocoro commented Apr 20, 2021

Hi, everybody
I have the same issue on my project on two identical devices.
When I take a picture using "Open Camera" Qfield crashes, but if I use the minimal camera Qfield work without problems.

Device: Samsung Galaxy Tab A 2020
Android 10
Qfield 1.8.4.

Thank you.

@samueldurante
Copy link

Hi all,
I'm glad that this issue is better referenced than this one I opened a few month ago: #1353
I also have a project with a picture field which crashes, even after latest Qfield and Qfieldsync updates.

I agree that the issue is RANDOM, or at least doesn't happen on the very first taken picture. I guess it can be linked with memory lack or something, because the first picture is working, at the second picture (on the same entity), the photo is slow to disappear and at third Qfield crashes. Sometimes on fourth. Sometimes on second or first with native camera.

Another clue: I'm pretty sure it's a hardware issue, happening on certain devices.
Configuration no crash : Samsung Galaxy A20, Android 10, project exported with Qgis 3.16.2 (or older), with QFieldSync
Configuration crash : Samsung Tab A 2020, android 10, same project and same export method.

3rd clue: there is really less crashes with the minimal Qfield camera than with the native camera. (but there is some)

@m-kuhn how can we report some informations when the crash occurs ? (I have already activated dev mode on the device but don't know how to access the stack trace.

Thanks!

@m-kuhn
Copy link
Member

m-kuhn commented May 5, 2021

If you could use adb logcat from a computer connected by usb that would help a lot.

@samueldurante
Copy link

Hi,
i tried to reproduce the crash with a minimal project but was'nt able to do it, the native camera went well. I wonder if the crash happen only when the project is big enough.

So i ran adb logcat on my crashing project. I collected two log files, the first one with Native Camera and the second one with Internal Qfield Camera (the 2 attempts crashed): logcats.zip

Thank you for investigating.

@tdeboss
Copy link

tdeboss commented May 6, 2021 via email

@m-kuhn
Copy link
Member

m-kuhn commented May 6, 2021

Thanks for the report @samueldurante

For reference, here's the important bits of the logs

04-22 13:35:32.523 26008 26008 F DEBUG   : backtrace:
04-22 13:35:32.523 26008 26008 F DEBUG   :       #00 pc 0017b4bc  /data/app/ch.opengis.qfield-nVGmNqLEBUvEDdUntihqng==/lib/arm/libQt5Core_armeabi-v7a.so (BuildId: 1e294c5f15f9ced23917dfd81e639873fc2a9d81)
04-22 13:35:32.523 26008 26008 F DEBUG   :       #01 pc 0017cdb5  /data/app/ch.opengis.qfield-nVGmNqLEBUvEDdUntihqng==/lib/arm/libQt5Core_armeabi-v7a.so (QObject::disconnectImpl(QObject const*, void**, QObject const*, void**, QMetaObject const*)+144) (BuildId: 1e294c5f15f9ced23917dfd81e639873fc2a9d81)
04-22 13:35:32.524 26008 26008 F DEBUG   :       #02 pc 001787e1  /data/app/ch.opengis.qfield-nVGmNqLEBUvEDdUntihqng==/lib/arm/libqfield_core_armeabi-v7a.so (_ZN7QObject10disconnectIM14QgsVectorLayerFvxEM16FeatureListModelFvvEEEbPKN9QtPrivate15FunctionPointerIT_E6ObjectES9_PKNS8_IT0_E6ObjectESE_+100) (BuildId: 8e081bd2112b0036)
04-22 13:35:32.524 26008 26008 F DEBUG   :       #03 pc 00178593  /data/app/ch.opengis.qfield-nVGmNqLEBUvEDdUntihqng==/lib/arm/libqfield_core_armeabi-v7a.so (FeatureListModel::setCurrentLayer(QgsVectorLayer*)+106) (BuildId: 8e081bd2112b0036)
04-22 13:35:32.524 26008 26008 F DEBUG   :       #04 pc 001400b7  /data/app/ch.opengis.qfield-nVGmNqLEBUvEDdUntihqng==/lib/arm/libqfield_core_armeabi-v7a.so (BuildId: 8e081bd2112b0036)
04-22 13:35:32.524 26008 26008 F DEBUG   :       #05 pc 0015279f  /data/app/ch.opengis.qfield-nVGmNqLEBUvEDdUntihqng==/lib/arm/libQt5Qml_armeabi-v7a.so (BuildId: 0cd979223f6a7b3dff723df3f145a5c8d62fc19a)
04-22 13:52:58.525 26913 31710 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x24 in tid 31710 (qtMainLoopThrea), pid 26913 (.opengis.qfield)

Same problem for both implementations (i.e. it doesn't depend on the implementation)

@samueldurante
Copy link

@m-kuhn, i wonder why the abstract you posted is only the part produced on "2021-04-22" because the crash occurs today (2021-05-06), like all other parts of the log.

@m-kuhn
Copy link
Member

m-kuhn commented May 6, 2021

True, the crash above happened on multiple days but not today, so it's probably not the one you are experiencing.

@gioman
Copy link

gioman commented Jun 5, 2021

Hi,

I would like to leave here my experience with a Samsung Galaxy Tab A (SM T-515) with Android 10, the latest available version of QField and Open Camera and projects created with QGIS 3.16.

What I observe with "use native camera" enabled is that is possible to survey features and for each one take a picture and all works ok, meaning that once the picture is taken the Open Camera App "disappear/minimize", the focus goes back to QField and the thumbnail is shown in the QField form.

But... sooner or later (seems pretty random) after taking the picture the Open Camera App does not minimize/disappear... so the user obviously tries to take the picture again, and at this point QField does not seem to crashes but rather to bring the user back to the initial screen (the one that allows to choose what project to open), causing anyway to loose the data gathered up to the point of taking the picture.

I said that it "does not seem" a crash because if instead "use native camera" is disabled, then taking pictures works fine until... at some point (seems also random) QField crashes, and in this case the App closes completely.

Trying to use other Camera Apps (like the one that comes by default with the Galaxy Tab) does not help: after taking the picture the App asks to accept or discard the photo, accepting it does not make the focus return to QField.

None of the above happens with another device I use in the field, a CAT S41.

@m-kuhn
Copy link
Member

m-kuhn commented Jun 5, 2021

Thank you for the report @gioman
Would it be possible to provide a logcat of the device from while this happens?

@gioman
Copy link

gioman commented Jun 8, 2021

Thank you for the report @gioman
Would it be possible to provide a logcat of the device from while this happens?

@m-kuhn

this is the one after the crash using the internal camera App

crash.txt

this one is the one crated after Open Camera causes QField to "reset"

reset.txt

@m-kuhn
Copy link
Member

m-kuhn commented Jun 8, 2021

Stack trace for the Crash

06-08 11:01:57.404  4063  4097 E WindowManager: RemoteException occurs on reporting focusChanged, w=Window{7bf5888 u0 ch.opengis.qfield/ch.opengis.qfield.QFieldActivity}
06-08 11:01:57.404  4063  4097 E WindowManager: android.os.DeadObjectException
06-08 11:01:57.404  4063  4097 E WindowManager: 	at android.os.BinderProxy.transactNative(Native Method)
06-08 11:01:57.404  4063  4097 E WindowManager: 	at android.os.BinderProxy.transact(BinderProxy.java:575)
06-08 11:01:57.404  4063  4097 E WindowManager: 	at android.view.IWindow$Stub$Proxy.windowFocusChanged(IWindow.java:829)
06-08 11:01:57.404  4063  4097 E WindowManager: 	at com.android.server.wm.WindowState.reportFocusChangedSerialized(WindowState.java:3691)
06-08 11:01:57.404  4063  4097 E WindowManager: 	at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:5262)
06-08 11:01:57.404  4063  4097 E WindowManager: 	at android.os.Handler.dispatchMessage(Handler.java:107)
06-08 11:01:57.404  4063  4097 E WindowManager: 	at android.os.Looper.loop(Looper.java:237)
06-08 11:01:57.404  4063  4097 E WindowManager: 	at android.os.HandlerThread.run(HandlerThread.java:67)
06-08 11:01:57.404  4063  4097 E WindowManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:44)
06-08 11:01:57.408  4063  4281 D SecContentProvider: called from android.uid.system:1000

Reset (not sure if that's the relevant part, but the No such file or directory part looks suspicious)

06-08 11:05:51.942   643   643 D QField Camera Picture Activity: onActivityResult()
06-08 11:05:51.942   643   643 D QField Camera Picture Activity: resultCode: -1
06-08 11:05:51.962   643   643 D QField Camera Picture Activity: Taken picture: /data/user/0/ch.opengis.qfield/cache/QFieldPicture20210608_110551.jpg
06-08 11:05:51.962   643   643 D QField Camera Picture Activity: Copy file: /data/user/0/ch.opengis.qfield/cache/QFieldPicture20210608_110551.jpg to file: /storage/emulated/0/Download/tablet_pico_1/DCIM/registos-flora-pico_1_20210608_1105.jpg
06-08 11:05:51.963   643   643 D QField Camera Picture Activity: /data/user/0/ch.opengis.qfield/cache/QFieldPicture20210608_110551.jpg: open failed: ENOENT (No such file or directory)

@ARBkey
Copy link

ARBkey commented Aug 3, 2021

I am experiencing the exact same issue as @gioman with qfield 2.03 on a samsung galaxy s20 FE. Qfield resets randomly after qfield requests a picture to be taken twice now and then

@raekorlechef
Copy link

i have 20 Samsung tab active pro with the same trouble . we messaged qfield directly to ask for direct support with 0 answer.
were losing a lot of time because of this bug. that most likely will never be fix. Qfield seem to just dont care about fixing it.
were ready to pay were ready to help but no answer. this is frustrating i had to sell the idea of qfield/qgis to the buisness and after 6 month of pure pleasure now im in hell.
employee are mad
client are mad

im trying here to get some help cuz the qfield site is a total joke with 0 answer

can i pay someone here to work? and fix this because qfield seem to like to add new feature but stability not realy

@m-kuhn
Copy link
Member

m-kuhn commented Aug 17, 2021

We are really sorry, this ended up in a spam folder, we will get back to you asap!

@raekorlechef
Copy link

raekorlechef commented Aug 17, 2021 via email

@Kinad
Copy link

Kinad commented Aug 23, 2021

Hi,
I confirm we are facing the same problem with the version 1.9.6. Randomly, the app crashes when taking pictures. There are two ways of bug :

  • you take your picture and when you want to validate the picture, the app go back in picture capture mode, and if you retry to take the picture for a second time or go back into main app, it crashes
  • Try to take a picture and app suddenly crashes

That doesn't seem to be device's specific because it happens on different devices, Android's version ...

I tried the Master Dev version but it worse, cause everytime i want to take a picture, the app crashes. I can't even take a picture in this version.

If you could fix this problem, I will be gratefull.

Thanks a lot for the past and future dev

@m-kuhn
Copy link
Member

m-kuhn commented Aug 24, 2021

@raekorlechef did you get in touch? If not, please email me directly (matthias@opengis.ch).

All: can you verify the problem with the demo project?

@larslund
Copy link

Thanks for providing development APKs. I took the liberty to test them but I fear I could observe no improvement. Tested on a Galaxy S20 FE and Galaxy Tab S7 (with RAMPlus activated):

  • arm64-android (main): bug persists, crashes. Right on the first attempt to save a photo, the camera app stays open, offers a second try in which the app returns to its home screen.
  • all access arm64-android -- bug persists, crashes
  • arm-android, all access arm-android: cannot download, "Access Denied"
  • x64-android, x86-android, all access x64-android, all access x86-android: not installable, not compatible

@m-kuhn
Copy link
Member

m-kuhn commented Jul 30, 2023

Could someone make a test with #4488 (comment) and reduced rendering quality?
This will use a lot less memory than the best quality.

@VxTedxV
Copy link

VxTedxV commented Aug 3, 2023

Could someone make a test with #4488 (comment) and reduced rendering quality? This will use a lot less memory than the best quality.

No armv7-android architecture to test ?

@nirvn
Copy link
Member

nirvn commented Aug 3, 2023

@VxTedxV , it's been replaced by arm-neon-android. Please pick that one.

@VxTedxV
Copy link

VxTedxV commented Aug 4, 2023

Made some tests with a 1Go tiled raster (.vrt). Lowest quality improves rendering speed, especially when moving at low scale, and a bit when zooming. Even the lowest quality remains readable (with text on raster). Note : if the map is rotated, it makes more time to render whatever the quality choosen. I like to have faster rendering and be able to render higher quality if needed with the same data.

@gioman
Copy link

gioman commented Aug 4, 2023

Made some tests with a 1Go tiled raster (.vrt). Lowest quality improves rendering speed, especially when moving at low scale, and a bit when zooming. Even the lowest quality remains readable (with text on raster). Note : if the map is rotated, it makes more time to render whatever the quality choosen. I like to have faster rendering and be able to render higher quality if needed with the same data.

@VxTedxV the test to make is about photos taken within QField, not project layers.

@VxTedxV
Copy link

VxTedxV commented Aug 4, 2023

was testing #4488, sorry

@m-kuhn
Copy link
Member

m-kuhn commented Aug 4, 2023

If someone is able to test an affected camera with lower rendering quality in #4488 , that would be great

@OBVYamaska
Copy link

@m-kuhn , I tried installing #4488 on our Samsung Galaxy Tab A8, but I'm stuck with an "app didn't install" error.
I tried various things (signing the APK, uninstalling every instances of QField...), to no avail.
Could there be a system requirement that the tablet doesn't meet? I would gladly test!

@OBVYamaska
Copy link

I could not try specifically #4488 on the tablet for the mentioned reason.
However, we randomly tried to take a picture for a demo yesterday, and everything worked...! I guess something was changed in the new release of QField or Android that solved the issue.
To be more precise, some of our Android devices still have issues with the native camera (crash), but switching to the lighter QField camera solved the problem on all of our devices (something that didn't work until now).

@m-kuhn
Copy link
Member

m-kuhn commented Sep 18, 2023

Is someone still able to reproduce this problem with lower rendering quality in with #4488 and internal QField camera?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale label Oct 3, 2023
@OBVYamaska
Copy link

I could not try specifically #4488 on the tablet for the mentioned reason. However, we randomly tried to take a picture for a demo yesterday, and everything worked...! I guess something was changed in the new release of QField or Android that solved the issue. To be more precise, some of our Android devices still have issues with the native camera (crash), but switching to the lighter QField camera solved the problem on all of our devices (something that didn't work until now).

So, we believed this issue resolved, but my team started to experience the problem again last week, even on new phones. It seems like it starts without problem, but after a while, the crashes become more and more present, to a point where taking picture is impossible. This leads me to believe it has to do with the RAM more than to the actual weght of the pictures...?

@github-actions github-actions bot removed the stale label Oct 3, 2023
@m-kuhn
Copy link
Member

m-kuhn commented Oct 3, 2023

Thank you for the feedback @OBVYamaska , can you add the following information

a) which version of QField are you using?
b) are you using the internal or the native camera?
c) what map canvas rendering quality did you configure?

@gioman
Copy link

gioman commented Oct 4, 2023

Same problem has been reported to me from a Samsung S6 Lite user. I asked to test the APK here #4488

@github-actions
Copy link
Contributor

The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale label Oct 19, 2023
@gioman
Copy link

gioman commented Oct 19, 2023

I asked to test the APK here #4488

problem still there.

@github-actions github-actions bot removed the stale label Oct 19, 2023
@m-kuhn
Copy link
Member

m-kuhn commented Oct 19, 2023

I asked to test the APK here #4488

problem still there.

👍

a) which version of QField are you using? b) are you using the internal or the native camera? c) what map canvas rendering quality did you configure?

Can you provide answers to these questions?

@m-kuhn m-kuhn removed the feedback label Oct 19, 2023
@gioman
Copy link

gioman commented Oct 20, 2023

Can you provide answers to these questions?

I asked to the tablet owner.

@OBVYamaska
Copy link

Hi should be able to test it in the next few days.

@OBVYamaska
Copy link

@m-kuhn , I tried installing #4488 on our Samsung Galaxy Tab A8, but I'm stuck with an "app didn't install" error. I tried various things (signing the APK, uninstalling every instances of QField...), to no avail. Could there be a system requirement that the tablet doesn't meet? I would gladly test!

Same problem again. I can't seem to install the APK on our Samsung Galaxy Tab A (SM-T510) running Android 11.
So I can't test the rendering solution.

However, with the regular app (2.8.7), while the problem is still there with the native camera, it seems to be gone when using the QField minimalist camera! I will try to test this further this week, but so far, I could not get the app to crash in this configuration. I'd like to add that simply switching the camera was not enough before (it's been a few months since I tried, so I don't know which version changed this).

@m-kuhn
Copy link
Member

m-kuhn commented Oct 24, 2023

Thank you for the update.
The quality switch is meanwhile available by default through play store, so you no longer need to install a dedicated apk.

@gioman
Copy link

gioman commented Nov 20, 2023

Is this superseded by #4704 ?

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

No branches or pull requests