-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault if load shader.glsl with national symbols in commentaries (UTF-8 trouble?) #160
Comments
Sounds like scintilla just not supporting non-ascii at all. Should probably use a more up-to-date version, if they've fixed it upstream by now. |
May be, it non-full initialisating Scintilla for UTF-8 in Bonzomatic? See here: https://stackoverflow.com/questions/16415617/how-to-use-scintilla-for-unicode-strings |
For show Cyrillic symbols, i change src/Platform.cpp:
And if load default shader, and if press key with national symbol in national keyboarlayout, i see correct national symbol up-to 0.1 sec, and next is Segmentation Fault. This is, at least, our texture with all symbols is correct, and correct select symbol coordinates from this texture. But, may be, incorrect behavior in EditView::LineLayout(), at string:
Before this code, the ll->positions initialize only first element as ll->positions[0]=0, and next element is non initialize. But, this code send to function pointer to ll->positions+ts.start + 1, it is, at least (if ts.start=0), second element. May be it is error place? |
This is Valgrind output if push key with national symbol:
|
Would you be so kind to attach a shader that reproduces the issue? |
shaderWithNationalCyrillicSymbol.zip This shader have line number 3 with national cyrillic symbols. |
This bit of code should take care of unicode:
|
Yes. But in Windows we have question symbol, and in Linux we have Segmentation Fault. Dear Gargaj, do you make change code as recommendet at this comment #160 (comment) and show screenshot in Windows? In Linux this changes showing correct notional cyrillic symbol, but too small time :) about 0.1 sec, and next segfault. |
Which version are you running? I just compiled the latest commit ( 8504e2a ) & tried to run your shader, and it totally works (shows question marks): |
I am running, already, 8504e2a version (build from source). This Segfault i see at two Debian Linux computers: at desktop with Nvidia GeForce GTX 560 card, and at notebook with i915 card (yes, i915 support override OpenGL version 4.1) At your case, your system, maybe, not have cyrillic locale, and this fact lead to "Non-Segfault" behavior. Try temporary set cyrillic (ru) locale with next step:
If this command show empty line, generate locale:
... and try run Bonzomatic. |
We still need to understand what are the differences between our environments... In my case i have two computer with difference Debian Linux state near version 9 (i not sure about my updates), and difference videocard Nvidia and i915. hence different drivers are installed. In both this cases i see Segfault. Maybe the problem is that I am using the GCC 6.3.0 compiler and you are building via Clang? |
I'm using GCC 10.2.1, glibc 2.32 |
I using Debian Linux Stable.
If create shader.glsl in UTF-8 codepage with national (Cyrillic) symbols in comment, load process crashed with message:
Same problem (Segmentation fault) if try press national symbol in worked Bonzomatic.
The text was updated successfully, but these errors were encountered: