View crashes when trying to get seleciton when last char is " "
See original GitHub issueHow to reproduce: Set last char of TextField (or ComboBox or maybe other views) text to " " then double click at next position.
Reproduceable both on main and nuget version. PrepareSelection method passes invalid parameters to String.SubString resulting an exception.
As I’ve understood, selection tries to ignore whitespace but there are some quircks, for example:
" abc "
^ - if double click is called on first char then full string is selected
" abc "
^ - if double click is called on last char "abc " is selected
" abc "
^ - if double click is called on next after last char position then exception is thrown
It is easily reproduceable when the only char is " ". The code below then has start = 1 and length = 2 which results in exception. So I guess start = 1 is ok, but length of 2 is not. Considering text itself has 1 char only.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Crash on Character selection - Technical Support
Hi, My game crash after hit “play” on the character selection screen. I already verify the game and redownload it but no change....
Read more >Game crashes after character select
I tried to relog and when I selected the character upon login I got the same warning message and the game crashed again....
Read more >Game Crashes After Selecting Character : r/ffxiv
Now every time I try to pick my character, it crashes in the loading screen. r/ffxiv - Game Crashes After Selecting Character. I...
Read more >Setting last character in a string to 0 causes program crash
You can not change a string literal. Character display with printf . E.g printf("%c", character); , not &character. try this.
Read more >Game crashes when trying to select a specific character
Every character I have can load into the game successfully, but one specific one goes to the loading screen then the game crashes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for bringing this up. Here is a test that demonstrates it:
Exception:
Damn, @tznind, you continue to set the bar for how to treat bug reports. I love how, by providing test cases, you are
a) teaching others how to fish b) ensuring the entire project is always getting better.
Huge kudos!