Add more SystemError print logs + Do not use DALI_LOG_WARNING 63/322163/4
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 4 Apr 2025 04:49:36 +0000 (13:49 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 9 Apr 2025 00:35:02 +0000 (09:35 +0900)
Print some more system error logs where using fread / fseek / ftell.

+

DALI_LOG_WARNINGS print some logs only for debug modes.
Let we print some critical logs as error level, and verbose logs as debug level.

Change-Id: I3e7c87882ee1bd72a123b71435e8861c6ad3949b
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
37 files changed:
dali/devel-api/adaptor-framework/bitmap-saver.cpp
dali/devel-api/adaptor-framework/image-loading.cpp
dali/internal/accessibility/tizen-wayland/tts-player-impl-tizen.cpp
dali/internal/adaptor-framework/android/file-loader-impl-android.cpp
dali/internal/adaptor-framework/android/file-stream-impl-android.cpp
dali/internal/adaptor-framework/generic/file-stream-impl-generic.cpp
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/imaging/common/file-download.cpp
dali/internal/imaging/common/gif-loading.cpp
dali/internal/imaging/common/image-loader.cpp
dali/internal/imaging/common/image-operations.cpp
dali/internal/imaging/common/loader-astc.cpp
dali/internal/imaging/common/loader-bmp.cpp
dali/internal/imaging/common/loader-gif.cpp
dali/internal/imaging/common/loader-ico.cpp
dali/internal/imaging/common/loader-jpeg-turbo.cpp
dali/internal/imaging/common/loader-ktx.cpp
dali/internal/imaging/common/loader-pkm.cpp
dali/internal/imaging/common/loader-png.cpp
dali/internal/imaging/common/loader-wbmp.cpp
dali/internal/imaging/common/webp-loading.cpp
dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp
dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.cpp
dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp
dali/internal/imaging/windows/file-download-win.cpp
dali/internal/imaging/x11/native-image-source-impl-x.cpp
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp
dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp
dali/internal/legacy/common/tizen-platform-abstraction.cpp
dali/internal/system/common/file-closer.h
dali/internal/system/common/trigger-event.cpp
dali/internal/system/macos/file-descriptor-monitor-macos.cpp
dali/internal/system/windows/file-descriptor-monitor-windows.cpp
dali/internal/system/windows/trigger-event.cpp
dali/internal/text/text-abstraction/cairo-renderer.cpp
dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.cpp
dali/internal/window-system/android/window-system-android.cpp

index 3aa86d4ec85429264ade1ef955431420d347642a..3d9ca98a2e6a401fe4f39d2f1e912b3bad06a515 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ FileFormat GetFormatFromFileName(const std::string& filename)
 {
   if(filename.length() < 5)
   {
-    DALI_LOG_WARNING("Invalid (short) filename.\n");
+    DALI_LOG_ERROR("Invalid (short) filename.\n");
   }
   FileFormat format(INVALID_FORMAT);
 
index bef7d78915f5bc62db6424420be22d222772652c..0740b2f1935c0a0b3755aab974bb762913a621c9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
 #include <dali/internal/imaging/common/file-download.h>
 #include <dali/internal/imaging/common/image-loader.h>
 #include <dali/internal/system/common/file-reader.h>
+#include <dali/internal/system/common/system-error-print.h>
 #include <dali/public-api/object/property-map.h>
 
 namespace Dali
@@ -195,13 +196,13 @@ Devel::PixelBuffer DownloadImageSynchronously(const std::string& url, ImageDimen
         }
         else
         {
-          DALI_LOG_WARNING("Unable to decode bitmap supplied as in-memory blob.\n");
+          DALI_LOG_ERROR("Unable to decode bitmap supplied as in-memory blob.\n");
 
           auto prefixSize  = std::min(static_cast<decltype(blobSize)>(0x200), blobSize); // maximum 512 bytes.
           auto errorString = ConvertDataReadable(reinterpret_cast<uint8_t*>(dataBuffer.Begin()), prefixSize, 0x40);
-          DALI_LOG_WARNING("URL: %s\n", url.c_str());
-          DALI_LOG_WARNING("Downloaded data (prefix %zu bytes of %zu bytes):\n", prefixSize, blobSize);
-          DALI_LOG_WARNING("%s\n", errorString.c_str());
+          DALI_LOG_DEBUG_INFO("URL: %s\n", url.c_str());
+          DALI_LOG_DEBUG_INFO("Downloaded data (prefix %zu bytes of %zu bytes):\n", prefixSize, blobSize);
+          DALI_LOG_DEBUG_INFO("%s\n", errorString.c_str());
         }
       }
       else
index aeb04a95be249301ec39b2d99b1cba496ac6fad2..7c30f6ef3eb24c65879e57b1ca3e94039c16aadf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -378,7 +378,7 @@ void TtsPlayerTizen::LogErrorCode(tts_error_e reason)
 
   if(reason != TTS_ERROR_NONE)
   {
-    DALI_LOG_WARNING("[%s:%d] tts error : %s\n", __FUNCTION__, __LINE__, error_string.c_str());
+    DALI_LOG_ERROR("[%s:%d] tts error : %s\n", __FUNCTION__, __LINE__, error_string.c_str());
   }
 }
 
index a65bf92fbab3e988bd1f095fc54fc392c1524fd5..549734577d3d04c2c6e3f8413230ecbb3a0e9d17 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
 // INTERNAL INCLUDES
 #include <dali/integration-api/adaptor-framework/android/android-framework.h>
 #include <dali/internal/adaptor/common/framework.h>
+#include <dali/internal/system/common/system-error-print.h>
 
 namespace Dali
 {
@@ -125,6 +126,7 @@ int ReadFile(const std::string& filename, std::streampos& fileSize, Dali::Vector
     else
     {
       DALI_LOG_ERROR("File not found %s\n", filename.c_str());
+      DALI_PRINT_SYSTEM_ERROR_LOG();
     }
   }
 
@@ -163,6 +165,7 @@ std::streampos GetFileSize(const std::string& filename)
     else
     {
       DALI_LOG_ERROR("File not found %s\n", filename.c_str());
+      DALI_PRINT_SYSTEM_ERROR_LOG();
     }
   }
 
index a99ac92310fbcb5ae312a58baf5148694db7490d..d7c747405297d31a36dcba0529deb10a5cdafba8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 #include <fstream>
-#include <string>
-#include <streambuf>
 #include <iostream>
+#include <streambuf>
+#include <string>
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/adaptor-framework/android/android-framework.h>
 #include <dali/internal/adaptor-framework/common/file-loader-impl.h>
+#include <dali/internal/system/common/system-error-print.h>
 
 namespace Dali
 {
-
 /// Extends streambuf so that we can use the buffer in Dali::Vector
 class VectorStreamBuffer : public std::streambuf
 {
@@ -38,7 +38,7 @@ public:
   VectorStreamBuffer(char* buffer, size_t length)
   {
     char* begin = buffer;
-    char* end = begin + length;
+    char* end   = begin + length;
     setg(begin, begin, end);
     setp(begin, end);
   }
@@ -81,7 +81,7 @@ struct FileStream::Impl::PlatformSpecificImpl
   }
 
   std::unique_ptr<std::iostream> mVectorStream;
-  std::streambuf* mStreamBuffer{nullptr};
+  std::streambuf*                mStreamBuffer{nullptr};
 };
 
 FileStream::Impl::Impl(const std::string& filename, uint8_t mode)
