Fix crash while closing maximized album view 97/318497/1 accepted/tizen_unified_x_asan accepted/tizen/unified/20250124.105404 accepted/tizen/unified/x/20250125.012748 accepted/tizen/unified/x/asan/20250211.003525
authorMd. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
Fri, 17 Jan 2025 10:02:47 +0000 (16:02 +0600)
committerMd. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
Fri, 17 Jan 2025 10:02:47 +0000 (16:02 +0600)
[Problem][TTEN-805] Crash issue while closing maximized album window

[Cause & Measure]
    Cause: customWindow is being lowered without checking
           if it has been alread disposed in WindowVisibilityChanged Handler
    Measure: Null and disposed object check has been added

Change-Id: I5e399079ffef509a240a3c454fbfd26e4a833886
Signed-off-by: Md. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
SettingWallpaper/SettingWallpaper/Core/ViewManager.cs
SettingWallpaper/SettingWallpaper/CustomBorder.cs
packaging/org.tizen.cssetting-wallpaper-1.0.0.rpk

index e12cd07caa1b90ee0cae7eb492075ccefefdafe8..4a6611f15051ca03b920dad154af385d11809a5a 100644 (file)
@@ -281,6 +281,10 @@ namespace SettingWallpaper.Core
         private void OnWindowVisibilityChanged(object sender, Window.VisibilityChangedEventArgs e)
         {
             Tizen.Log.Debug(Resources.LogTag, "Visibility changed: " + e.Visibility);
+            if(appCustomBorder == null || (appCustomBorder as CustomBorder).disposed == true)
+            {
+                return;
+            }
             if (e.Visibility == false)
             {
                 customWindow?.Lower();
index 2e74528c8787895d485fa7b2118a4b9868d18c78..6027b4bde55fb03edfaca2f913151ba9e7cb68cf 100644 (file)
@@ -37,7 +37,7 @@ namespace SettingWallpaper
         private View borderView;
         private View bottomView;
 
-        private bool disposed = false;
+        public bool disposed = false;
         private ImageView minimalizeIcon;
         private ImageView maximalizeIcon;
         private ImageView closeIcon;
index 34861a595ccd7579b49b192356fd9bf147c1b9ba..33d146733876ddd6d14cf4d0bf7bc3adec0ed73b 100644 (file)
Binary files a/packaging/org.tizen.cssetting-wallpaper-1.0.0.rpk and b/packaging/org.tizen.cssetting-wallpaper-1.0.0.rpk differ