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

Saves Image as png with 0bytes. #8

Closed
DeMoN100 opened this issue Sep 7, 2022 · 4 comments
Closed

Saves Image as png with 0bytes. #8

DeMoN100 opened this issue Sep 7, 2022 · 4 comments
Labels
wontfix This will not be worked on

Comments

@DeMoN100
Copy link

DeMoN100 commented Sep 7, 2022

I tried using this to save a photo from the vector camera app in f-droid. The photo is actually a .jpg but save on device tries to save it as a png and the file comes up 0 bytes.

@lmj0011
Copy link
Owner

lmj0011 commented Nov 29, 2022

I imagine you may have already found a work-around/solution, but if not could you confirm the vector camera image MIME type

area of interest for anyone with time to debug this issue.

@lmj0011 lmj0011 added the good first issue Good for newcomers label Nov 29, 2022
@lmj0011
Copy link
Owner

lmj0011 commented Nov 29, 2022

I was able to reproduce the issue. The MIME type is image/png, unfortunately I was not able to figure out why an empty file is being sent from vector camera app, a similar app is having the same issue.

Here's my logcat output

---------------------------- PROCESS STARTED (27613) for package name.lmj001.savetodevice ----------------------------
16:10:26.791 nativeloader                        name.lmj001.savetodevice             D  Configuring classloader-namespace for other apk /data/app/~~wjxf0z5lBJWxUm2ggDEpjQ==/name.lmj001.savetodevice-1T2x7HPdXLlys0olTE60AQ==/base.apk. target_sdk_version=30, uses_libraries=, library_path=/data/app/~~wjxf0z5lBJWxUm2ggDEpjQ==/name.lmj001.savetodevice-1T2x7HPdXLlys0olTE60AQ==/lib/arm64, permitted_path=/data:/mnt/expand:/data/user/0/name.lmj001.savetodevice
16:10:26.799 GraphicsEnvironment                 name.lmj001.savetodevice             V  ANGLE Developer option for 'name.lmj001.savetodevice' set to: 'default'
16:10:26.800 GraphicsEnvironment                 name.lmj001.savetodevice             V  ANGLE GameManagerService for name.lmj001.savetodevice: false
16:10:26.800 GraphicsEnvironment                 name.lmj001.savetodevice             V  Updatable production driver is not supported on the device.
16:10:26.802 NetworkSecurityConfig               name.lmj001.savetodevice             D  No Network Security Config specified, using platform default
16:10:26.803 NetworkSecurityConfig               name.lmj001.savetodevice             D  No Network Security Config specified, using platform default
16:10:26.864 01.savetodevice                     name.lmj001.savetodevice             W  Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
16:10:26.864 01.savetodevice                     name.lmj001.savetodevice             W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
16:10:26.895 MainActivity                        name.lmj001.savetodevice             D  uri: content://com.dozingcatsoftware.vectorcamera.fileprovider/external_files/VectorCamera/VectorCamera_images/2022-11-29-21-45-07-945.png
16:10:26.895 MainActivity                        name.lmj001.savetodevice             D  fromUriFileName: 2022-11-29-21-45-07-945.png
16:10:26.895 MainActivity                        name.lmj001.savetodevice             D  type: image/png
16:10:26.956 AdrenoGLES-0                        name.lmj001.savetodevice             I  QUALCOMM build                   : 85da404, I46ff5fc46f
                                                                                         Build Date                       : 11/30/20
                                                                                         OpenGL ES Shader Compiler Version: EV031.31.04.01
                                                                                         Local Branch                     : promo490_3_Google
                                                                                         Remote Branch                    : 
                                                                                         Remote Branch                    : 
                                                                                         Reconstruct Branch               : 
16:10:26.956 AdrenoGLES-0                        name.lmj001.savetodevice             I  Build Config                     : S P 10.0.4 AArch64
16:10:26.956 AdrenoGLES-0                        name.lmj001.savetodevice             I  Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
16:10:26.964 AdrenoGLES-0                        name.lmj001.savetodevice             I  PFP: 0x016ee190, ME: 0x00000000
16:10:26.968 AdrenoUtils                         name.lmj001.savetodevice             W  <ReadGpuID_from_sysfs:197>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model
16:10:26.968 AdrenoUtils                         name.lmj001.savetodevice             W  <ReadGpuID:221>: Failed to read chip ID from gpu_model. Fallback to use the GSL path
16:10:27.044 Parcel                              name.lmj001.savetodevice             W  Expecting binder but got null!

@lmj0011 lmj0011 added wontfix This will not be worked on and removed good first issue Good for newcomers labels Nov 29, 2022
@lmj0011
Copy link
Owner

lmj0011 commented Nov 29, 2022

Added wontfix label since issue appears to be originating from the Vector Camera app itself.

@dozingcat
Copy link

Yes, this was a bug in Vector Camera which should be fixed with dozingcat/VectorCamera#58. The problem was setting FLAG_ACTIVITY_NO_HISTORY in the sharing intent, which prevented save-on-device from being notified after the user had selected the save file location, which resulted in an empty file.

Sorry about that and thanks for letting me know!

@lmj0011 lmj0011 closed this as completed Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants