|
|
Home » U++ Library support » U++ Core » GetSmartTextSize() fails with QTF text
GetSmartTextSize() fails with QTF text [message #61431] |
Sat, 08 February 2025 00:12  |
Didier
Messages: 728 Registered: November 2008 Location: France
|
Contributor |
|
|
Hello,
While investigating a bug in GraphCtrlI just found a bug in GetSmartTextSize()
The following code:
String s = "\1[1= 13h27:42&][1= 9 Jan&][1*= 0]";
Size sz = GetSmartTextSize(s);
RDUMP(s);
RDUMP(sz);
s = "[1= 13h27:42&][1= 9 Jan&][1*= 0]";
sz = GetSmartTextSize(s);
RDUMP(s);
RDUMP(sz);
Displays:
s = [1= 13h27:42&][1= 9 Jan&][1*= 0]
sz = (1073741850, 54) ===> With QTF text: X size is not correct
s = [1= 13h27:42&][1= 9 Jan&][1*= 0]
sz = (191, 18)
Note: In QTF designer, the string is displayed correctly
[Updated on: Sat, 08 February 2025 00:14] Report message to a moderator
|
|
|
|
|
Re: GetSmartTextSize() fails with QTF text [message #61440 is a reply to message #61433] |
Wed, 12 February 2025 21:16   |
Didier
Messages: 728 Registered: November 2008 Location: France
|
Contributor |
|
|
Hello Koldo,
Thank you for you're feedback.
I will try erasing cache.
Although in all the years working with Upp, I only encountered this issue recently.
Is this du to Clang or a Bug in Upp Builder: sometimes modified files are not detected correctly and build doesn't get correctly refreshed
Since this 'clean cache problem' seems to be more present, maybe there should be an "Erase cache" button in TheIde ?
[Updated on: Wed, 12 February 2025 22:31] Report message to a moderator
|
|
|
|
|
Re: GetSmartTextSize() fails with QTF text [message #61480 is a reply to message #61431] |
Thu, 20 February 2025 22:56   |
Oblivion
Messages: 1210 Registered: August 2007
|
Senior Contributor |
|
|
Quote:Ide used to track dependencies very well and I was very confident about it. But since some time now (maybe a year or more) I regularly stumble on this problem (On linux AND on windows).
Even some collegues stumbled on it : the problem was comming from the cache.
I can confirm this from my experience. For some time (I don't know when it started exactly) I am getting build system cache issues that cause apps to behave erratically or directly crash.
This is mostly harmless as it is easily noticable when the app stops working and crashes immediately after start for no apparent reason. However, sometimes it can introduce nasty bugs that gets triggered only when certain action is taken later.
By the way, One very visible cache update issue is with TheIDE's layout editor: Unless I rebuild all, TheIDE does not rebuild the package after I modify the layouts. I am always forced to rebuild all (rebuilding the package doesn't work either).
(This happens on Linux)
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Thu, 20 February 2025 22:56] Report message to a moderator
|
|
|
|
|
Re: GetSmartTextSize() fails with QTF text [message #61483 is a reply to message #61482] |
Fri, 21 February 2025 20:35   |
Didier
Messages: 728 Registered: November 2008 Location: France
|
Contributor |
|
|
Hello Mirek,
For a test case : impossible, it happens without any obvious reason and sometimes goes away whitout any reason
Quote:What do you mean by "cache" BTW there is user/.cache directory (not git cache dir) that the Ide uses to store build results
Quote:This is mostly harmless as it is easily noticable when the app stops working and crashes immediately after start for no apparent reason. However, sometimes it can introduce nasty bugs that gets triggered only when certain action is taken later A crash is very visible, but when the build problem doesn't imply (quick) application crash then you always have a question in the back of you're head "Is my application correctly build ??"
A few weeks ago I had a case where it was impossible to build (rebuild all didn't work, nor clear package), modifying .cpp or .h didn't work either, so I tried to:
- Stop Ide, erase some config files, cache dir, ... everything I could find
- Restart Ide and try to build (so that Ide would build new files)
- If not successful build, go back to (1) to try to pin down what was causing the problem
I never found the problem ==> I solved the problem by doing a fresh install of all Upp 
My guess is that:
* I missed some files used by Ide (Where could they be ??)
* The problem comes from the way I update Ide:
...* Update upp sources from git (latest version) (maybe the git versions I get weren't stable enough ??)
...* build Ide
...* replace current Ide bin file (sometimes changing ide bin name)
...==> maybe old files are not read correctly by by new Ide (or old files incompatible with new Ide) ?
[Updated on: Fri, 21 February 2025 20:42] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Mon Jun 09 23:30:55 CEST 2025
Total time taken to generate the page: 0.06294 seconds
|
|
|