Discussion:
Typing failure on GTK+
(too old to reply)
Neil Hodgson
2014-07-29 23:35:50 UTC
Permalink
Recently I have encountered problems with typed characters not appearing in Scintilla on GTK+. For example, in SciTE, either the edit or output pane (but not both) becomes unresponsive. Switching focus out and back in or any other action has failed to make them respond to the keyboard. They remain responsive to mouse actions. Sometimes other elements like the file open dialog are temporarily unresponsive but that is fixed with moving the focus. Its sporadic so is difficult to debug.

This has only occurred after the 3.4.4 release so it may be code that has changed since then. It occurs on both Mint 17 and Mint 16 inside Virtual Box VMs. It may be because of using ibus which was enabled for Korean input. This occurs when ibus is set to English or Korean input. Multiple components are added for ibus and Korean support so its difficult to remove them all cleanly but this hasn't been seen on installs without ibus.

Has anyone else seen this? Do you have an easily reproduced case?

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
johnsonj
2014-07-30 11:55:54 UTC
Permalink
with thai IME installed, CJK IMEs gets into trouble.
Uninstall thai IME, All returns normal.

I think that thai IME causes troubls.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
johnsonj
2014-07-30 23:07:51 UTC
Permalink
I think this is more relevant thread to discss.
so I post here.

Lubuntu 12.10
SciTE : latest mercurial
make CLANG=1 DEBUG=1
It works well.
Even on DBCS Scite will not go bad.

-utf
한Ꞁ
にほんこ
䞭囜话
àž°à¹‰àžŸàž£

-dbcs(949)
한Ꞁ
にほんこ
äž­??
????

I wonder why SciTE does not exit abruptly on DBCS.
I need more studying.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-07-30 23:22:13 UTC
Permalink
Post by johnsonj
I think this is more relevant thread to discss.
so I post here.
Lubuntu 12.10
SciTE : latest mercurial
make CLANG=1 DEBUG=1
It works well.
Even on DBCS Scite will not go bad.
It could be because I am using Mint or because I have not set up ibus or the input method correctly.
Post by johnsonj
I wonder why SciTE does not exit abruptly on DBCS.
The crash occurs for me with code.page=949,character.set=129 or with UTF-8 chosen or with the default setting of Latin-1.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
johnsonj
2014-07-30 23:21:39 UTC
Permalink
I forgot that for DBCS mode I changed localeVal[4] to localeVal[200]

Now back to localeVal[5] I see on terminal.
Conversion failed 'にひあら'

DBCS code in IME seems to need to be fixed.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-07-30 23:27:48 UTC
Permalink
Post by johnsonj
I forgot that for DBCS mode I changed localeVal[4] to localeVal[200]
Now back to localeVal[5] I see on terminal.
Conversion failed 'にひあら'
DBCS code in IME seems to need to be fixed.
Expanding localVal is likely a good idea to prevent failures. However, it didn’t stop my crash.

At this point I’m ready to blame Mint so I will install a different distribution but I won’t get to that today.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
johnsonj
2014-07-30 23:27:38 UTC
Permalink
I finally get what i want..My error!
SciTE exits abrutly on DBCS

Here follows
---------------------------------------
Conversion failed 'ずらあもんg'
=================================================================
==4155==ERROR: AddressSanitizer: stack-buffer-overflow on address
0xbfdbe684 at pc 0x85f881f bp 0xbfdbe058 sp 0xbfdbe050
WRITE of size 1 at 0xbfdbe684 thread T0
==4155==WARNING: Trying to symbolize code, but external symbolizer is not
initialized!
#0 0x85f881e (/usr/bin/SciTE+0x85f881e)
#1 0x85c0a52 (/usr/bin/SciTE+0x85c0a52)
#2 0x4bc0a2 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x100a2)
#3 0x4b9726 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0xd726)
#4 0x4d2a18 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x26a18)
#5 0x4d389e (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x2789e)
#6 0xaa774c (/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0+0x11d74c)
#7 0x4bc0a2 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x100a2)
#8 0x4b9726 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0xd726)
#9 0x4d2a18 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x26a18)
#10 0x4d3442 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x27442)
#11 0xfb609e
(/usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so+0x309e)
#12 0x4bc68f (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x1068f)
#13 0x4b9726 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0xd726)
#14 0x4d2a18 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x26a18)
#15 0x4d3442 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x27442)
#16 0x68f055b (/usr/lib/i386-linux-gnu/libibus-1.0.so.0+0x1655b)
#17 0x69f359 (/usr/lib/i386-linux-gnu/libffi.so.6+0x4359)
#18 0x69f08e (/usr/lib/i386-linux-gnu/libffi.so.6+0x408e)
#19 0x4b9d93 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0xdd93)
#20 0x4b82fc (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0xc2fc)
#21 0x4b9483 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0xd483)
#22 0x4cb70c (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x1f70c)
#23 0x4d32cb (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x272cb)
#24 0x4d3442 (/usr/lib/i386-linux-gnu/libgobject-2.0.so.0+0x27442)
#25 0x7b3e776 (/usr/lib/i386-linux-gnu/libgio-2.0.so.0+0xcb776)
#26 0x7b2c665 (/usr/lib/i386-linux-gnu/libgio-2.0.so.0+0xb9665)
#27 0x30f80f (/lib/i386-linux-gnu/libglib-2.0.so.0+0x4480f)
#28 0x311d45 (/lib/i386-linux-gnu/libglib-2.0.so.0+0x46d45)
#29 0x3120e4 (/lib/i386-linux-gnu/libglib-2.0.so.0+0x470e4)
#30 0x31252a (/lib/i386-linux-gnu/libglib-2.0.so.0+0x4752a)
#31 0xabfbfe (/usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0+0x135bfe)
#32 0x8216906 (/usr/bin/SciTE+0x8216906)
#33 0x82175d7 (/usr/bin/SciTE+0x82175d7)
#34 0x7714d2 (/lib/i386-linux-gnu/libc.so.6+0x194d2)
#35 0x8174de4 (/usr/bin/SciTE+0x8174de4)

