QField icon indicating copy to clipboard operation
QField copied to clipboard

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

Open maciejsznajder opened this issue 4 years ago • 88 comments

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.

maciejsznajder avatar Feb 08 '21 12:02 maciejsznajder

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

nirvn avatar Feb 08 '21 13:02 nirvn

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

m-kuhn avatar Feb 08 '21 14:02 m-kuhn

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

maciejsznajder avatar Feb 08 '21 15:02 maciejsznajder

@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?

nirvn avatar Feb 09 '21 02:02 nirvn

@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.

maciejsznajder avatar Feb 09 '21 08:02 maciejsznajder

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

nirvn avatar Feb 09 '21 08:02 nirvn

@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 avatar Feb 09 '21 08:02 maciejsznajder

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...

maciejsznajder avatar Feb 17 '21 12:02 maciejsznajder

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

tdeboss avatar Mar 12 '21 13:03 tdeboss

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

aureliesouvignet avatar Mar 16 '21 14:03 aureliesouvignet

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.

tdeboss avatar Mar 16 '21 17:03 tdeboss

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 ...

aureliesouvignet avatar Mar 18 '21 15:03 aureliesouvignet

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.

giocoro avatar Apr 20 '21 08:04 giocoro

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!

samueldurante avatar May 04 '21 16:05 samueldurante

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

m-kuhn avatar May 05 '21 05:05 m-kuhn

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.

samueldurante avatar May 06 '21 08:05 samueldurante

That is indeed very possible. The time i said that no problem happened, i had a relatively small project. Now i started using approx. 3-5 times bigger project and Qfield is notably slower. I will add a photo layer and test this out.

Kind regards.

V V čet., 6. maj 2021 ob 10:57 je oseba samueldurante < @.***> napisala:

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 https://github.com/opengisch/QField/files/6433167/logcats.zip

Thank you for investigating.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/opengisch/QField/issues/1671#issuecomment-833357462, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSH6ZWGZUMZVGIANVHVERTTMJKWXANCNFSM4XI6NGUA .

tdeboss avatar May 06 '21 09:05 tdeboss

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)

m-kuhn avatar May 06 '21 11:05 m-kuhn

@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.

samueldurante avatar May 06 '21 11:05 samueldurante

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

m-kuhn avatar May 06 '21 14:05 m-kuhn

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.

gioman avatar Jun 05 '21 10:06 gioman

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

m-kuhn avatar Jun 05 '21 10:06 m-kuhn

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

gioman avatar Jun 08 '21 11:06 gioman

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)

m-kuhn avatar Jun 08 '21 12:06 m-kuhn

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

ARBkey avatar Aug 03 '21 09:08 ARBkey

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

raekorlechef avatar Aug 17 '21 11:08 raekorlechef

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

m-kuhn avatar Aug 17 '21 11:08 m-kuhn

Thanks a lot sir

On Tue, 17 Aug 2021 at 07:34, Matthias Kuhn @.***> wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/opengisch/QField/issues/1671#issuecomment-900219720, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVHTUINASFPOFH4Q4ZDQ3YLT5JCNPANCNFSM4XI6NGUA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

--

[image: Logo] Andre jr Savage Concepteur M: 514-424-6920 E: @.*** | www.fotech.ca 1450 Richelieu,Beloeil J3G 4R7

raekorlechef avatar Aug 17 '21 12:08 raekorlechef

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

Kinad avatar Aug 23 '21 10:08 Kinad

@raekorlechef did you get in touch? If not, please email me directly ([email protected]).

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

m-kuhn avatar Aug 24 '21 11:08 m-kuhn