@@ -137,7 +137,8 @@ FileStream::Impl::~Impl()
     const int closeFailed = fclose(mFile);
     if(closeFailed)
     {
-      DALI_LOG_WARNING("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
+      DALI_LOG_ERROR("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
+      DALI_PRINT_SYSTEM_ERROR_LOG();
     }
 
     mFile = nullptr;
@@ -202,9 +203,9 @@ std::iostream& FileStream::Impl::GetStream()
     if(!(mMode & Dali::FileStream::WRITE) && !(mMode & Dali::FileStream::APPEND))
     {
       std::streampos fileSize;
-      if (ReadFile(mFileName, fileSize, mFileBuffer, (mMode & Dali::FileStream::BINARY) ? Dali::FileLoader::BINARY : Dali::FileLoader::TEXT))
+      if(ReadFile(mFileName, fileSize, mFileBuffer, (mMode & Dali::FileStream::BINARY) ? Dali::FileLoader::BINARY : Dali::FileLoader::TEXT))
       {
-        mBuffer = reinterpret_cast<uint8_t *>(&mFileBuffer[0]);
+        mBuffer   = reinterpret_cast<uint8_t*>(&mFileBuffer[0]);
         mDataSize = fileSize;
 
         // For some reason on Android, calling mBufferStream.rdbuf()->pubsetbuf(...) has no effect.
@@ -212,19 +213,21 @@ std::iostream& FileStream::Impl::GetStream()
 
         mPlatformSpecificImpl->mStreamBuffer = new VectorStreamBuffer(mFileBuffer);
         mPlatformSpecificImpl->mVectorStream.reset(new std::iostream(mPlatformSpecificImpl->mStreamBuffer));
-        if (!mPlatformSpecificImpl->mVectorStream->rdbuf()->in_avail())
+        if(!mPlatformSpecificImpl->mVectorStream->rdbuf()->in_avail())
         {
           DALI_LOG_ERROR(
             "File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%d\".\n",
-            static_cast<void *>(mBuffer),
+            static_cast<void*>(mBuffer),
             static_cast<unsigned>(mDataSize),
             static_cast<int>(openMode));
+          DALI_PRINT_SYSTEM_ERROR_LOG();
         }
         return *mPlatformSpecificImpl->mVectorStream.get();
       }
       else
       {
         DALI_LOG_ERROR("stream open failed for: \"%s\", in mode: \"%d\".\n", mFileName.c_str(), static_cast<int>(openMode));
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
     else
@@ -233,6 +236,7 @@ std::iostream& FileStream::Impl::GetStream()
       if(!mFileStream.is_open())
       {
         DALI_LOG_ERROR("stream open failed for: \"%s\", in mode: \"%d\".\n", mFileName.c_str(), static_cast<int>(openMode));
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
     return mFileStream;
@@ -249,6 +253,7 @@ std::iostream& FileStream::Impl::GetStream()
                      static_cast<void*>(mBuffer),
                      static_cast<unsigned>(mDataSize),
                      static_cast<int>(openMode));
+      DALI_PRINT_SYSTEM_ERROR_LOG();
     }
     return *mPlatformSpecificImpl->mVectorStream.get();
   }
@@ -308,11 +313,13 @@ FILE* FileStream::Impl::GetFile()
                          static_cast<void*>(mBuffer),
                          static_cast<unsigned>(mDataSize),
                          openMode);
+          DALI_PRINT_SYSTEM_ERROR_LOG();
         }
       }
       else
       {
         DALI_LOG_ERROR("read file failed for: \"%s\", in mode: \"%s\".\n", mFileName.c_str(), openMode);
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
     else
@@ -321,6 +328,7 @@ FILE* FileStream::Impl::GetFile()
       if(!mFile)
       {
         DALI_LOG_ERROR("file open failed for: \"%s\", in mode: \"%s\".\n", mFileName.c_str(), openMode);
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
   }
@@ -333,6 +341,7 @@ FILE* FileStream::Impl::GetFile()
                      static_cast<void*>(mBuffer),
                      static_cast<unsigned>(mDataSize),
                      openMode);
+      DALI_PRINT_SYSTEM_ERROR_LOG();
     }
   }
 
