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: 740 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: 740 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: 1267 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
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: 740 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: GetSmartTextSize() fails with QTF text [message #61526 is a reply to message #61509] |
Tue, 04 March 2025 08:05   |
 |
mirek
Messages: 14291 Registered: November 2005
|
Ultimate Member |
|
|
Didier wrote on Thu, 27 February 2025 23:44Hello Mirek,
I think I found something interesting: when compiling in "verbose", all paths to UppHub packages get included although I have only included one in my application package dependencies.
So if I have same packages present in UppHub and in another nest (both nests present in nest config paths) ... things will probably get nasty
OK, so let's analyse this:
"regular" nests includes should always precede hub nests (unless the main package is from the hub, e.g. example package, then single hub nest can be before regular nest). At the same time, when looking for package, nests are searched in the same order as is the order of nest includes. I would argue that this leaves little place for things to get nasty...
Possible problems I have found: Internal includes are added for all packages (e.g. plugin/sundials). That is probably unnecessary, but I am sort of afraid to fix that. Build methods includes are added at the end of list. That IMO is OK....
|
|
|
|
|
|
|
|
|
|
| Re: GetSmartTextSize() fails with QTF text [message #61554 is a reply to message #61546] |
Sun, 16 March 2025 18:24  |
Didier
Messages: 740 Registered: November 2008 Location: France
|
Contributor |
|
|
Quote:Hey, so I have found and fixed one problem with dependencies:
In Win32, include file names can have different case from actual files (e.g. Header.h and #include "header.h"). There is a caching mechanism for filetimes to speed things up that was not ready to cope with this.
Now fixed: https://github.com/ultimatepp/ultimatepp/commit/4315ff493bc2 94e2dc2707062be95b998376768f
Can this be the problem?
Sorry for not replying faster, I didn't have much free time lately
Thanks, I will, update my windows version
|
|
|
|
Goto Forum:
Current Time: Wed Jun 10 12:14:36 GMT+2 2026
Total time taken to generate the page: 0.00830 seconds
|