Address 0xbfdbe684 is located in stack of thread T0 at offset 996 in frame
#0 0x85f6aef (/usr/bin/SciTE+0x85f6aef)

This frame has 22 object(s):
[32, 36) ''
[96, 100) ''
[160, 161) 'koreanIME'
[224, 228) ''
[288, 292) ''
[352, 356) 'source'
[416, 420) 'conv'
[480, 484) 'localeVal'
[544, 548) 'pin'
[608, 612) 'inLeft'
[672, 676) 'pout'
[736, 740) 'outLeft'
[800, 804) 'conversions'
[864, 868) 'source1'
[928, 932) 'conv2'
[992, 996) 'localeVal3' <== Memory access at offset 996 overflows this
variable
[1056, 1060) 'pin4'
[1120, 1124) 'inLeft5'
[1184, 1188) 'pout6'
[1248, 1252) 'outLeft7'
[1312, 1316) 'conversions8'
[1376, 1380) 'i'
HINT: this may be a false positive if your program uses some custom stack
unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow ??:0 ??
Shadow bytes around the buggy address:
0x37fb7c80: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7c90: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7ca0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7cb0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7cc0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
=>0x37fb7cd0:[04]f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7ce0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7cf0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7d00: 04 f4 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00
0x37fb7d10: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f4 f4 f4
0x37fb7d20: f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
ASan internal: fe
==4155==ABORTING
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-07-30 23:32:41 UTC
Permalink
Post by johnsonj
I finally get what i want..My error!
SciTE exits abrutly on DBCS
Here follows
---------------------------------------
Conversion failed 'とらあもんg'
=================================================================
==4155==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xbfdbe684 at pc 0x85f881f bp 0xbfdbe058 sp 0xbfdbe050
WRITE of size 1 at 0xbfdbe684 thread T0
==4155==WARNING: Trying to symbolize code, but external symbolizer is not initialized!
#0 0x85f881e (/usr/bin/SciTE+0x85f881e)
You can turn this into a symbolic stack trace with the asan_symbolize tool by placing the report in a file and running:

/usr/bin/asan_symbolize <file

Its also supposed to be possible to ask for this to occur automatically by setting the ASAN_SYMBOLIZER_PATH environment variable but that hasn’t worked for me on recent distributions.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
johnsonj
2014-07-30 23:40:51 UTC
Permalink
"""The crash occurs for me with code.page=949,character.set=
129 or with UTF-8 chosen or with the default setting of Latin-1."""

Except KoreanIME!!!
With utf8 every IME works well.
With DBCS koreanIME works well but Other IMEs goes bad and finally crashes.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
johnsonj
2014-07-31 00:14:54 UTC
Permalink
It gets worse, doesn't it?

