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

Wrong Image Scaling During Preview #14484

Open
4 tasks done
alperozturk96 opened this issue Feb 3, 2025 · 2 comments
Open
4 tasks done

Wrong Image Scaling During Preview #14484

alperozturk96 opened this issue Feb 3, 2025 · 2 comments
Assignees
Labels

Comments

@alperozturk96
Copy link
Collaborator

alperozturk96 commented Feb 3, 2025

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Download image
  2. And open the image from the file list
  3. Image will scale wrong

Expected behaviour

Image should not fill all screen

Actual behaviour

test.mp4

Android version

15

Device brand and model

Emulator

Stock or custom OS?

Stock

Nextcloud android app version

3.31.0

Nextcloud server version

30.0.5

@alperozturk96 alperozturk96 self-assigned this Feb 3, 2025
@alperozturk96 alperozturk96 changed the title Image Scaling During Preview Wrong Image Scaling During Preview Feb 3, 2025
@alexknop
Copy link

alexknop commented Feb 5, 2025

Am also seeing this issue.
TCL 50 XE running Android 15 and Android app 3.31.0

Trying to open this image:

Image

It opens like this:

Image

2025-02-05 10:47:09.829 28795-28795 FileDisplayActivity     com.nextcloud.client                 V  onPause() start
2025-02-05 10:47:09.830 28795-28795 AppMemTag               com.nextcloud.client                 D  onActivityPaused com.owncloud.android.ui.activity.FileDisplayActivity@e07a27f
2025-02-05 10:47:09.830 28795-28795 FileDisplayActivity     com.nextcloud.client                 D  onPause() ending
2025-02-05 10:47:09.832 28795-28795 FileDisplayActivity     com.nextcloud.client                 V  onPause() end
2025-02-05 10:47:09.847 28795-28795 ActivityThread          com.nextcloud.client                 V  Handling launch of ActivityRecord{bd4a031 token=android.os.BinderProxy@7d0d4d8 {com.nextcloud.client/com.owncloud.android.ui.preview.PreviewImageActivity}} called by android.app.servertransaction.LaunchActivityItem.execute:112 android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem:174 android.app.servertransaction.TransactionExecutor.executeTransactionItems:109 
2025-02-05 10:47:09.851 28795-29067 libMEOW                 com.nextcloud.client                 D  meow new tls: 0xb400007dec523080
2025-02-05 10:47:09.851 28795-29067 libMEOW                 com.nextcloud.client                 D  applied 0 plugin for [com.nextcloud.client].
2025-02-05 10:47:09.851 28795-29067 libMEOW                 com.nextcloud.client                 D  meow delete tls: 0xb400007dec523080
2025-02-05 10:47:09.935 28795-28795 PreviewImageActivity    com.nextcloud.client                 D  onCreate(Bundle) starting
2025-02-05 10:47:09.936 28795-28795 AppMemTag               com.nextcloud.client                 D  onActivityCreated com.owncloud.android.ui.preview.PreviewImageActivity@796021c
2025-02-05 10:47:17.238 28795-28795 PreviewImageActivity    com.nextcloud.client                 D  onStart() starting
2025-02-05 10:47:17.247 28795-29068 GetUserInf...eOperation com.nextcloud.client                 E  Failed response while getting user information
2025-02-05 10:47:17.247 28795-29068 GetUserInf...eOperation com.nextcloud.client                 E  *** status code: -1
2025-02-05 10:47:17.250 28795-28795 FileDataStorageManager  com.nextcloud.client                 D  getFolderContent - start
2025-02-05 10:47:17.258 28795-29072 OwnCloudClient #0       com.nextcloud.client                 D  REQUEST GET /nextcloud/ocs/v2.php/cloud/capabilities
2025-02-05 10:47:17.260 28795-29072 AdvancedSs...ketFactory com.nextcloud.client                 D  Creating SSL Socket with remote 192.168.1.2:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@769689f
2025-02-05 10:47:17.260 28795-29072 AdvancedSs...ketFactory com.nextcloud.client                 D   ... with connection timeout 60000 and socket timeout 60000
2025-02-05 10:47:17.263 28795-28795 FileDataStorageManager  com.nextcloud.client                 D  getFolderContent - finished
2025-02-05 10:47:17.263 28795-29072 ServerNameIndicator     com.nextcloud.client                 I  SNI done, hostname: 192.168.1.2
2025-02-05 10:47:17.326 28795-28802 extcloud.client         com.nextcloud.client                 I  Background concurrent mark compact GC freed 11MB AllocSpace bytes, 54(1080KB) LOS objects, 51% free, 11MB/23MB, paused 419us,10.003ms total 67.254ms
2025-02-05 10:47:17.345 28795-28804 TclFeaturesProxy        com.nextcloud.client                 D  Not found feature: STABILITY
2025-02-05 10:47:17.365 28795-28795 PreviewImageActivity    com.nextcloud.client                 D  Worker stopped
2025-02-05 10:47:17.373 28795-28795 PreviewImageActivity    com.nextcloud.client                 D  onResume() starting
2025-02-05 10:47:17.373 28795-28795 AppMemTag               com.nextcloud.client                 D  onActivityResumed com.owncloud.android.ui.preview.PreviewImageActivity@796021c
2025-02-05 10:47:17.579 28795-28795 VRI[Previe...eActivity] com.nextcloud.client                 D  hardware acceleration = true, forceHwAccelerated = false
2025-02-05 10:47:17.585 28795-28795 InputEventReceiver      com.nextcloud.client                 D  Input log is disabled in InputEventReceiver.
2025-02-05 10:47:17.586 28795-28795 Looper                  com.nextcloud.client                 W  Slow dispatch took 7739ms main h=android.app.ActivityThread$H c=null m=159
2025-02-05 10:47:17.586 28795-28795 Choreographer           com.nextcloud.client                 I  Skipped 928 frames!  The application may be doing too much work on its main thread.
2025-02-05 10:47:17.603 28795-28795 BufferQueueConsumer     com.nextcloud.client                 D  [](id:707b00000002,api:0,p:-1,c:28795) connect: controlledByApp=false
2025-02-05 10:47:17.603 28795-28795 BLASTBufferQueue        com.nextcloud.client                 D  [VRI[PreviewImageActivity]#2](f:0,a:0) constructor()
2025-02-05 10:47:17.603 28795-28795 BLASTBufferQueue        com.nextcloud.client                 D  [VRI[PreviewImageActivity]#2](f:0,a:0) update width=1080 height=2460 format=-1 mTransformHint=0
2025-02-05 10:47:17.638 28795-28795 PreviewImageFragment    com.nextcloud.client                 D  savedInstanceState is null
2025-02-05 10:47:17.640 28795-28795 cache_test_DISK_        com.nextcloud.client                 D  image read from disk 1178344844
2025-02-05 10:47:17.649 28795-28934 skia                    com.nextcloud.client                 D  SkJpegCodec::onGetPixels + (4096, 3072)
2025-02-05 10:47:17.650 28795-28934 DMABUFHEAPS             com.nextcloud.client                 I  Using DMA-BUF heap named: mtk_mm
2025-02-05 10:47:17.666 28795-28934 skia                    com.nextcloud.client                 D  stream getLength() supported, buffer addr 0x7de4722000 length 5373824
2025-02-05 10:47:17.671 28795-28934 skia                    com.nextcloud.client                 D  LoadInputStreamToMem va 0x7de4722000  size 5373824
2025-02-05 10:47:17.675 28795-28934 libjpeg-alpha           com.nextcloud.client                 D  Huffman Builder run in subthread
2025-02-05 10:47:17.676 28795-28934 libjpeg-alpha           com.nextcloud.client                 D  Tile Decoder (#thread:4, size:1024 1024 1024 1024x768, alignment:256x16)
2025-02-05 10:47:17.732 28795-28846 BLASTBufferQueue        com.nextcloud.client                 D  [VRI[PreviewImageActivity]#2](f:0,a:1) acquireNextBufferLocked size=1080x2460 mFrameNumber=1 applyTransaction=true mTimestamp=305250341706809(auto) mPendingTransactions.size=0 graphicBufferId=123673583288340 transform=0
2025-02-05 10:47:17.733 28795-28795 VRI[Previe...eActivity] com.nextcloud.client                 D  reportDrawFinished
2025-02-05 10:47:17.739 28795-28795 FileActivity            com.nextcloud.client                 D  Operations service connected
2025-02-05 10:47:17.740 28795-28795 VRI[FileDi...yActivity] com.nextcloud.client                 D  visibilityChanged oldVisibility=true newVisibility=false
2025-02-05 10:47:17.747 28795-28806 HWUI                    com.nextcloud.client                 I  Davey! duration=7888ms; Flags=1, FrameTimelineVsyncId=74714977, IntendedVsync=305242454537000, Vsync=305250187870024, InputEventId=0, HandleInputStart=305250196281271, AnimationStart=305250196283117, PerformTraversalsStart=305250196655348, DrawStart=305250334292655, FrameDeadline=305242470203666, FrameInterval=305250195849578, FrameStartTime=8333333, SyncQueued=305250336079348, SyncStart=305250336175425, IssueDrawCommandsStart=305250336248963, SwapBuffers=305250341380271, FrameCompleted=305250342766809, DequeueBufferDuration=13770, QueueBufferDuration=483692, GpuCompleted=305250342766809, SwapBuffersCompleted=305250342376271, DisplayPresentTime=1908828408, CommandSubmissionCompleted=305250341380271, 
2025-02-05 10:47:17.753 28795-28806 HWUI                    com.nextcloud.client                 I  Davey! duration=7897ms; Flags=1, FrameTimelineVsyncId=74714977, IntendedVsync=305242454537000, Vsync=305250187870024, InputEventId=0, HandleInputStart=305250196281271, AnimationStart=305250196283117, PerformTraversalsStart=305250196655348, DrawStart=305250344606809, FrameDeadline=305242480710166, FrameInterval=305250195849578, FrameStartTime=8333333, SyncQueued=305250344625886, SyncStart=305250344707732, IssueDrawCommandsStart=305250344907117, SwapBuffers=305250349245886, FrameCompleted=305250351623117, DequeueBufferDuration=27308, QueueBufferDuration=259077, GpuCompleted=305250351623117, SwapBuffersCompleted=305250350389809, DisplayPresentTime=305218915314192, CommandSubmissionCompleted=305250349245886, 
2025-02-05 10:47:17.757 28795-28802 extcloud.client         com.nextcloud.client                 I  NativeAlloc concurrent mark compact GC freed 1576KB AllocSpace bytes, 1(20KB) LOS objects, 52% free, 10MB/22MB, paused 1.296ms,18.531ms total 107.024ms
2025-02-05 10:47:17.759 28795-28804 TclFeaturesProxy        com.nextcloud.client                 D  Not found feature: STABILITY
2025-02-05 10:47:17.772 28795-28934 skia                    com.nextcloud.client                 D  SkJpegCodec::onGetPixels -
2025-02-05 10:47:17.772 28795-28795 BLASTBufferQueue        com.nextcloud.client                 D  [VRI[FileDisplayActivity]#1](f:0,a:4) destructor()
2025-02-05 10:47:17.772 28795-28795 BufferQueueConsumer     com.nextcloud.client                 D  [VRI[FileDisplayActivity]#1(BLAST Consumer)1](id:707b00000001,api:0,p:-1,c:28795) disconnect
2025-02-05 10:47:17.781 28795-28795 AppMemTag               com.nextcloud.client                 D  onActivityStopped com.owncloud.android.ui.activity.FileDisplayActivity@e07a27f
2025-02-05 10:47:17.781 28795-28795 FileDisplayActivity     com.nextcloud.client                 D  onStop() ending
2025-02-05 10:47:17.792 28795-28795 FileDisplayActivity     com.nextcloud.client                 D  onSaveInstanceState(Bundle) starting
2025-02-05 10:47:17.792 28795-28795 ExtendedListFragment    com.nextcloud.client                 D  onSaveInstanceState()
2025-02-05 10:47:17.793 28795-28795 OCFileListFragment      com.nextcloud.client                 D  onSaveInstanceState: 489.2 MB, raw byte 512942341
2025-02-05 10:47:17.795 28795-28795 FileActivity            com.nextcloud.client                 D  onSaveInstanceState: 489.2 MB, raw byte 512942341
2025-02-05 10:47:17.795 28795-28795 FileDisplayActivity     com.nextcloud.client                 D  onSaveInstanceState: Pending, raw byte -1
2025-02-05 10:47:17.796 28795-28795 FileDisplayActivity     com.nextcloud.client                 V  onSaveInstanceState() end
2025-02-05 10:47:17.803 28795-28795 VRI[Previe...eActivity] com.nextcloud.client                 D  reportDrawFinished
2025-02-05 10:47:18.056 28795-29085 libMEOW                 com.nextcloud.client                 D  meow new tls: 0xb400007ca6f16cc0
2025-02-05 10:47:18.056 28795-29085 libMEOW                 com.nextcloud.client                 D  applied 0 plugin for [com.nextcloud.client].
2025-02-05 10:47:18.063 28795-28934 libMEOW                 com.nextcloud.client                 D  meow new tls: 0xb400007c822118c0
2025-02-05 10:47:18.063 28795-28934 libMEOW                 com.nextcloud.client                 D  applied 0 plugin for [com.nextcloud.client].
2025-02-05 10:47:18.067 28795-28934 HWUI                    com.nextcloud.client                 D  PixelStorageType::Hardware
2025-02-05 10:47:18.101 28795-28934 HWUI                    com.nextcloud.client                 D  PixelStorageType::WrappedPixelRef
2025-02-05 10:47:18.131 28795-29084 InteractionJankMonitor  com.nextcloud.client                 W  Initializing without READ_DEVICE_CONFIG permission. enabled=false, interval=1, missedFrameThreshold=3, frameTimeThreshold=64, package=com.nextcloud.client
2025-02-05 10:47:18.174 28795-28934 HWUI                    com.nextcloud.client                 D  PixelStorageType::Hardware
2025-02-05 10:47:18.174 28795-28795 PreviewImageFragment    com.nextcloud.client                 D  Showing image with resolution 2460x1080
2025-02-05 10:47:19.549 28795-29072 AdvancedSs...ketFactory com.nextcloud.client                 D  Creating SSL Socket with remote 192.168.1.2:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@769689f
2025-02-05 10:47:19.549 28795-29072 AdvancedSs...ketFactory com.nextcloud.client                 D   ... with connection timeout 60000 and socket timeout 60000
2025-02-05 10:47:19.551 28795-29072 ServerNameIndicator     com.nextcloud.client                 I  SSLSocket implementation: org.conscrypt.Java8EngineSocket
2025-02-05 10:47:19.551 28795-29072 ServerNameIndicator     com.nextcloud.client                 I  SNI done, hostname: 192.168.1.2
2025-02-05 10:47:21.853 28795-29072 AdvancedSs...ketFactory com.nextcloud.client                 D  Creating SSL Socket with remote 192.168.1.2:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@769689f
2025-02-05 10:47:21.853 28795-29072 AdvancedSs...ketFactory com.nextcloud.client                 D   ... with connection timeout 60000 and socket timeout 60000
2025-02-05 10:47:21.855 28795-29072 ServerNameIndicator     com.nextcloud.client                 I  SNI done, hostname: 192.168.1.2
2025-02-05 10:47:24.157 28795-29072 AdvancedSs...ketFactory com.nextcloud.client                 D  Creating SSL Socket with remote 192.168.1.2:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@769689f
2025-02-05 10:47:24.158 28795-29072 AdvancedSs...ketFactory com.nextcloud.client                 D   ... with connection timeout 60000 and socket timeout 60000
2025-02-05 10:47:24.160 28795-29072 ServerNameIndicator     com.nextcloud.client                 I  SNI done, hostname: 192.168.1.2
2025-02-05 10:47:26.465 28795-29072 GetCapabil...eOperation com.nextcloud.client                 E  Exception while getting capabilities
                                                                                                    java.net.ConnectException: failed to connect to /192.168.1.2 (port 443) from /192.168.1.72 (port 51649) after 60000ms: isConnected failed: EHOSTUNREACH (No route to host)
                                                                                                    	at libcore.io.IoBridge.isConnected(IoBridge.java:347)
                                                                                                    	at libcore.io.IoBridge.connectErrno(IoBridge.java:237)
                                                                                                    	at libcore.io.IoBridge.connect(IoBridge.java:179)
                                                                                                    	at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142)
                                                                                                    	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
                                                                                                    	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
                                                                                                    	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
                                                                                                    	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
                                                                                                    	at java.net.Socket.connect(Socket.java:646)
                                                                                                    	at org.conscrypt.AbstractConscryptSocket.connect(AbstractConscryptSocket.java:155)
                                                                                                    	at com.owncloud.android.lib.common.network.AdvancedSslSocketFactory.createSocket(AdvancedSslSocketFactory.java:169)
                                                                                                    	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
                                                                                                    	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
                                                                                                    	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
                                                                                                    	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
                                                                                                    	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
                                                                                                    	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
                                                                                                    	at com.owncloud.android.lib.common.OwnCloudClient.executeMethod(OwnCloudClient.java:192)
                                                                                                    	at com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation.run(GetCapabilitiesRemoteOperation.java:269)
                                                                                                    	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:193)
                                                                                                    	at com.owncloud.android.operations.GetCapabilitiesOperation.run(GetCapabilitiesOperation.java:39)
                                                                                                    	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:132)
                                                                                                    	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:141)
                                                                                                    	at com.owncloud.android.operations.common.SyncOperation.execute(SyncOperation.java:51)
                                                                                                    	at com.owncloud.android.ui.activity.DrawerActivity.lambda$fetchExternalLinks$10(DrawerActivity.java:1295)
                                                                                                    	at com.owncloud.android.ui.activity.DrawerActivity.$r8$lambda$cDuHbgQbFZEn18fSXfxfLNk9Wmw(Unknown Source:0)
                                                                                                    	at com.owncloud.android.ui.activity.DrawerActivity$$ExternalSyntheticLambda8.run(D8$$SyntheticClass:0)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
                                                                                                    Caused by: android.system.ErrnoException: isConnected failed: EHOSTUNREACH (No route to host)
                                                                                                    	at libcore.io.IoBridge.isConnected(IoBridge.java:334)
                                                                                                    	at libcore.io.IoBridge.connectErrno(IoBridge.java:237) 
                                                                                                    	at libcore.io.IoBridge.connect(IoBridge.java:179) 
                                                                                                    	at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) 
                                                                                                    	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) 
                                                                                                    	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230) 
                                                                                                    	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212) 
                                                                                                    	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436) 
                                                                                                    	at java.net.Socket.connect(Socket.java:646) 
                                                                                                    	at org.conscrypt.AbstractConscryptSocket.connect(AbstractConscryptSocket.java:155) 
                                                                                                    	at com.owncloud.android.lib.common.network.AdvancedSslSocketFactory.createSocket(AdvancedSslSocketFactory.java:169) 
                                                                                                    	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) 
                                                                                                    	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) 
                                                                                                    	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) 
                                                                                                    	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) 
                                                                                                    	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) 
                                                                                                    	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) 
                                                                                                    	at com.owncloud.android.lib.common.OwnCloudClient.executeMethod(OwnCloudClient.java:192) 
                                                                                                    	at com.owncloud.android.lib.resources.status.GetCapabilitiesRemoteOperation.run(GetCapabilitiesRemoteOperation.java:269) 
                                                                                                    	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:193) 
                                                                                                    	at com.owncloud.android.operations.GetCapabilitiesOperation.run(GetCapabilitiesOperation.java:39) 
                                                                                                    	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:132) 
                                                                                                    	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:141) 
                                                                                                    	at com.owncloud.android.operations.common.SyncOperation.execute(SyncOperation.java:51) 
                                                                                                    	at com.owncloud.android.ui.activity.DrawerActivity.lambda$fetchExternalLinks$10(DrawerActivity.java:1295) 
                                                                                                    	at com.owncloud.android.ui.activity.DrawerActivity.$r8$lambda$cDuHbgQbFZEn18fSXfxfLNk9Wmw(Unknown Source:0) 
                                                                                                    	at com.owncloud.android.ui.activity.DrawerActivity$$ExternalSyntheticLambda8.run(D8$$SyntheticClass:0) 
                                                                                                    	at java.lang.Thread.run(Thread.java:1012) 
2025-02-05 10:47:26.470 28795-29072 ExternalLinks           com.nextcloud.client                 D  links disabled
�

@alexknop
Copy link

alexknop commented Feb 5, 2025

@alperozturk96 try my branch in #14501
I was able to fix it on my end.

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

No branches or pull requests

2 participants