Jump to content
Muxe Inc Forums
Sign in to follow this  
HUNTER_bt

Ndn Crashes In Linux (locking Assertion Failure In X)

Recommended Posts

HUNTER_bt    0

Firstly, I'd like to thank everyone who have contributed to NDN and DN and other branches for such a great software. I've been using it so long that I can't possibly switch to anything else because I learned how to use most of features for my advantage and can't live without them now.

I started to use DN when I was using DOS and after switching to Windows I was using several branches of DN and ended up with using NDN as become most advanced and developing branch. And now I'm going to switch to Linux so need the same program for Linux and unfortunately I have some problems with it. In the meantime I have to use Midnight Commander which is done in The Linux Way(split up environment into many separate programs rather then making one universal/integrated system), not that I dislike this principle but I want my work done and it's difficult to get used to something new after years of using NDN.

 

 

 

(continued from Kubuntu Forums)

 

Summary:

Something has changed in Linux in X that causes many programs to crash with "locking assertion failure". The problem was first introduced at Kubuntu 8.04. It looks like no one works on the problem and in the meantime some workaround should be applied to every individual program which is affected. They say it's a bug in caller program(NDN in this case) which used to be non-fatal and has become fatal after some change in X. I don't know what needs the change but having seen affected programs, I guess the bug(in caller program) might be in a statically linked library which is used by the software.

Disclaimer: I don't know anything for sure.

 

NDN crashes dumping this backtrace.

