cancel
Showing results for 
Search instead for 
Did you mean: 

unexpected error has happened!!

XiaoenLee
Associate II

error:object of type

'touchgfxdesiger.main.project.texts.texttab.textgrid.translat

ionviewmodel' cannot be converted to type

'touchgfxdomainmodel.text.models.typogrephy'.

 

Now I can't open my project,so what can i do?

1 ACCEPTED SOLUTION

Accepted Solutions

   Perhaps due to translation issues, I didn't describe it properly last time.

   I found that there is an additional "Typography" in the language area of ...\assets\texts\texts.xml, which leads to an error.(I deleted the ones related to "Typography" in this file,solved problem of “unexpected error has happened”)
   The reason for such a problem is that when adding Texts, I wanted to use different fonts for different languages. At that time, I added "Typography" beside it. However, after adding it, touchgfx designer reported an error. Then I deleted this operation, but for some reason, it still exists in...\assets\texts\texts.xml.

   The solutions to the new questions I raised are actually mentioned in the official documents.

XiaoenLee_0-1747039339905.png

 

View solution in original post

9 REPLIES 9
XiaoenLee
Associate II

On touchgfxdesigner.log:

2025-05-08 09:50:36,936 [1] DEBUG Touchgfxpackages.implementation.touchgfxpackagestream:filestream opened on D:\touchgfx\4.24.1\app\packages\simulator-2.0.0.tpa

2025-05-08 09:50:37,026 [11] INFO Touchgfxpackages.implementation.filedownloader:take aperation was canceled.iscancellationrequested=true

2025-05-08 09:50:37,036 [1] INFO touchgfxdesigner.main.mainwindow:application closed

GaetanGodart
ST Employee

Hello @XiaoenLee ,

 

Can you share the full log file and maybe a screenshot of the error message?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

   Sorry, I just saw the message now. It can't be sent on another computer. But through my gradual debugging, I found that... There is an additional "Typography" in the language area of \assets\texts\texts xml, which leads to an error.
   The reason for such a problem is that when adding Texts, I wanted to use different fonts for different languages. At that time, I added "Typography" beside it. However, after adding it, touchgfx designer reported an error. Then I deleted this operation, but for some reason, it still exists in... In \assets\texts\ nines.xml.
   Finally, I would like to ask whether touchgfx designer supports using different fonts for different languages in the font project of the same ID?

Hello @XiaoenLee ,

 

So you found the answer, but it gets generated again and again, so you are not able to fix the issue?

 

Regarding the typographies for different languages, you can look at the "Text Animation Demo" where we have multiple languages (including Chinese):

GaetanGodart_0-1746777915618.png

but you can also look at this thread where we explain how to add different languages (and font) to a single typography.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello @XiaoenLee ,

 

I see you have liked my last message, did it help you on solving your issue or are you still blocked?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

My problem has been solved. Thank you

I am glad to hear that! :)

Can you tell me how you fixed it?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

   Perhaps due to translation issues, I didn't describe it properly last time.

   I found that there is an additional "Typography" in the language area of ...\assets\texts\texts.xml, which leads to an error.(I deleted the ones related to "Typography" in this file,solved problem of “unexpected error has happened”)
   The reason for such a problem is that when adding Texts, I wanted to use different fonts for different languages. At that time, I added "Typography" beside it. However, after adding it, touchgfx designer reported an error. Then I deleted this operation, but for some reason, it still exists in...\assets\texts\texts.xml.

   The solutions to the new questions I raised are actually mentioned in the official documents.

XiaoenLee_0-1747039339905.png

 

Thank you for the information! :)

Don't hesitate to create another thread if you encounter another challenge.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)