I tried to draw my my first line but I can’t. QTextCursor::setPosition: Position '8' out of range is displayed after clicking Length input. Analogous message is displayed when Angle input is clicked. There is nothing I can do about it - after clicking OK message reappears. I can only kill the program from process manager.
The preference is found under the Language tab in the General panel of the Application Preferences dialog.
I am very curious about if that has an effect, since I am unable to duplicate the issue over here. If I try changing a “.” to a “,” I don’t get any errors, I’m just not allowed to press OK before I fix it.
Hmmm… on 2nd look - it appears related to line edit textbox, and for some reason it can’t set the cursor to the end of the text… 7 chars - next position is 8.
Couple questions do you know what build date of the app is it?
What language is set, and have you tried English?
I’d like to see what happens if you try to load a pattern. I’d attach one, but I don’t have easy access to one via the phone.
I just downloaded the newest version and tried it on Linux Mint 20.3. It worked as it should. I could not reproduce the problem. It can be either related to the newest Mint 21 version, or to our computers differing in some other essential feature.
Good to know it’s probably not something new in the latest release… but then this is the 1st time I’ve seen this error - and I’ve gotten a lot of strange ones coding the app. I pretty much always use this tool in testing new features. I’d like to see what happens with another tool - one that you can start with the base point- maybe an arc?
Well I have determined from the original pic the language is set to Polish? I will try playing around later tonight changing the language to see if I can reproduce the error.
$ /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=seamly2d --file-forwarding net.seamly.seamly2d
Seamly2D: Setting QT_MAC_WANTS_LAYER=1 and QSG_RENDER_LOOP=basic
Gtk-Message: 08:52:30.086: Failed to load module "xapp-gtk3-module"
Qt: Session management error: Could not open network socket
Checked locale: "pl_PL"
DEBUG:Log file /home/xxxxxxx/.var/app/net.seamly.seamly2d/config/Seamly2DTeam/seamly2d-pid2.log was locked.
DEBUG:Clearing old logs
DEBUG:Version: "0.6.0.1"
DEBUG:Build revision: Git:19110d130bf4
DEBUG:"Based on Qt 5.15.7 (GCC 12.1.0, 64 bit)"
DEBUG:Built on Jan 16 2023 at 06:40:50
DEBUG:Command-line arguments: ("seamly2d")
DEBUG:Process ID: 2
DEBUG:Checked locale: "pl_PL"
DEBUG:Initialize Tool Options Property editor.
DEBUG:Initialize Groups manager.
DEBUG:Can't get tag Groups.
DEBUG:Updating recent file actions.
DEBUG:Value 100.000000
DEBUG:Autosaving every 1 minutes.
DEBUG:Reading settings.
After reinstalling from scratch (flatpak uninstall --delete-data net.seamly.seamly2d) these are the default setting of application:
Changing this to GUI Language=American English and Label language=American English makes no changes.
Unchecking Decimal separator makes no change according to error.
Starting with different tool - arc produces the same error:
In ‘Point at distance and angle’ dialog ‘Point label’ input does not exhibit issue (I can click on this input and write whatever I want), only ‘Length’ and ‘Angle’ are affected:
BUT: trying on the other computer with Mint 21.1 which I use as a multimedia computer it works fine
Now I discovered that clicking with mouse exactly on the digits does not trigger the error, while clicking somewhere on the white area of the input box triggers it immediately:
Moreover if I click on the digits, the cursor shows in the input, then subsequent pressing right arrow moves the cursor to the right and eventually already known setPosition: Position ‘8’ out of range message` pops out.
That would seem to indicate it’s a computer related issue.
I have no clue why this would be happening. And yes after checking the code again, it’s going to happen with every formula text box as when a box gains focus a base class function is called to set the cursor to the end of the text. I think if it were a code issue, everyone would be having the issue.
Correct. The Formulas use a QPlainTextEdit box, while the point name use a QLineEdit box. The formula boxes call a function that sets the cursor to the end of tge text, the LineEdits don’t.
This sounds to me like a bug in Qt. At the very least it seems related to something in Qt that functions in an unacceptable way given the configuration of the specific computer.
Is there any chance to bump qt version up to check if it maybe helps?
Is the qt library provided with the application (within flatpak or appimage) or does it use system-wide qt version? I’d expect the former but not sure.
Could be. I looked at the code again last night, and it’s not even calling setPosition()… it’s calling movePosition()… which is probably calling setPosition internally.
The builds I believe are using Qt 5.15.2… the max LTS free ver.
I’m assuming the Qt libs are being packaged with the distribution the same as the Windows ver.
I had the ‘same problem’ on “Linux Mint 22.1 Xia” running the appimage “2025.7.14.216”
Errors:
WARNING Qt AtSpiAdaptor: Accessible invalid: QAccessibleInterface(0x600ed63d6340 invalid) “/org/a11y/atspi/accessible/2147483798”
When clicking in (formula) fields:
QTextCursor::setPosition: Position ‘5’ out of range
Solution which worked for me:
Disabling the ‘on screen keyboard’ in the Accessibility services in Linux Mint itself.
Steps:
Go to your ‘Linux Mint’ menu → “System Settings” → “Accesibility” → click tab “Keyboard”
Uncheck “Enable the on-screen keyboard”
Reasoning:
The underlying issue seems to be hickups between the accessibility services and qt. So not seamly itself. I would assume other Accessibility services which are ‘on’ could also affect this. I didn’t try, as only 1 options was on.
This is reproduciable even while running the appimage and just turn off/on the “on-screen keyboard”. The error will show/not show accordingly.
Hope this helps anyone or at least clarifies,
Best regards,
Warden
That may fix the accessibilties issues, but I’m not sure what the connection is to the text cursor issue which is locale/ unicode related. It’s why switching off using the user’s locale to use the stanadard C locale usually fixes the issue with some languages / locales. And yes… I believe it’s more a Qt issue with the QTextCursor internally not handling unicode properly.
That being said… I may have more to add to this as I’m currently working through a locale issue moving the apps to qt6.