Runtime error 217 at B7F7B410 (Exception C0060000) TID=1.
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb7f69767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb7f6981e]
#2 /usr/lib/libX11.so.6 [0xb7d4d518]
#3 /usr/lib/libX11.so.6(XFreeGC+0x26) [0xb7d299d6]
#4 /usr/lib/libX11.so.6(XCloseDisplay+0x5f) [0xb7d22f2f]
#5 ./ndn [0x50b5cc]
#6 ./ndn [0x5080a2]
#7 ./ndn [0x5068a7]
#8 ./ndn [0x50f23f]
#9 ./ndn [0x50a8b4]
#10 [0xb7f7b420]
#11 /lib/tls/i686/cmov/libc.so.6(abort+0x101) [0xb7e46a01]
#12 /lib/tls/i686/cmov/libc.so.6(__assert_fail+0xee) [0xb7e3e10e]
#13 /usr/lib/libX11.so.6 [0xb7d4d324]
#14 /usr/lib/libX11.so.6 [0xb7d4d4fd]
#15 /usr/lib/libX11.so.6(_XReply+0x140) [0xb7d4e200]
#16 /usr/lib/libX11.so.6(XQueryKeymap+0x79) [0xb7d3c139]
#17 ./ndn [0x50b627]
#18 ./ndn [0x509460]
#19 ./ndn [0x414327]
ndn: ../../src/xcb_lock.c:77: _XGetXCBBuffer: Assertion `((int) ((xcb_req) - (dpy->request)) >= 0)' failed.
Runtime error 217 at B7F7B410 (Exception C0060000) TID=1.

 

Here is the mailing list about the problem in X:

https://bugs.launchpad.net/xorg-server/+bug/185311

 

1. NDN does work in TTY, probably the same effect as you have when running in recovery mode.

Always run NDN with SUDO, else there will be no hardware/screen access (vcsa, IO).

It works in TTY with SUDO as well as recovery mode. It would be good if it could work without full access but I can live with it.

 

2. Can you post your "env" output here?

Note: I haven't installed Russian localization yet because I don't want screw up fonts, code pages and keyboard layout switching.

 

SSH_AGENT_PID=5841
KDE_MULTIHEAD=false
DM_CONTROL=/var/run/xdmctl
SHELL=/bin/bash
TERM=xterm
XDM_MANAGED=method=classic
XDG_SESSION_COOKIE=738e0c2ca42b717baa346b1d48444939-1213438930.776048-274129493
GTK2_RC_FILES=/home/hunter/.gtkrc-2.0-kde:/home/hunter/.kde/share/config/gtkrc-2.0
GS_LIB=/home/hunter/.fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/home/hunter/.gtkrc:/home/hunter/.kde/share/config/gtkrc
WINDOWID=37748743
KDE_FULL_SESSION=true
USER=hunter
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:
SSH_AUTH_SOCK=/tmp/ssh-rpTGIg5738/agent.5738
SESSION_MANAGER=local/hunter-desktop:/tmp/.ICE-unix/5885
MC_TMPDIR=/tmp/mc-hunter
KONSOLE_DCOP=DCOPRef(konsole-5949,konsole)
DESKTOP_SESSION=default
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PWD=/home/hunter/Desktop
KONSOLE_DCOP_SESSION=DCOPRef(konsole-5949,session-1)
LANG=en_US.UTF-8
KDE_SESSION_UID=
HISTCONTROL=ignoreboth
SHLVL=2
HOME=/home/hunter
XCURSOR_THEME=DMZ-White
MC_SID=6062
LOGNAME=hunter
LESSOPEN=| /usr/bin/lesspipe %s
WINDOWPATH=7
DISPLAY=:0
LESSCLOSE=/usr/bin/lesspipe %s %s
COLORTERM=
OLDPWD=/home/hunter
_=/usr/bin/env

 

By the way another important problem in Linux is:

ALT key doesn't work in NDN.

Share this post


Link to post
Share on other sites

Hi Hunter, nice to see you here.

 

First of all, I have finally located the X crash problem and am working on a fix

which should even solve all the remaining issues in X.

 

Now I need to find an universal method of getting the window id of the x console window.

This is vital so I can access the X functions (keyboard and window stuff).

But, as you might have guessed, this is not trivial.

I hope to have this done at the end of today.

 

Using the WINDOWID env var seems not to work flawlessly, and I know that some consoles

behave strangely when using the sudo to start NDN. More on this later when I did more

testing.

 

Btw, using the Ubuntu 6.06 fonts in Kubuntu works fine.

This means full DOS compatible drawing in TTY mode.

 

Sudo:

Problem is that there's no way to read (f.ex.) the screen content without access rights.

Same with the keyboard handling.

Of course you can make a special user group to let NDN access the /dev/vcsa files for example.

 

Linux is not programmer friendly at all, at least not for doing complex programs like NDN.

 

Ok, I will post again when I made some progress.

 

Thanks for your support,

Stefan / AH

Share this post


Link to post
Share on other sites

Hi again, finally. :)

 

First of all, I have successfully fixed the crash problems

I have also tested this in many terminals, here are my findings:

 

  Tested the event code with following terminal emulators:
  gome-terminal: either keyboard or shift keys work, multiple focus events
  rxvt         : @ characters appear at cursor position
  eterm        : @ characters appear at cursor position
  aterm        : @ characters appear at cursor position
  wterm        : @ characters appear at cursor position
  xterm        : ok
  konsole      : ok
  mrxvt        : @+LF/CR characters appear at cursor position
  mlterm       : @% characters appear at cursor position

 

Strange that keyboard fully works in all terminals except the gnome-terminal.

Btw, I tested these all on Ubuntu 6.06 today.

 

The remaining @... problems probably have to do with unicode/utf encoding and

can now be worked on as the crash was the main

reason that has kept me from continuing with more courage on the LNX port.

 

I successfully tested the few terminals existing on the Kubuntu Live-CDs yesterday

(possibly the non working keys like alt still don't work...)

 

Here is the archive for everyone to test:

http://www.bnhof.de/~ho1459/temp/lnx_x.exe

 

Btw, you don't need sudo in X, but then ndn should have the group x

permission: -rwxr-x--- else NDN won't be able to start.

 

Ok, this is all for now,

I would like to have some feedback soon. :)

 

Stefan / AH

Share this post


Link to post
Share on other sites
HUNTER_bt    0

Firstly, I apologize for the delayed feedback.

 

The main problem(crash at startup) is finally fixed so I can use it finally!!!

It's also good that I don't have to run as root anymore.

 

I have the same problems as you have with various terminals. Hopefully it works well in Konsole. I also have other problems but they aren't critical for me now. NDN appears to not support the current keyboard layout and draws some Russian characters as question marks(it doesn't depend on a specific character, rather on whether it's editor or viewer). If this issue is confirmed by other people, it may be added at yet expanding the To-DO list.

 

At this point, I highly recommend releasing a new NDN for Linux user because many Linux users(Ubuntu users in particular) can't use the current NDN version because of the crash.

Share this post


Link to post
Share on other sites

Hi!

 

I just have released a new NDN: http://forums.muxe.com/index.php?showtopic=3197.

 

Konsole (and many others) has one problem: moving the mouse into the konsole window stops the

keypress/release events... But, when moving it out everything works fine.

I will work on this, grabbing the complete keyboard f.ex. helps. :)

 

The ? on screen are probably due to the fact that NDN doesn't support UTF-8 yet.

If you hit CTRL-B, you should see all the characters used by NDN. You should also

see a lot of ? there.

 

As for the keyboard layout, I am not sure if this is a NDN issue. Maybe you can offer me

a test scenario for this? Switching between us and german layouts does work correctly in

NDN.

 

Hopefully you can use NDN now,

Stefan / AH

Share this post


Link to post
Share on other sites
HUNTER_bt    0

About the keyboard layout.

I use KDE 4.1 so it's might be related to it.

Some observation about this issue:

1. When I try to type russian, I get the text as if I was typing in english.

2. I can type german characters.

3. When I remove the english layout, I can type only german specific characters.

4. I can type russian in other programs and they are displayed properly.

 

Anyway the layout isn't a high priority now because it's impossible see the text in most cases anyway.

Though these issues don't affect me much as I use NDN mostly for working with files and as a configurable IDE.

 

 

About ignoring keypresses.

Konsole works fine for me but I have this problem with xterm.

Note: when "focus follows mouse" enabled(it's a KDE option), NDN never gets keypresses.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×