Conversion failed 'ªÈªéª¢ªâªóg'
=================================================================
==4155==ERROR: AddressSanitizer: stack-buffer-overflow on address
0xbfdbe684 at pc 0x85f881f bp 0xbfdbe058 sp 0xbfdbe050
WRITE of size 1 at 0xbfdbe684 thread T0
==4155==WARNING: Trying to symbolize code, but external symbolizer is not
initialized!
#0 0x85f881e in _ZN12ScintillaGTK10CommitThisEPc
/home/dokeby/scLastsrc/scintilla/gtk/ScintillaGTK.cxx:2399
#1 0x85c0a52 in _ZN12ScintillaGTK6CommitEP13_GtkIMContextPcPS_
/home/dokeby/scLastsrc/scintilla/gtk/ScintillaGTK.cxx:2418
#2 0x4bc0a2 in ?? ??:0
#3 0x4b9726 in ?? ??:0
#4 0x4d2a18 in ?? ??:0
#5 0x4d389e in ?? ??:0
#6 0xaa774c in gtk_im_multicontext_commit_cb
/build/buildd/gtk+2.0-2.24.10/gtk/gtkimmulticontext.c:483
#7 0x4bc0a2 in ?? ??:0
#8 0x4b9726 in ?? ??:0
#9 0x4d2a18 in ?? ??:0
#10 0x4d3442 in ?? ??:0
#11 0xfb609e in ?? ??:0
#12 0x4bc68f in ?? ??:0
#13 0x4b9726 in ?? ??:0
#14 0x4d2a18 in ?? ??:0
#15 0x4d3442 in ?? ??:0
#16 0x68f055b in ?? ??:0
#17 0x69f359 in ?? ??:0
#18 0x69f08e in ?? ??:0
#19 0x4b9d93 in ?? ??:0
#20 0x4b82fc in ?? ??:0
#21 0x4b9483 in ?? ??:0
#22 0x4cb70c in ?? ??:0
#23 0x4d32cb in ?? ??:0
#24 0x4d3442 in ?? ??:0
#25 0x7b3e776 in ?? ??:0
#26 0x7b2c665 in ?? ??:0
#27 0x30f80f in ?? ??:0
#28 0x311d45 in ?? ??:0
#29 0x3120e4 in ?? ??:0
#30 0x31252a in ?? ??:0
#31 0xabfbfe in IA__gtk_main
/build/buildd/gtk+2.0-2.24.10/gtk/gtkmain.c:1329
#32 0x8216906 in _ZN8SciTEGTK3RunEiPPc
/home/dokeby/scLastsrc/scite/gtk/SciTEGTK.cxx:5365
#33 0x82175d7 in main /home/dokeby/scLastsrc/scite/gtk/SciTEGTK.cxx:5417
#34 0x7714d2 in ?? ??:0
#35 0x8174de4 in _start ??:0

Address 0xbfdbe684 is located in stack of thread T0 at offset 996 in frame
#0 0x85f6aef in _ZN12ScintillaGTK10CommitThisEPc
/home/dokeby/scLastsrc/scintilla/gtk/ScintillaGTK.cxx:2344

This frame has 22 object(s):
[32, 36) ''
[96, 100) ''
[160, 161) 'koreanIME'
[224, 228) ''
[288, 292) ''
[352, 356) 'source'
[416, 420) 'conv'
[480, 484) 'localeVal'
[544, 548) 'pin'
[608, 612) 'inLeft'
[672, 676) 'pout'
[736, 740) 'outLeft'
[800, 804) 'conversions'
[864, 868) 'source1'
[928, 932) 'conv2'
[992, 996) 'localeVal3' <== Memory access at offset 996 overflows this
variable
[1056, 1060) 'pin4'
[1120, 1124) 'inLeft5'
[1184, 1188) 'pout6'
[1248, 1252) 'outLeft7'
[1312, 1316) 'conversions8'
[1376, 1380) 'i'
HINT: this may be a false positive if your program uses some custom stack
unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow ??:0 ??
Shadow bytes around the buggy address:
0x37fb7c80: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7c90: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7ca0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7cb0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7cc0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
=>0x37fb7cd0:[04]f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7ce0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7cf0: 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2
0x37fb7d00: 04 f4 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 00 00
0x37fb7d10: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f4 f4 f4
0x37fb7d20: f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2 04 f4 f4 f4
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
ASan internal: fe
==4155==ABORTING
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-07-31 01:33:14 UTC
Permalink
Conversion failed 'ªÈªéª¢ªâªóg’
OK, that text from the IME appears to be is longer than 4 bytes and the 3rd variable called localeVal (‘localeVal3’) is only 4 bytes long [992, 996). So that is something that should be improved by making localeVal longer.

The text, from before 'とらあもんg’ looks like Japanese to me so possibly the Japanese characters can’t be encoded into code page 949.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
johnsonj
2014-07-31 01:51:19 UTC
Permalink
""' The text, from before 'ずらあもんg’ looks like Japanese to me so possibly
the Japanese characters can’t be encoded into code page 949. """

That is the log genereated when SciTe exits abruptly.
I know DBCS code is overlapped each other.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Loading...