avidyalalala / sunpinyin

Automatically exported from code.google.com/p/sunpinyin
0 stars 0 forks source link

xsunpinyin won't show #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Download Sunpinyin 2.0.2
2.Make using scons (scons, scons instal, cd wrapper/xim, ...)
3.Edit xsunpinyin file and put it into /etc/X11/xinit/xinput.d/ contains:

XIM=xsunpinyin
XIM_ARGS=-d
XIM_PROGRAM=/usr/local/bin/xsunpinyin
GTK_IM_MODULE=xim
QT_IM_MODULE=xim

4.xsunpinyin -d will work
5.imswitch -c, choose xsunpinyin
6.reboot. no sunpinyin logo in gnome-panel. however, 
tu2011-share# pgrep xsunpinyin
2240
and:
tu2011-share# dmesg|tail
[   13.820464] CPU1 attaching NULL sched-domain.
[   13.944092] CPU0 attaching sched-domain:
[   13.944098]  domain 0: span 0-1 level MC
[   13.944102]   groups: 0 1
[   13.944111] CPU1 attaching sched-domain:
[   13.944115]  domain 0: span 0-1 level MC
[   13.944119]   groups: 1 0
[   24.336007] eth0: no IPv6 routers present
[  960.877073] __ratelimit: 278 callbacks suppressed
[  960.877077] xsunpinyin[2250]: segfault at 4 ip 0805ad00 sp bf849a98 error 4 
in xsunpinyin[8048000+2d000]

I can use sudo xsunpinyin -d and it works.

Original issue reported on code.google.com by cheungtifan on 23 Sep 2010 at 7:37

GoogleCodeExporter commented 9 years ago
[ 1628.928938] xsunpinyin[4345]: segfault at 4 ip 08051c37 sp bfc56f40 error 4 
in xsunpinyin[8048000+1b000]
I tried the most up-to-date version from repo and got this from dmesg|tail

Original comment by cheungtifan on 23 Sep 2010 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by find...@gmail.com on 23 Sep 2010 at 1:57

GoogleCodeExporter commented 9 years ago
I tried to compile xsunpinyin on ubuntu 10.10 rc, and got the same result.
Oct  6 14:51:09 alex-MacBookPro kernel: [ 3545.348686] xsunpinyin[12629]: 
segfault at 8 ip 000000000040a765 sp 00007fffffc751c0 error 4 in 
xsunpinyin[400000+1d000]
and currently seems xsunpinyin requires root to run?

Original comment by cheungtifan on 6 Oct 2010 at 6:53

