# Loading Chinese in Slicer causes crash on startup

**URL:** <https://discourse.slicer.org/t/loading-chinese-in-slicer-causes-crash-on-startup/33854>\
**Category:** Support\
**Tags:** extensions-manager\
**Created:** [January 18, 2024, 2:40pm UTC](https://discourse.slicer.org/t/loading-chinese-in-slicer-causes-crash-on-startup/33854 "2024-01-18T14:40:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chen-hongbo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chen-hongbo/32/69012_2.png) [@chen-hongbo](https://discourse.slicer.org/u/chen-hongbo)\
**Post date:** [January 18, 2024, 2:40pm UTC](https://discourse.slicer.org/t/loading-chinese-in-slicer-causes-crash-on-startup/33854/1 "2024-01-18T14:40:06Z")

</div>

Using Language Tool to load Chinese, starting Slicer results in a crash. However, if Japanese is loaded, the startup is normal.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [January 18, 2024, 2:45pm UTC](https://discourse.slicer.org/t/loading-chinese-in-slicer-causes-crash-on-startup/33854/2 "2024-01-18T14:45:44Z")

</div>

Thanks for reporting this. The crash has been already fixed, see details at:

> <https://github.com/Slicer/Slicer/issues/7523>
>
> \## Summary
> When the language is set to \*\*Simplified Chinese\*\* in \*\*Utilities\\La…nguage Tools\*\*, the program cannot be opened after restarting, and the Windows problem report shows that \`SlicerApp-real.exe\` has stopped working. Switching to \*\*Japanese\*\* will display Japanese normally, switching to \*\*Traditional Chinese\*\* will display English, but it can start normally.
> 
> After careful investigation, after deleting the \*\*Slicer\_zh-CN.qm\*\* file in the \`%LocalAppData%\\slicer.org\\Slicer 5.6.1\\bin\\translations\` directory, the program can start normally.
> 
> \## Steps to reproduce
> 
> 1. Press Ctrl+4, enter \*\*Extensions Manger\*\*, search for "language", you can see a utility called \*\*LanguagePacks\*\*, restart the software after installation
> 2. Press Ctrl+2, open \*\*Application Setting\*\*, check \*\*internationalization\*\*, and restart the software.
> 3. Click \*\*Utilities\*\*→\*\*Language Tools\*\* in the module options, select \*\*Weblate\*\* in the Input translations column, click the \*\*refresh\*\* button, you can see a list of many languages, check \*\*Japanese\*\*, \*\*Simplified Chinese\*\* and \*\*Traditional Chinese\*\*, click \*\*Update translation files\*\* , the translation file will start to download automatically. After downloading, restart the software
> 4. Open \*\*Language Tools\*\* again, select \*\*Application language\*\* as \*\*Chinese (China)\*\* at the top, click \*\*Restart the application\*\* on the right, and the software will restart.
> 
> !\[repo1\](https://github.com/Slicer/Slicer/assets/47420679/00876f83-97b7-4629-b012-85cf9d595775)
> 
> 5. When starting the software, text such as the initialization module will be displayed, but when it reaches the \`Loading module "SegmentEditor"... \`stage, it will crash.
> !\[repo2\](https://github.com/Slicer/Slicer/assets/47420679/2363c2fb-41ba-451d-99d2-061bef3e1958)
> 
> 6. Also select the \*\*second\*\* Chinese (China). After restarting, the software can be started normally but it is displayed in \*\*English\*\*.
> 
> 7. After selecting \*\*Japanese\*\*, the software starts normally and the translation takes effect.
> !\[repo3\](https://github.com/Slicer/Slicer/assets/47420679/64d70e7d-09b3-43e3-99e8-951b02c38598)
> 
> 
> 
> \## Environment
> System: Windows 10 Chinese version
> System version: 22H2(19045.3803)
> Slicer version: 5.6.1 Stable Release (You see there is no utility named Language Tools in Preview Release )
> 
> \## Problem log of Windows system
> Source: SlicerApp-real.exe
> Summary: Stopped working
> Date: 2014-01-‎08 23:22
> Status: Report Sent
> Wrong application path: C:\\Users\\1233\\AppData\\Local\\slicer.org\\Slicer 5.6.1\\bin\\SlicerApp-real.exe
> Problem event name: APPCRASH
> Application name: SlicerApp-real.exe
> Application version: 0.0.0.0
> Application timestamp: 65633afb
> Faulty module name: Qt5Widgets.dll
> Faulty module version: 5.15.2.0
> Faulty module timestamp: 5fa4de1c
> Exception code: c0000005
> Exception offset: 0000000000032fe9
> OS version: 10.0.19045.2.0.0.768.99
> Locale ID: 2052
> Additional information 1: 6cfd
> Additional information 2: 6cfdfc8dd99a7ae0ef76343ef9579a3f
> Additional information 3: f94b
> Additional information 4: f94bf039ba88192a82b805ca52b38915
> Bucket ID: 4ebf9e4a2a29d98d46356509a199b490 (1600296334640395408)

In summary, the problem is caused by incorrect translation of `Segmentations` module: it is translated as `Segmentation`, which is the exact same word that is used as module category name.

We fixed the crash in the Slicer Preview Release so that now a warning is logged instead of crash when a module name matches a module category name. However, you still need to modify the Chinese translation to not use the same string as both a module name and a module category name.
