[Tizen] Replace the exception case in tizen backend. 81/324881/1 accepted/tizen_9.0_unified accepted/tizen/9.0/unified/20250611.103228
authorWonsik Jung <sidein@samsung.com>
Wed, 28 May 2025 07:35:30 +0000 (16:35 +0900)
committerWonsik Jung <sidein@samsung.com>
Wed, 28 May 2025 07:35:30 +0000 (16:35 +0900)
Replace the excepption case in tizen backend when display server does not work.
When display server does not work, then ecore_wl2_display_connect() does not work and crash occurs in application size.
To handle the failure case where the display server does not work in the Tizen backend, you can modify the ecore_wl2_display_connect() function to avoid crashing the application.
Specifically, replace the exit() call with a more graceful error handling mechanism.

Change-Id: I25cb6cdaf8a4a9a64bb36ecdeef08a1505082c2e

dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp

index 3d36a649ebfc339adef4f8ba49cc34c32e52c952..69fc8ff1c52b6b68571a0d2c717da17d6edbbbe6 100644 (file)
@@ -3350,7 +3350,8 @@ void WindowBaseEcoreWl2::CreateInternalWindow(PositionSize positionSize)
   Ecore_Wl2_Display* display = ecore_wl2_display_connect(NULL);
   if(!display)
   {
-    DALI_ASSERT_ALWAYS(0 && "Failed to get display");
+    DALI_LOG_ERROR("Failed to get display, then application will be exit");
+    exit(1);
   }
 
   {