GoogleCodeExporter commented 9 years ago
However:
alex-MacBookPro% sudo xsunpinyin -d
alex-MacBookPro% 
(xsunpinyin:12667): Gtk-CRITICAL **: IA__gtk_widget_set_colormap: assertion 
`!gtk_widget_get_realized (widget)' failed

alex-MacBookPro% Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
中文Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1

zsh: command not found: 中文
alex-MacBookPro% Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1

Original comment by cheungtifan on 6 Oct 2010 at 6:53

GoogleCodeExporter commented 9 years ago
I really cannot reproduce this on laptop and workstation.... sorry, I've no 
idea why this happened

Original comment by mikeandm...@gmail.com on 7 Oct 2010 at 3:44

GoogleCodeExporter commented 9 years ago
So, would you like to tell me what is the post installation procedures?
I just wrote script im-switch/xsunpinyin to xinput.d and used im-switch.

Original comment by cheungtifan on 7 Oct 2010 at 3:50

GoogleCodeExporter commented 9 years ago
every distribution have their own management of im-switcher
for debian/ubuntu your configuration sounds correct.

I've no idea why it crashed.

However, it is *not recommended* to use sudo. Actually, once you used sudo, the 
history as well as config file will be created as owner of root, and you've no 
rights to write it, which might cause a crash.

Original comment by mikeandm...@gmail.com on 7 Oct 2010 at 4:09

GoogleCodeExporter commented 9 years ago
However, if I do not use sudo, the error message saying that access to bi-gram 
is denied.

Original comment by cheungtifan on 7 Oct 2010 at 4:12

GoogleCodeExporter commented 9 years ago
Bingo, that is the error.

I'm pretty sure you don't have access to your ~/.sunpinyin/history , and this 
is a consequence of using sudo.

Solution: remove your ~/.sunpinyin dir and start without sudo might help.

Original comment by mikeandm...@gmail.com on 7 Oct 2010 at 4:21

GoogleCodeExporter commented 9 years ago
No, it do not work.

alex-MacBookPro% ls -lah ~|grep sunpinyin
drw-------  2 alex alex    6 2010-10-07 12:40 .sunpinyin
alex-MacBookPro% xsunpinyin
fopen bi-gram: Permission denied
zsh: segmentation fault  xsunpinyin
alex-MacBookPro% tail /var/log/syslog
Oct  7 12:40:19 alex-MacBookPro avahi-daemon[996]: New relevant interface 
eth1.IPv4 for mDNS.
Oct  7 12:40:19 alex-MacBookPro avahi-daemon[996]: Registering new address 
record for 10.2.0.3 on eth1.IPv4.
Oct  7 12:40:20 alex-MacBookPro NetworkManager[1057]: <info> (eth1): device 
state change: 7 -> 8 (reason 0)
Oct  7 12:40:20 alex-MacBookPro NetworkManager[1057]: <info> Policy set 
'alex-home(13905321042)' (eth1) as default for IPv4 routing and DNS.
Oct  7 12:40:20 alex-MacBookPro NetworkManager[1057]: <info> Activation (eth1) 
successful, device activated.
Oct  7 12:40:20 alex-MacBookPro NetworkManager[1057]: <info> Activation (eth1) 
Stage 5 of 5 (IP Configure Commit) complete.
Oct  7 12:40:23 alex-MacBookPro ntpdate[2336]: adjust time server 91.189.94.4 
offset -0.004257 sec
Oct  7 12:40:54 alex-MacBookPro kernel: [  186.134902] xsunpinyin[2423]: 
segfault at 8 ip 000000000040a765 sp 00007fff8756cdd0 error 4 in 
xsunpinyin[400000+1d000]
Oct  7 12:41:05 alex-MacBookPro kernel: [  197.880392] xsunpinyin[2451]: 
segfault at 8 ip 000000000040a765 sp 00007fff4710a200 error 4 in 
xsunpinyin[400000+1d000]
Oct  7 12:41:38 alex-MacBookPro kernel: [  230.855406] xsunpinyin[2496]: 
segfault at 8 ip 000000000040a765 sp 00007ffff1a3ee00 error 4 in 
xsunpinyin[400000+1d000]
alex-MacBookPro%  

Original comment by cheungtifan on 7 Oct 2010 at 4:42

GoogleCodeExporter commented 9 years ago
how about ls ~/.sunpinyin/history -lh

Original comment by mikeandm...@gmail.com on 7 Oct 2010 at 5:19

GoogleCodeExporter commented 9 years ago
alex-MacBookPro% sudo rm -Rf ~/.sunpinyin
alex-MacBookPro% xsunpinyin
fopen bi-gram: Permission denied
zsh: segmentation fault  xsunpinyin
alex-MacBookPro% ls -lah ~/.sunpinyin 
ls: cannot access /home/alex/.sunpinyin/.: Permission denied
ls: cannot access /home/alex/.sunpinyin/..: Permission denied
total 0
d????????? ? ? ? ?                ? .
d????????? ? ? ? ?                ? ..
alex-MacBookPro% ls -lah ~|grep sunpinyin
drw-------  2 alex alex    6 2010-10-07 13:29 .sunpinyin
alex-MacBookPro% 

However:
alex-MacBookPro% sudo rm -Rf ~/.sunpinyin 
alex-MacBookPro% mkdir ~/.sunpinyin
alex-MacBookPro% xsunpinyin

(xsunpinyin:2063): Gtk-CRITICAL **: IA__gtk_widget_set_colormap: assertion 
`!gtk_widget_get_realized (widget)' failed

Please change code for xsunpinyin wrapper... create .sunpinyin with current 
uid/gid (if is this problem)

Original comment by cheungtifan on 7 Oct 2010 at 5:31

GoogleCodeExporter commented 9 years ago
OK, I think I know about this problems now. The initialization sequence seems 
to be reversed.

PS. Creating .sunpinyin is not done inside xsunpinyin, instead, it is done by 
ime-core. 

Original comment by mikeandm...@gmail.com on 7 Oct 2010 at 7:19

GoogleCodeExporter commented 9 years ago
Oops, sorry, I found it... My bad.

fixed in the latest git.

Original comment by mikeandm...@gmail.com on 7 Oct 2010 at 7:57

GoogleCodeExporter commented 9 years ago

Original comment by mikeandm...@gmail.com on 9 Feb 2011 at 3:50

GoogleCodeExporter commented 9 years ago
I met exactly the same problem on FreeBSD with version 2.0.3

Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1
Full Simbol is 0
Full Punc is 1

while .sunpinyin is accessible.

Original comment by lich...@gmail.com on 11 Nov 2011 at 4:05