index e34b7f06f9080afeacbc3a8a2229b8491308e938..d129f10898f3c79afc744bf9599c2953719675a8 100644 (file)
@@ -78,7 +78,7 @@ FileStream::Impl::~Impl()
     const int closeFailed = fclose(mFile);
     if(closeFailed)
     {
-      DALI_LOG_WARNING("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
+      DALI_LOG_ERROR("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
       DALI_PRINT_SYSTEM_ERROR_LOG();
     }
 
@@ -135,7 +135,7 @@ std::iostream& FileStream::Impl::GetStream()
     mFileStream.open(mFileName, static_cast<std::ios_base::openmode>(openMode));
     if(!mFileStream.is_open())
     {
-      DALI_LOG_WARNING("stream open failed for: \"%s\", in mode: \"%d\".\n", mFileName.c_str(), openMode);
+      DALI_LOG_ERROR("stream open failed for: \"%s\", in mode: \"%d\".\n", mFileName.c_str(), openMode);
       DALI_PRINT_SYSTEM_ERROR_LOG();
     }
     return mFileStream;
@@ -145,10 +145,10 @@ std::iostream& FileStream::Impl::GetStream()
     mBufferStream.rdbuf()->pubsetbuf(reinterpret_cast<char*>(mBuffer), static_cast<std::streamsize>(static_cast<size_t>(mDataSize)));
     if(!mBufferStream.rdbuf()->in_avail())
     {
-      DALI_LOG_WARNING("File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%d\".\n",
-                       static_cast<void*>(mBuffer),
-                       static_cast<unsigned>(mDataSize),
-                       openMode);
+      DALI_LOG_ERROR("File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%d\".\n",
+                     static_cast<void*>(mBuffer),
+                     static_cast<unsigned>(mDataSize),
+                     openMode);
       DALI_PRINT_SYSTEM_ERROR_LOG();
     }
   }
index d22764376e889bbe2d5d22ea85a62f5bc855e46f..ac07f02fe173dd0fc89476fca51b1c10313d7739 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,6 +62,7 @@
 #include <dali/internal/system/common/logging.h>
 #include <dali/internal/system/common/object-profiler.h>
 #include <dali/internal/system/common/performance-interface-factory.h>
+#include <dali/internal/system/common/system-error-print.h>
 #include <dali/internal/system/common/system-factory.h>
 #include <dali/internal/system/common/thread-controller.h>
 #include <dali/internal/window-system/common/display-connection.h>
@@ -134,6 +135,8 @@ void Adaptor::Initialize(GraphicsFactoryInterface& graphicsFactory)
   mEnvironmentOptions->SetLogFunction(logFunction);
   mEnvironmentOptions->InstallLogFunction(); // install logging for main thread
 
+  DALI_LOG_RELEASE_INFO("Adaptor::Initialize\n");
+
   mPlatformAbstraction = new TizenPlatform::TizenPlatformAbstraction;
 
   std::string path;
@@ -316,21 +319,27 @@ void Adaptor::Initialize(GraphicsFactoryInterface& graphicsFactory)
   std::string systemCachePath = GetSystemCachePath();
   if(!systemCachePath.empty())
   {
+    DALI_LOG_RELEASE_INFO("Check and create dali system cache directory: %s\n", systemCachePath.c_str());
     int dir_err = mkdir(systemCachePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
     if(0 != dir_err && errno != EEXIST)
     {
       DALI_LOG_ERROR("Error creating system cache directory: %s!\n", systemCachePath.c_str());
+      DALI_PRINT_SYSTEM_ERROR_LOG();
     }
 
     std::string shaderCachePath = GetProgramBinaryPath();
+    DALI_LOG_RELEASE_INFO("Check and create dali shader cache directory: %s\n", shaderCachePath.c_str());
     dir_err = mkdir(shaderCachePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
     if(0 != dir_err && errno != EEXIST)
     {
       DALI_LOG_ERROR("Error creating shader cache directory: %s!\n", shaderCachePath.c_str());
+      DALI_PRINT_SYSTEM_ERROR_LOG();
     }
   }
 
   mConfigurationManager = Utils::MakeUnique<ConfigurationManager>(systemCachePath, mGraphics.get(), mThreadController);
+
+  DALI_LOG_RELEASE_INFO("Adaptor::Initialize: Initialized\n");
 }
 
 Adaptor::~Adaptor()
index 4015bc07f0de0c2462adf003c5fdc8ae1e471613..2f1606199fab2057577ae0994f9e13858c851562 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -385,7 +385,7 @@ bool DownloadFile(CURL*                  curlHandle,
   }
   else if(DALI_UNLIKELY(dataSize == 0u))
   {
-    DALI_LOG_WARNING("Warning : Download data size is 0! url : %s\n", url.c_str());
+    DALI_LOG_ERROR("Warning : Download data size is 0! url : %s\n", url.c_str());
   }
   return true;
 }
@@ -415,7 +415,7 @@ bool DownloadRemoteFileIntoMemory(const std::string&     url,
 
   if(url.empty())
   {
-    DALI_LOG_WARNING("empty url requested \n");
+    DALI_LOG_ERROR("empty url requested \n");
     return false;
   }
 
index 6f84d4a170b29e203a31e319bef50538281fe7b9..f2527650f062cc65afb06f4f38d4d2699f73e3f7 100644 (file)
@@ -33,6 +33,7 @@
 #include <dali/integration-api/debug.h>
 #include <dali/internal/imaging/common/file-download.h>
 #include <dali/internal/system/common/file-reader.h>
+#include <dali/internal/system/common/system-error-print.h>
 #include <dali/public-api/images/pixel-data.h>
 
 #define IMG_TOO_BIG(w, h)                                                       \
@@ -306,6 +307,7 @@ bool LoaderInfo::FileData::LoadLocalFile()
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END) <= -1))
   {
     DALI_LOG_ERROR("Error seeking within file\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -313,6 +315,7 @@ bool LoaderInfo::FileData::LoadLocalFile()
   if(DALI_UNLIKELY(length <= -1))
   {
     DALI_LOG_ERROR("Could not determine GIF file size.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -324,11 +327,20 @@ bool LoaderInfo::FileData::LoadLocalFile()
       DALI_LOG_ERROR("malloc is failed. request malloc size : %llu\n", sizeof(GifByteType) * static_cast<unsigned long long>(length));
       return false;
     }
-    length = fread(globalMap, sizeof(GifByteType), length, fp);
+    const long long bytesRead = fread(globalMap, sizeof(GifByteType), length, fp);
+
+    // Check the size of loaded data is what we expected.
+    if(DALI_UNLIKELY(bytesRead != length))
+    {
+      DALI_LOG_ERROR("Error read bytes (required : %lld, actual read : %lld)\n", length, bytesRead);
+      DALI_PRINT_SYSTEM_ERROR_LOG();
+      return false;
+    }
   }
   else
   {
     DALI_LOG_ERROR("Error seeking within file\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
   return true;
@@ -361,18 +373,29 @@ bool LoaderInfo::FileData::LoadRemoteFile()
           }
           else
           {
-            length    = fread(globalMap, sizeof(GifByteType), blobSize, fp);
-            succeeded = true;
+            length = fread(globalMap, sizeof(GifByteType), blobSize, fp);
+            if(DALI_UNLIKELY(static_cast<long long>(static_cast<unsigned long long>(blobSize)) != length))
+            {
+              DALI_LOG_ERROR("Error read bytes (required : %zu, actual read : %lld)\n", blobSize, length);
+              DALI_PRINT_SYSTEM_ERROR_LOG();
+              length = 0;
+            }
+            else
+            {
+              succeeded = true;
+            }
           }
         }
         else
         {
           DALI_LOG_ERROR("Error seeking within file\n");
+          DALI_PRINT_SYSTEM_ERROR_LOG();
         }
       }
       else
       {
         DALI_LOG_ERROR("Error reading file\n");
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
     else
index 081b3f714c6f66fc2c967edb93990b15cd5759a5..0a9babc8373c966a99b5b0c8d73731aa75575680 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@
 #include <dali/internal/imaging/common/loader-wbmp.h>
 #include <dali/internal/imaging/common/loader-webp.h>
 #include <dali/internal/system/common/file-reader.h>
+#include <dali/internal/system/common/system-error-print.h>
 
 using namespace Dali::Integration;
 
@@ -179,6 +180,7 @@ bool GetBitmapLoaderFunctions(FILE*                                        fp,
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
   }
 
   if(read != MAGIC_LENGTH)
@@ -265,6 +267,7 @@ bool GetBitmapLoaderFunctions(FILE*                                        fp,
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
   }
 
   return loaderFound;
index cd2591ed6ff9d3a4b15e28ccb9b9bfab427990a8..8ab31f55898f896377166a385f36bf8e4a961843 100644 (file)
@@ -988,7 +988,7 @@ Dali::Devel::PixelBuffer CropAndPadForFittingMode(Dali::Devel::PixelBuffer& bitm
 
   if(desiredDimensions.GetWidth() < 1u || desiredDimensions.GetHeight() < 1u)
   {
-    DALI_LOG_WARNING("Image scaling aborted as desired dimensions too small (%u, %u).\n", desiredDimensions.GetWidth(), desiredDimensions.GetHeight());
+    DALI_LOG_ERROR("Image scaling aborted as desired dimensions too small (%u, %u).\n", desiredDimensions.GetWidth(), desiredDimensions.GetHeight());
   }
   else if(inputWidth != desiredDimensions.GetWidth() || inputHeight != desiredDimensions.GetHeight())
   {
@@ -1025,7 +1025,7 @@ Dali::Devel::PixelBuffer CropAndPadForFittingMode(Dali::Devel::PixelBuffer& bitm
       if((desiredWidth > MAXIMUM_TARGET_BITMAP_SIZE) || (desiredHeight > MAXIMUM_TARGET_BITMAP_SIZE) ||
          (columnsToPad > MAXIMUM_TARGET_BITMAP_SIZE) || (scanlinesToPad > MAXIMUM_TARGET_BITMAP_SIZE))
       {
-        DALI_LOG_WARNING("Image scaling aborted as final dimensions too large (%u, %u).\n", desiredWidth, desiredHeight);
+        DALI_LOG_ERROR("Image scaling aborted as final dimensions too large (%u, %u).\n", desiredWidth, desiredHeight);
         return bitmap;
       }
 
index ac797a7c4671006e9f6c44675e36503b3fea0445..ab893e872f1b63cf3084498576b7fd7dabf78efa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
 #include <dali/internal/imaging/common/pixel-buffer-impl.h>
+#include <dali/internal/system/common/system-error-print.h>
 #include <dali/public-api/images/pixel.h>
 #include <cstring>
 
@@ -117,6 +118,7 @@ bool LoadAstcHeader(FILE* const filePointer, unsigned int& width, unsigned int&
   const unsigned int readLength = sizeof(AstcFileHeader);
   if(DALI_UNLIKELY(fread(&fileHeader, 1, readLength, filePointer) != readLength))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -193,6 +195,7 @@ bool LoadBitmapFromAstc(const Dali::ImageLoader::Input& input, Dali::Devel::Pixe
   if(DALI_UNLIKELY(fseek(filePointer, 0L, SEEK_END)))
   {
     DALI_LOG_ERROR("Could not seek through file.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -200,12 +203,14 @@ bool LoadBitmapFromAstc(const Dali::ImageLoader::Input& input, Dali::Devel::Pixe
   if(DALI_UNLIKELY(fileSize == -1L))
   {
     DALI_LOG_ERROR("Could not determine ASTC file size.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
   if(DALI_UNLIKELY(fseek(filePointer, sizeof(AstcFileHeader), SEEK_SET)))
   {
     DALI_LOG_ERROR("Could not seek through file.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -239,6 +244,7 @@ bool LoadBitmapFromAstc(const Dali::ImageLoader::Input& input, Dali::Devel::Pixe
   if(DALI_UNLIKELY(bytesRead != imageByteCount))
   {
     DALI_LOG_ERROR("Read of image pixel data failed. (required image bytes : %zu, actual read from file : %zu\n", imageByteCount, bytesRead);
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
index a01d0761754d31bd0fa36385b847e376de46f120..13008b867da020ced5c62778c4e378191d741b40 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
 
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
+#include <dali/internal/system/common/system-error-print.h>
 #include <dali/public-api/common/vector-wrapper.h>
 
 namespace Dali
@@ -84,6 +85,7 @@ inline bool ReadHeader(FILE* fp, T& header)
   // Load the information directly into our structure
   if(DALI_UNLIKELY(fread(&header, 1, readLength, fp) != readLength))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -144,6 +146,7 @@ bool DecodeRGB24V5(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB24V5 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -161,6 +164,7 @@ bool DecodeRGB24V5(FILE*          fp,
     if(DALI_UNLIKELY(fread(pixelsPtr, 1, rowStride, fp) != rowStride))
     {
       DALI_LOG_ERROR("Error reading the BMP image\n");
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
     for(std::uint32_t i = 0; i < rowStride; i += 3)
@@ -176,6 +180,7 @@ bool DecodeRGB24V5(FILE*          fp,
       if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(padding)), SEEK_CUR)))
       {
         DALI_LOG_ERROR("Error moving past BMP_RGB24V5 padding\n");
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
   }
@@ -211,6 +216,7 @@ bool DecodeBF32V4(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_BITFIELDS32V4 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -228,6 +234,7 @@ bool DecodeBF32V4(FILE*          fp,
     if(DALI_UNLIKELY(fread(pixelsPtr, 1, rowStride, fp) != rowStride))
     {
       DALI_LOG_ERROR("Error reading the BMP image\n");
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
     for(std::uint32_t i = 0; i < rowStride; i += 4)
@@ -242,6 +249,7 @@ bool DecodeBF32V4(FILE*          fp,
       if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(padding)), SEEK_CUR)))
       {
         DALI_LOG_ERROR("Error moving past BMP_BITFIELDS32V4 padding\n");
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
   }
@@ -277,6 +285,7 @@ bool DecodeBF32(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_BITFIELDS32 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -297,6 +306,7 @@ bool DecodeBF32(FILE*          fp,
     if(DALI_UNLIKELY(fread(pixelsPtr, 1, rowStride, fp) != rowStride))
     {
       DALI_LOG_ERROR("Error reading the BMP image\n");
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
     for(std::uint32_t i = 0; i < rowStride; i += 4)
@@ -312,6 +322,7 @@ bool DecodeBF32(FILE*          fp,
       if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(padding)), SEEK_CUR)))
       {
         DALI_LOG_ERROR("Error moving past BMP_BITFIELDS32 padding\n");
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
   }
@@ -343,6 +354,7 @@ bool DecodeBF565(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking RGB565 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -364,6 +376,7 @@ bool DecodeBF565(FILE*          fp,
     }
     if(DALI_UNLIKELY(fread(pixelsPtr, 1, rowStride, fp) != rowStride))
     {
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
   }
@@ -397,6 +410,7 @@ bool DecodeBF555(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_BITFIELDS555 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -412,6 +426,7 @@ bool DecodeBF555(FILE*          fp,
     rawPtr = &raw[0] + (j * rawStride);
     if(DALI_UNLIKELY(fread(rawPtr, 1, rawStride, fp) != rawStride))
     {
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
   }
@@ -466,6 +481,7 @@ bool DecodeRGB555(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB555 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -480,6 +496,7 @@ bool DecodeRGB555(FILE*          fp,
     rawPtr = &raw[0] + (j * rawStride);
     if(DALI_UNLIKELY(fread(rawPtr, 1, rawStride, fp) != rawStride))
     {
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
   }
@@ -532,6 +549,7 @@ bool DecodeRGB1(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB1 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -543,6 +561,7 @@ bool DecodeRGB1(FILE*          fp,
 
   if(DALI_UNLIKELY(fread(colorTable, 1, 8, fp) != 8))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -550,6 +569,7 @@ bool DecodeRGB1(FILE*          fp,
   {
     if(DALI_UNLIKELY(fread(&cmd, 1, 1, fp) != 1))
     {
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
 
@@ -624,6 +644,7 @@ bool DecodeRGB4(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB4 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -635,6 +656,7 @@ bool DecodeRGB4(FILE*          fp,
 
   if(DALI_UNLIKELY(fread(colorTable, 1, 64, fp) != 64))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -642,6 +664,7 @@ bool DecodeRGB4(FILE*          fp,
   {
     if(DALI_UNLIKELY(fread(&cmd, 1, 1, fp) != 1))
     {
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
 
@@ -700,6 +723,7 @@ bool DecodeRGB8(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB8 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -710,10 +734,12 @@ bool DecodeRGB8(FILE*          fp,
 
   if(DALI_UNLIKELY(fread(&colorTable[0], 1, 1024, fp) != 1024))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
   if(DALI_UNLIKELY(fread(&colorIndex[0], 1, width * height, fp) != width * height))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
   std::uint8_t ctIndex = 0;
@@ -782,11 +808,13 @@ bool DecodeRLE4(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_RLE4 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
   if(DALI_UNLIKELY(fread(colorTable, 1, 64, fp) != 64))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -798,6 +826,7 @@ bool DecodeRLE4(FILE*          fp,
     }
     if(DALI_UNLIKELY(fread(cmd, 1, cmdStride, fp) != cmdStride))
     {
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
     if(cmd[0] == 0) // ESCAPE
@@ -815,6 +844,7 @@ bool DecodeRLE4(FILE*          fp,
           if(DALI_UNLIKELY(fread(cmd, 1, cmdStride, fp) != cmdStride))
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
+            DALI_PRINT_SYSTEM_ERROR_LOG();
             return false;
           }
           dx = cmd[0] & (0xFF);
@@ -834,6 +864,7 @@ bool DecodeRLE4(FILE*          fp,
           if(DALI_UNLIKELY(fread(&run[0], 1, bytesize, fp) != bytesize))
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
+            DALI_PRINT_SYSTEM_ERROR_LOG();
             return false;
           }
           if((x & 1) == 0)
@@ -944,11 +975,13 @@ bool DecodeRLE8(FILE*          fp,
   if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(offset)), SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking BMP_RLE8 data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
   if(DALI_UNLIKELY(fread(&colorTable[0], 1, 1024, fp) != 1024))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -966,6 +999,7 @@ bool DecodeRLE8(FILE*          fp,
     }
     if(DALI_UNLIKELY(fread(cmd, 1, cmdStride, fp) != cmdStride))
     {
+      DALI_PRINT_SYSTEM_ERROR_LOG();
       return false;
     }
 
@@ -984,6 +1018,7 @@ bool DecodeRLE8(FILE*          fp,
           if(DALI_UNLIKELY(fread(cmd, 1, cmdStride, fp) != cmdStride))
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
+            DALI_PRINT_SYSTEM_ERROR_LOG();
             return false;
           }
           dx = cmd[0] & (0xFF);
@@ -1001,6 +1036,7 @@ bool DecodeRLE8(FILE*          fp,
           if(DALI_UNLIKELY(fread(&run[0], 1, length, fp) != length))
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
+            DALI_PRINT_SYSTEM_ERROR_LOG();
             return false;
           }
 
@@ -1146,12 +1182,14 @@ bool LoadBitmapFromBmp(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
       {
         if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(14 + infoHeader.infoHeaderSize + 1)), SEEK_SET)))
         {
+          DALI_PRINT_SYSTEM_ERROR_LOG();
           return false;
         }
 
         char mask;
         if(DALI_UNLIKELY(fread(&mask, 1, 1, fp) != 1))
         {
+          DALI_PRINT_SYSTEM_ERROR_LOG();
           return false;
         }
 
@@ -1346,6 +1384,7 @@ bool LoadBitmapFromBmp(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
           if(DALI_UNLIKELY(fread(pixelsIterator, 1, rowStride, fp) != rowStride))
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
+            DALI_PRINT_SYSTEM_ERROR_LOG();
             break;
           }
 
@@ -1381,6 +1420,7 @@ bool LoadBitmapFromBmp(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
             if(DALI_UNLIKELY(fseek(fp, static_cast<long>(static_cast<size_t>(padding)), SEEK_CUR))) // move past the padding.
             {
               DALI_LOG_ERROR("Error moving past BMP padding\n");
+              DALI_PRINT_SYSTEM_ERROR_LOG();
             }
           }
         }
index c8e9091887d8ae18e0e32509ad4849a97e7f4e45..5945ce1a06e479ad19ccbcf2e13f829324b297b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
 
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
+#include <dali/internal/system/common/system-error-print.h>
 #include <memory>
 
 // We need to check if giflib has the new open and close API (including error parameter).
@@ -85,8 +86,15 @@ const unsigned int INTERLACE_PAIR_TABLE_SIZE(sizeof(INTERLACE_PAIR_TABLE) / size
 /// Function used by Gif_Lib to read from the image file.
 int ReadDataFromGif(GifFileType* gifInfo, GifByteType* data, int length)
 {
-  FILE* fp = reinterpret_cast<FILE*>(gifInfo->UserData);
-  return fread(data, sizeof(GifByteType), length, fp);
+  FILE*     fp           = reinterpret_cast<FILE*>(gifInfo->UserData);
+  const int actualLength = fread(data, sizeof(GifByteType), length, fp);
+  if(DALI_UNLIKELY(actualLength != length))
+  {
+    DALI_LOG_ERROR("Error read bytes (required : %d, actual read : %d)\n", length, actualLength);
+    DALI_PRINT_SYSTEM_ERROR_LOG();
+  }
+
+  return actualLength;
 }
 
 /// Loads the GIF Header.
index b7d79b3e9f75b98d1a482cc8f30458d6594ba710..401dac6edf4344bb8b8b7e636477bbca463ab260 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -57,6 +57,7 @@
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
+#include <dali/internal/system/common/system-error-print.h>
 
 namespace Dali
 {
@@ -175,6 +176,7 @@ bool LoadIcoHeaderHelper(FILE*                        fp,
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END)))
   {
     DALI_LOG_ERROR("Error seeking ICO data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -189,12 +191,14 @@ bool LoadIcoHeaderHelper(FILE*                        fp,
   if(DALI_UNLIKELY(0u == fsize))
   {
     DALI_LOG_ERROR("Error ICO data size is zero!\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking ICO data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -206,7 +210,8 @@ bool LoadIcoHeaderHelper(FILE*                        fp,
   map.ResizeUninitialized(fsize);
   if(DALI_UNLIKELY(fread(&map[0], 1, fsize, fp) != fsize))
   {
-    DALI_LOG_WARNING("image file read opeation error!\n");
+    DALI_LOG_ERROR("image file read opeation error!\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -496,7 +501,7 @@ bool HandleBitsPerPixel(
 
     default:
     {
-      DALI_LOG_WARNING("Image file contains unsupported bits-per-pixel %d\n", bitcount);
+      DALI_LOG_ERROR("Image file contains unsupported bits-per-pixel %d\n", bitcount);
       return false;
     }
   }
@@ -652,7 +657,7 @@ bool LoadBitmapFromIco(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
   }
   if(diff_size)
   {
-    DALI_LOG_WARNING("Broken ICO file!\n");
+    DALI_LOG_ERROR("Broken ICO file!\n");
   }
 
   if(DALI_UNLIKELY(!read_ushort(inputBufferPtr, fsize, &position, &word)))
index 43b0a3364ca3787418f9ff0ffbb85d6adaed6396..1fb1040e4fa2371da15bfe341f7e66fd06fb2783 100644 (file)
@@ -41,6 +41,7 @@
 #include <dali/internal/imaging/common/image-operations.h>
 #include <dali/internal/imaging/common/pixel-buffer-impl.h>
 #include <dali/internal/legacy/tizen/platform-capabilities.h>
+#include <dali/internal/system/common/system-error-print.h>
 
 namespace
 {
@@ -106,7 +107,7 @@ static bool IsSubsamplingFormatEnabled(int chrominanceSubsampling)
 
   if(DALI_UNLIKELY(chrominanceSubsampling >= TJ_NUMSAMP))
   {
-    DALI_LOG_WARNING("WARNING! Input subsampling value [%d] is bigger than turbojpeg library support [%d]\n", chrominanceSubsampling, TJ_NUMSAMP);
+    DALI_LOG_ERROR("WARNING! Input subsampling value [%d] is bigger than turbojpeg library support [%d]\n", chrominanceSubsampling, TJ_NUMSAMP);
   }
 
   return chrominanceSubsampling < TJ_NUMSAMP ? gSubsamplingFormatTable[chrominanceSubsampling] : false;
@@ -162,7 +163,7 @@ bool IsJpegDecodingFailed()
   }
   else
   {
-    DALI_LOG_WARNING("%s\n", errorString.c_str());
+    DALI_LOG_DEBUG_INFO("%s\n", errorString.c_str());
     return false;
   }
 }
@@ -670,6 +671,7 @@ bool LoadJpegFile(const Dali::ImageLoader::Input& input, Vector<uint8_t>& jpegBu
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END)))
   {
     DALI_LOG_ERROR("Error seeking to end of file\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -683,12 +685,14 @@ bool LoadJpegFile(const Dali::ImageLoader::Input& input, Vector<uint8_t>& jpegBu
   if(DALI_UNLIKELY(0u == jpegBufferSize))
   {
     DALI_LOG_ERROR("Jpeg buffer size error\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -707,12 +711,14 @@ bool LoadJpegFile(const Dali::ImageLoader::Input& input, Vector<uint8_t>& jpegBu
   if(DALI_UNLIKELY(fread(jpegBufferPtr, 1, jpegBufferSize, fp) != jpegBufferSize))
   {
     DALI_LOG_ERROR("Error on image file read.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -1177,7 +1183,7 @@ JpegTransform ConvertExifOrientation(ExifData* exifData)
       default:
       {
         // Try to keep loading the file, but let app developer know there was something fishy:
-        DALI_LOG_WARNING("Incorrect/Unknown Orientation setting found in EXIF header of JPEG image (%x). Orientation setting will be ignored.\n", entry);
+        DALI_LOG_DEBUG_INFO("Incorrect/Unknown Orientation setting found in EXIF header of JPEG image (%x). Orientation setting will be ignored.\n", entry);
         break;
       }
     }
@@ -1207,7 +1213,7 @@ bool TransformSize(int requiredWidth, int requiredHeight, FittingMode::Type fitt
   tjscalingfactor* factors    = tjGetScalingFactors(&numFactors);
   if(DALI_UNLIKELY(factors == NULL))
   {
-    DALI_LOG_WARNING("TurboJpeg tjGetScalingFactors error!\n");
+    DALI_LOG_DEBUG_INFO("TurboJpeg tjGetScalingFactors error!\n");
     success = false;
   }
   else
@@ -1319,6 +1325,7 @@ ExifHandle LoadExifData(FILE* fp)
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
   }
   else
   {
@@ -1330,6 +1337,7 @@ ExifHandle LoadExifData(FILE* fp)
       int size = fread(dataBuffer, 1, sizeof(dataBuffer), fp);
       if(size <= 0)
       {
+        DALI_PRINT_SYSTEM_ERROR_LOG();
         break;
       }
       if(!exif_loader_write(exifLoader.get(), dataBuffer, size))
index c876d55731cad09a19d208c8e97b171c87853a61..852096d32965f33131a3371edd76cd836a4a1535 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/internal/imaging/common/loader-ktx.h>
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
-#include <dali/internal/imaging/common/pixel-buffer-impl.h>
 #include <cstring>
 
+// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/internal/imaging/common/pixel-buffer-impl.h>
+#include <dali/internal/system/common/system-error-print.h>
+
 namespace Dali
 {
 namespace TizenPlatform
@@ -189,6 +192,7 @@ inline bool ReadHeader(FILE* filePointer, KtxFileHeader& header)
   // Load the information directly into our structure
   if(DALI_UNLIKELY(fread(&header, 1, readLength, filePointer) != readLength))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -506,7 +510,7 @@ bool LoadKtxHeader(FILE* const fp, unsigned int& width, unsigned int& height, Kt
   // Warn if there is space wasted in the file:
   if(fileHeader.bytesOfKeyValueData > 0U)
   {
-    DALI_LOG_WARNING("Loading of KTX file with key/value header data requested. This should be stripped in application asset/resource build.\n");
+    DALI_LOG_DEBUG_INFO("Loading of KTX file with key/value header data requested. This should be stripped in application asset/resource build.\n");
   }
 
   return headerIsValid;
@@ -551,6 +555,7 @@ bool LoadBitmapFromKtx(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
   if(DALI_UNLIKELY(fseek(fp, (long int)(imageSizeOffset), SEEK_SET)))
   {
     DALI_LOG_ERROR("Seek past key/vals in KTX compressed bitmap file failed.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -559,6 +564,7 @@ bool LoadBitmapFromKtx(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
   if(DALI_UNLIKELY(fread(&imageByteCount, 1, 4, fp) != 4))
   {
     DALI_LOG_ERROR("Read of image size failed.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
   // Sanity-check the image size:
@@ -601,6 +607,7 @@ bool LoadBitmapFromKtx(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
   if(DALI_UNLIKELY(bytesRead != imageByteCount))
   {
     DALI_LOG_ERROR("Read of image pixel data failed.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
index 71b140460fe0ba2c40001141547d91cc5b1076b7..cee3908d8f3a1c04b5381d9c6e0c5b331fa2feb2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/internal/imaging/common/pixel-buffer-impl.h> ///< for Internal::Adaptor::PixelBuffer::New()
+#include <dali/internal/system/common/system-error-print.h>
 
 namespace Dali
 {
@@ -132,6 +133,7 @@ bool LoadPkmHeader(FILE* const filePointer, unsigned int& width, unsigned int& h
   const unsigned int readLength = sizeof(PkmFileHeader);
   if(DALI_UNLIKELY(fread(&fileHeader, 1, readLength, filePointer) != readLength))
   {
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -206,6 +208,7 @@ bool LoadBitmapFromPkm(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
   if(DALI_UNLIKELY(fseek(filePointer, 0L, SEEK_END)))
   {
     DALI_LOG_ERROR("Could not seek through file.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -213,12 +216,14 @@ bool LoadBitmapFromPkm(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
   if(DALI_UNLIKELY(fileSize == -1L))
   {
     DALI_LOG_ERROR("Could not determine PKM file size.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
   if(DALI_UNLIKELY(fseek(filePointer, sizeof(PkmFileHeader), SEEK_SET)))
   {
     DALI_LOG_ERROR("Could not seek through file.\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
@@ -252,6 +257,7 @@ bool LoadBitmapFromPkm(const Dali::ImageLoader::Input& input, Dali::Devel::Pixel
   if(DALI_UNLIKELY(bytesRead != imageByteCount))
   {
     DALI_LOG_ERROR("Read of image pixel data failed. (required image bytes : %zu, actual read from file : %zu\n", imageByteCount, bytesRead);
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
index fa855db1b5865f14aff7b0866b6b5e2ac5c25576..7bda02869866498d6fc15ed33afbc1cb477e1f84 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
 #include <dali/internal/legacy/tizen/platform-capabilities.h>
+#include <dali/internal/system/common/system-error-print.h>
 
 namespace Dali
 {
@@ -62,6 +63,7 @@ bool LoadPngHeader(FILE* fp, unsigned int& width, unsigned int& height, png_stru
   if(DALI_UNLIKELY(size != 8))
   {
     DALI_LOG_ERROR("fread failed\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
index 1f8f0c3547aa31816d1f6df91c263f7e3a9e5d08..57b3a41c8821b2eeb1c5c077b1cf9af2de8bf507 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
+#include <dali/internal/system/common/system-error-print.h>
 
 namespace Dali
 {
@@ -130,6 +131,7 @@ bool LoadWbmpHeader(FILE* const fp, unsigned int& width, unsigned int& height, u
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END)))
   {
     DALI_LOG_ERROR("Error seeking WBMP data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
   long positionIndicator = ftell(fp);
@@ -143,12 +145,14 @@ bool LoadWbmpHeader(FILE* const fp, unsigned int& width, unsigned int& height, u
   if(DALI_UNLIKELY(0u == fsize))
   {
     DALI_LOG_ERROR("Error: filesize is 0!\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
   if(DALI_UNLIKELY(fseek(fp, 0, SEEK_SET)))
   {
     DALI_LOG_ERROR("Error seeking WBMP data\n");
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
   if(DALI_UNLIKELY(fsize <= 4))
@@ -177,7 +181,8 @@ bool LoadWbmpHeader(FILE* const fp, unsigned int& width, unsigned int& height, u
   map.ResizeUninitialized(fsize);
   if(DALI_UNLIKELY(fread(&map[0], 1, readDataSize, fp) != readDataSize))
   {
-    DALI_LOG_WARNING("image file read opeation error! fileSize : %u, readDataSize : %u\n", fsize, readDataSize);
+    DALI_LOG_ERROR("image file read opeation error! fileSize : %u, readDataSize : %u\n", fsize, readDataSize);
+    DALI_PRINT_SYSTEM_ERROR_LOG();
     return false;
   }
 
index fe2a66f405cc1bd313f903d6289de56d3d54addd..799cc2f0d2bf8f28ec62a22758ff9506223796ec 100644 (file)
@@ -43,6 +43,7 @@
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/internal/imaging/common/pixel-buffer-impl.h>
+#include <dali/internal/system/common/system-error-print.h>
 
 typedef uint8_t WebPByteType;
 
@@ -209,9 +210,22 @@ public:
         if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END) <= -1))
         {
           DALI_LOG_ERROR("Error seeking within file\n");
+          DALI_PRINT_SYSTEM_ERROR_LOG();
+          return false;
+        }
+        long positionIndicator = ftell(fp);
+
+        if(positionIndicator > -1L)
+        {
+          mBufferSize = static_cast<uint32_t>(positionIndicator);
+        }
+
+        if(DALI_UNLIKELY(mBufferSize == 0u))
+        {
+          DALI_LOG_ERROR("Error: filesize is 0!\n");
+          DALI_PRINT_SYSTEM_ERROR_LOG();
           return false;
         }
-        mBufferSize = ftell(fp);
       }
 
       if(DALI_LIKELY(!fseek(fp, 0, SEEK_SET)))
@@ -225,6 +239,7 @@ public:
         if(DALI_UNLIKELY(fread(mBuffer, sizeof(WebPByteType), mBufferSize, fp) != mBufferSize))
         {
           DALI_LOG_ERROR("Error read file\n");
+          DALI_PRINT_SYSTEM_ERROR_LOG();
           return false;
         }
         return true;
@@ -232,6 +247,7 @@ public:
       else
       {
         DALI_LOG_ERROR("Error seeking within file\n");
+        DALI_PRINT_SYSTEM_ERROR_LOG();
       }
     }
     else
index dea39bfb3e490606d610dfe083f78614169a8d54..e0e0f3b1a70a32e7a60353455338794867853e0b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -152,7 +152,7 @@ void NativeImageSourceTizen::Initialize()
     }
     default:
     {
-      DALI_LOG_WARNING("Wrong color depth.\n");
+      DALI_LOG_ERROR("Wrong color depth.\n");
       return;
     }
   }
@@ -328,7 +328,7 @@ bool NativeImageSourceTizen::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& w
     return true;
   }
 
-  DALI_LOG_WARNING("TBM surface does not exist.\n");
+  DALI_LOG_ERROR("TBM surface does not exist.\n");
 
   width  = 0;
   height = 0;
@@ -376,7 +376,7 @@ bool NativeImageSourceTizen::SetPixels(uint8_t* pixbuf, const Pixel::Format& pix
           {
             size_t sOffset  = c * inputBufferLinePixelSize;
             size_t dOffset  = c * 3;
-            size_t offset          = dOffset + r * stride;
+            size_t offset   = dOffset + r * stride;
             ptr[offset + 2] = *(bufptr + sOffset);
             ptr[offset + 1] = *(bufptr + sOffset + 1);
             ptr[offset]     = *(bufptr + sOffset + 2);
@@ -395,7 +395,7 @@ bool NativeImageSourceTizen::SetPixels(uint8_t* pixbuf, const Pixel::Format& pix
           {
             size_t sOffset  = c * inputBufferLinePixelSize;
             size_t dOffset  = c * 4;
-            size_t offset          = dOffset + r * stride;
+            size_t offset   = dOffset + r * stride;
             ptr[offset + 3] = *(bufptr + sOffset);
             ptr[offset + 2] = *(bufptr + sOffset + 1);
             ptr[offset + 1] = *(bufptr + sOffset + 2);
@@ -415,7 +415,7 @@ bool NativeImageSourceTizen::SetPixels(uint8_t* pixbuf, const Pixel::Format& pix
           {
             size_t sOffset  = c * inputBufferLinePixelSize;
             size_t dOffset  = c * 4;
-            size_t offset          = dOffset + r * stride;
+            size_t offset   = dOffset + r * stride;
             ptr[offset + 2] = *(bufptr + sOffset);
             ptr[offset + 1] = *(bufptr + sOffset + 1);
             ptr[offset]     = *(bufptr + sOffset + 2);
@@ -441,7 +441,7 @@ bool NativeImageSourceTizen::SetPixels(uint8_t* pixbuf, const Pixel::Format& pix
     return true;
   }
 
-  DALI_LOG_WARNING("TBM surface does not exist.\n");
+  DALI_LOG_ERROR("TBM surface does not exist.\n");
 
   return false;
 }
index e5fe55ca87bccc82b079ac925b55d56b4c51c3f7..c8761c40634bb09bc71b299ada66e29b1fafd817 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -175,7 +175,7 @@ void NativeImageSourceQueueTizen::Initialize(Dali::NativeImageSourceQueue::Color
       }
       default:
       {
-        DALI_LOG_WARNING("Wrong color format.\n");
+        DALI_LOG_ERROR("Wrong color format.\n");
         return;
       }
     }
index efbeeb592f8d7b2004582c2f593e5bb2eb0f9058..390d94d148f5ffc4b01ae4972dbf01787b04fe9a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -246,7 +246,7 @@ bool NativeImageSourceX::GetPixels(std::vector<uint8_t>& pixbuf, uint32_t& width
       }
       default:
       {
-        DALI_LOG_WARNING("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
+        DALI_LOG_ERROR("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
       }
     }
   }
index 10af2c257298530623d39df85d037f7ba1acffe7..92c5eb6466a8cb6cc34d199c69456cf6a8239aa7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -230,7 +230,7 @@ bool DownloadRemoteFileIntoMemory(const std::string&     url,
 {
   if(url.empty())
   {
-    DALI_LOG_WARNING("empty url requested \n");
+    DALI_LOG_ERROR("empty url requested \n");
     return false;
   }
 
index 32eedc6c9946719aad4c19e0f8ff62a44993b88b..08e409d33192c85b86b928588a9f7e0f4bb24aec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -250,7 +250,7 @@ bool NativeImageSourceX::GetPixels(std::vector<unsigned char>& pixbuf, unsigned&
       }
       default:
       {
-        DALI_LOG_WARNING("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
+        DALI_LOG_ERROR("Pixmap has unsupported bit-depth for getting pixels: %u\n", pXImage->depth);
       }
     }
   }
index ec4d3a9e2da49def500c315a06973ddaf05c4d2d..7a505faf65aa739a0230f831135dba2b185a756b 100644 (file)
@@ -398,12 +398,12 @@ void InputMethodContextEcoreWl::CreateContext()
     }
     else
     {
-      DALI_LOG_WARNING("InputMethodContext Unable to get IMFContext\n");
+      DALI_LOG_ERROR("InputMethodContext Unable to get IMFContext (contextId:%p)\n", contextId);
     }
   }
   else
   {
-    DALI_LOG_WARNING("InputMethodContext Unable to get IMFContext\n");
+    DALI_LOG_ERROR("InputMethodContext Unable to get IMFContext (contextId:(null))\n");
   }
 }
 
@@ -893,7 +893,7 @@ Rect<int> InputMethodContextEcoreWl::GetInputMethodArea()
   }
   else
   {
-    DALI_LOG_WARNING("VKB Unable to get IMFContext so GetSize unavailable\n");
+    DALI_LOG_ERROR("VKB Unable to get IMFContext so GetSize unavailable\n");
     // return 0 as real size unknown.
   }
 
@@ -908,7 +908,7 @@ void InputMethodContextEcoreWl::ApplyOptions(const InputMethodOptions& options)
 
   if(mIMFContext == NULL)
   {
-    DALI_LOG_WARNING("VKB Unable to excute ApplyOptions with Null ImfContext\n");
+    DALI_LOG_ERROR("VKB Unable to excute ApplyOptions with Null ImfContext\n");
     return;
   }
 
index d530ca2eda37d30b54883584f4fe067b2958b2bb..b7b104b456273025f56cde6fa7efd24b4b9f44b8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -585,7 +585,7 @@ Rect<int> InputMethodContextX::GetInputMethodArea()
   }
   else
   {
-    DALI_LOG_WARNING("VKB Unable to get InputMethodContext Context so GetSize unavailable\n");
+    DALI_LOG_ERROR("VKB Unable to get InputMethodContext Context so GetSize unavailable\n");
   }
 
   return Rect<int>(xPos, yPos, width, height);
@@ -599,7 +599,7 @@ void InputMethodContextX::ApplyOptions(const InputMethodOptions& options)
 
   if(mIMFContext == NULL)
   {
-    DALI_LOG_WARNING("VKB Unable to excute ApplyOptions with Null ImfContext\n");
+    DALI_LOG_ERROR("VKB Unable to excute ApplyOptions with Null ImfContext\n");
     return;
   }
 
index 9f933cbfbb43d7194259acf3cd50460677665296..3d3c54460c81d8300fe575094be07a165a8fff02 100644 (file)
@@ -123,7 +123,7 @@ Integration::BitmapPtr TizenPlatformAbstraction::DecodeBuffer(const Integration:
     if(!result || !bitmap)
     {
       bitmap.Reset();
-      DALI_LOG_WARNING("Unable to decode bitmap supplied as in-memory blob.\n");
+      DALI_LOG_ERROR("Unable to decode bitmap supplied as in-memory blob.\n");
     }
     else
     {
index fca9d127c4edd81a7d8dccde400b67755357a34a..3df5f3e1b00b9a3f4648460bd90bc174379e13ec 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_INTERNAL_PLATFORM_FILECLOSER_H
 #define DALI_INTERNAL_PLATFORM_FILECLOSER_H
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -107,7 +107,7 @@ protected: // prevent this class being directly instantiated
 
     if(mFile == 0)
     {
-      DALI_LOG_WARNING("File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%s\".\n", static_cast<void*>(buffer), static_cast<unsigned>(dataSize), mode);
+      DALI_LOG_ERROR("File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%s\".\n", static_cast<void*>(buffer), static_cast<unsigned>(dataSize), mode);
     }
   }
 
@@ -122,7 +122,7 @@ protected: // prevent this class being directly instantiated
 
       if(closeFailed)
       {
-        DALI_LOG_WARNING("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
+        DALI_LOG_ERROR("File close failed for FILE: \"%p\".\n", static_cast<void*>(mFile));
       }
       mFile = 0;
     }
index 38412cce1f55907a2e1398aa0ce16b73a08dab52..821a10ff29c3040b63a147cbabf0b6a49d542c59 100644 (file)
@@ -88,7 +88,7 @@ void TriggerEvent::Trigger()
   }
   else
   {
-    DALI_LOG_WARNING("Attempting to write to an invalid file descriptor\n");
+    DALI_LOG_ERROR("Attempting to write to an invalid file descriptor\n");
   }
 }
 
@@ -107,7 +107,7 @@ void TriggerEvent::Triggered(FileDescriptorMonitor::EventType eventBitMask, int
   size = read(mFileDescriptor, &receivedData, sizeof(uint64_t));
   if(size != sizeof(uint64_t))
   {
-    DALI_LOG_WARNING("Unable to read to UpdateEvent File descriptor\n");
+    DALI_LOG_ERROR("Unable to read to UpdateEvent File descriptor\n");
     DALI_PRINT_SYSTEM_ERROR_LOG();
   }
 
index acd90da6b8dc971dc5db74392b5a69114e5f426b..9556d967dcf6d9a58414d8b41d1becf0fa62f97e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ namespace Dali::Internal::Adaptor
 FileDescriptorMonitorMac::FileDescriptorMonitorMac(int fileDescriptor, CallbackBase* callback, int eventBitmask)
 : FileDescriptorMonitor(fileDescriptor, callback, eventBitmask)
 {
-  DALI_LOG_WARNING("Implementation missing for macOS");
+  DALI_LOG_WARNING_NOFN("Implementation missing for macOS");
 }
 
 FileDescriptorMonitorMac::~FileDescriptorMonitorMac()
index eee61f2729224c1b218f15822743ecd1aa83823f..d9b1c36668721890ae7e493a5f896da95be2f195 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ namespace Adaptor
 FileDescriptorMonitorWin::FileDescriptorMonitorWin(int fileDescriptor, CallbackBase* callback, int eventBitmask)
 : FileDescriptorMonitor(fileDescriptor, callback, eventBitmask)
 {
-  DALI_LOG_WARNING("Implementation missing for MS Windows");
+  DALI_LOG_WARNING_NOFN("Implementation missing for MS Windows");
 }
 
 FileDescriptorMonitorWin::~FileDescriptorMonitorWin()
index 314621d7868a50c6811a2e403e34e1b3a55e044d..f1c9efaab5f26e621259f9b11d1fe8d5335ed0a3 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -71,7 +71,7 @@ void TriggerEvent::Trigger()
   }\r
   else\r
   {\r
-    DALI_LOG_WARNING("Attempting to write to an invalid file descriptor\n");\r
+    DALI_LOG_ERROR("Attempting to write to an invalid file descriptor\n");\r
   }\r
 }\r
 \r
index 4df79648306a5f563941d8d4bbbbc310cbca905b..b94c67d63f4a26778bfe4f8c0ae7b3dd46bf19ed 100644 (file)
@@ -207,7 +207,7 @@ void WrapToCircularPath(cairo_t* cr, cairo_t* circularCr, const Dali::TextAbstra
       }
       default:
       {
-        DALI_LOG_WARNING("Type of path not handled.\n");
+        DALI_LOG_ERROR("Type of path not handled.\n");
         // Nothing else to do.
         break;
       }
index a094f13aef210e2c52f7578700cab2fa369b5e20..c0dc05e3576e993b3b4eaffdab39a3d78a5343d6 100644 (file)
@@ -98,10 +98,10 @@ DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_FONT_PERFORMANCE_MARKER, false);
 /**
  * Conversion from Fractional26.6 to float
  */
-const float FROM_266        = 1.0f / 64.0f;
-const float POINTS_PER_INCH = 72.f;
+const float    FROM_266           = 1.0f / 64.0f;
+const float    POINTS_PER_INCH    = 72.f;
 const uint32_t FONT_AXIS_NAME_LEN = 4;
-const uint32_t FROM_16DOT16 = (1 << 16);
+const uint32_t FROM_16DOT16       = (1 << 16);
 
 const uint32_t ELLIPSIS_CHARACTER     = 0x2026;
 const uint32_t CUSTOM_FONTS_MAX_COUNT = 10u;
@@ -155,12 +155,12 @@ bool IsFitIntoAtlas(FT_Face& ftFace, int& error, const unsigned int& horizontalD
  */
 void ConvertTagToString(FT_ULong tag, char buffer[5])
 {
-    // the tag is same format as used in Harfbuzz.
-    buffer[0] = (tag >> 24) & 0xFF;
-    buffer[1] = (tag >> 16) & 0xFF;
-    buffer[2] = (tag >> 8) & 0xFF;
-    buffer[3] = tag & 0xFF;
-    buffer[4] = 0;
+  // the tag is same format as used in Harfbuzz.
+  buffer[0] = (tag >> 24) & 0xFF;
+  buffer[1] = (tag >> 16) & 0xFF;
+  buffer[2] = (tag >> 8) & 0xFF;
+  buffer[3] = tag & 0xFF;
+  buffer[4] = 0;
 }
 
 /**
@@ -474,8 +474,8 @@ void FontClient::Plugin::GetDescription(FontId           fontId,
       case FontDescription::FACE_FONT:
       {
         for(auto it = mCacheHandler->mFontDescriptionSizeCache.Begin();
-        it != mCacheHandler->mFontDescriptionSizeCache.End();
-        it++)
+            it != mCacheHandler->mFontDescriptionSizeCache.End();
+            it++)
         {
           const auto& item = mCacheHandler->mFontDescriptionSizeCache.GetElement(it);
           if(item == fontIdCacheItem.index)
@@ -491,8 +491,8 @@ void FontClient::Plugin::GetDescription(FontId           fontId,
       }
       case FontDescription::BITMAP_FONT:
       {
-        fontDescription.type   = FontDescription::BITMAP_FONT;
-        auto it = mCacheHandler->mBitmapFontCache.find(fontIdCacheItem.index);
+        fontDescription.type = FontDescription::BITMAP_FONT;
+        auto it              = mCacheHandler->mBitmapFontCache.find(fontIdCacheItem.index);
         if(it != mCacheHandler->mBitmapFontCache.end())
         {
           fontDescription.family = it->second.font.name;
@@ -612,9 +612,9 @@ FontId FontClient::Plugin::FindFontForCharacter(const FontList&         fontList
         {
           if(mCacheHandler->IsFontIdCacheItemExist(fontId - 1u))
           {
-            auto index = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
-            const FontFaceCacheItem& item = mCacheHandler->FindFontFaceCacheItem(index);
-            foundColor = item.mHasColorTables;
+            auto                     index = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
+            const FontFaceCacheItem& item  = mCacheHandler->FindFontFaceCacheItem(index);
+            foundColor                     = item.mHasColorTables;
           }
 
           DALI_LOG_INFO(gFontClientLogFilter, Debug::Verbose, "  foundColor : %s\n", (foundColor ? "true" : "false"));
@@ -796,8 +796,7 @@ FontId FontClient::Plugin::GetFontId(const FontDescription& fontDescription,
   FontCacheIndex fontCacheIndex = 0u;
   // Check if exists a pair 'fontDescriptionId, requestedPointSize' in the cache.
 
-  if(!mCacheHandler->FindFont(fontDescriptionId, requestedPointSize, fontCacheIndex, variationsMapPtr)
-  || !mCacheHandler->IsFontFaceCacheItemExist(fontCacheIndex))
+  if(!mCacheHandler->FindFont(fontDescriptionId, requestedPointSize, fontCacheIndex, variationsMapPtr) || !mCacheHandler->IsFontFaceCacheItemExist(fontCacheIndex))
   {
     if(fontDescriptionId > 0u && fontDescriptionId <= mCacheHandler->mCharacterSetCache.Count())
     {
@@ -811,7 +810,7 @@ FontId FontClient::Plugin::GetFontId(const FontDescription& fontDescription,
 
       if(fontId > 0u && mCacheHandler->IsFontIdCacheItemExist(fontId - 1u))
       {
-        fontCacheIndex = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
+        fontCacheIndex                                                     = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
         mCacheHandler->FindFontFaceCacheItem(fontCacheIndex).mCharacterSet = FcCharSetCopy(mCacheHandler->mCharacterSetCache[fontDescriptionId - 1u]);
       }
 
@@ -930,8 +929,8 @@ bool FontClient::Plugin::GetVectorMetrics(GlyphInfo* array,
     FontId fontId = array[i].fontId;
     if(mCacheHandler->IsFontIdCacheItemExist(fontId - 1u))
     {
-      auto index = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
-      FontFaceCacheItem& font = mCacheHandler->FindFontFaceCacheItem(index);
+      auto               index = mCacheHandler->FindFontIdCacheItem(fontId - 1u).index;
+      FontFaceCacheItem& font  = mCacheHandler->FindFontFaceCacheItem(index);
 
       if(!font.mVectorFontId)
       {
@@ -1281,13 +1280,13 @@ FontId FontClient::Plugin::CreateFont(const FontPath& path,
       error = FT_Get_MM_Var(ftFace, &mm_var);
       if(FT_Err_Ok == error)
       {
-        FT_Fixed *coordinates = new FT_Fixed[mm_var->num_axis];
+        FT_Fixedcoordinates = new FT_Fixed[mm_var->num_axis];
         for(uint32_t axisIndex = 0; axisIndex < mm_var->num_axis; axisIndex++)
         {
           char stringTag[FONT_AXIS_NAME_LEN + 1];
           ConvertTagToString(mm_var->axis[axisIndex].tag, stringTag);
-          auto valuePtr = variationsMap.Find(stringTag);
-          float value   = 0.0f;
+          auto  valuePtr = variationsMap.Find(stringTag);
+          float value    = 0.0f;
 
           if(valuePtr != nullptr && valuePtr->Get(value))
           {
@@ -1370,7 +1369,7 @@ FontId FontClient::Plugin::CreateFont(const FontPath& path,
 
         if(requestedPointSize != requestedPointSizeBackup)
         {
-          DALI_LOG_WARNING(" The requested-point-size : %d, is reduced to point-size : %d\n", requestedPointSizeBackup, requestedPointSize);
+          DALI_LOG_DEBUG_INFO(" The requested-point-size : %d, is reduced to point-size : %d\n", requestedPointSizeBackup, requestedPointSize);
         }
       }
       else
index 2b1e5c5c4467cd7bedda964c4e32185ef9aafd7f..db03686c070065646d45e73aa51683c9b5967fe7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -51,7 +51,7 @@ void GetScreenSize(int32_t& width, int32_t& height)
   ANativeWindow* window = Dali::Integration::AndroidFramework::Get().GetApplicationWindow();
   width                 = ANativeWindow_getWidth(window);
   height                = ANativeWindow_getHeight(window);
-  DALI_LOG_WARNING("Native window width %d, height %d", width, height);
+  DALI_LOG_DEBUG_INFO("Native window width %d, height %d", width, height);
 }
 
 void UpdateScreenSize()