BlueBrain / RTNeuron

Interactive visualization framework for geometrically detailed neuron simulations
GNU General Public License v3.0
30 stars 10 forks source link

SWC parse error when showing detailed view in rtneuronApp #25

Closed alex4200 closed 5 years ago

alex4200 commented 5 years ago

On Ubuntu 18.04.1:

I am unable to see the detailed view. I cloned the whole sonata repository to be sure to have the up-to-date files, but when trying to open the 'Detailed' view from 300_cells I get the following error messages:

 12258 Unable to load data for neuron a2: Reading swc morphology file: /home/alex/Documents/AppImage/sonata/examples/shared_components/morphologies/Scnn1a_473845048_m.swc, parse error at line 4
 12258 Unable to load data for neuron a3: Reading swc morphology file: /home/alex/Documents/AppImage/sonata/examples/shared_components/morphologies/Rorb_325404214_m.swc, parse error at line 4
 12259 Unable to load data for neuron a4: Reading swc morphology file: /home/alex/Documents/AppImage/sonata/examples/shared_components/morphologies/Rorb_325404214_m.swc, parse error at line 4
hernando commented 5 years ago

I cannot reproduce this error, but I have a plausible explanation. I remember seeing that when a Qt application is created and the user locale is Spanish, the behavior of all the family of functions for converting strings into numbers changes and the decimal point becomes ','. Assuming your locale is German, you are probably experiencing the same issue. What makes it puzzling is that the conversion functions don't behave differently if Qt is not initialized. Try starting the AppImage prepending LANG=C in the command line and let me know if this error persists. If the problem is gone, we may considering enforcing the C locale (which is probably fine because internationalization was never considered in the design).

hernando commented 5 years ago

Could you test the workaround?

hernando commented 5 years ago

If the problem is what I think, PR #31 addresses this issue enforcing LANG=C

alex4200 commented 5 years ago

I tried the workaround, but it does not change anything as far as I can tell.

Also, my locale should be English and not German.

hernando commented 5 years ago

I have tried to reproduce this inside a Docker container with Ubuntu 18.04 and a fresh build of Brion (which is where the error is coming from). I also tried creating a Qt application before parsing to see if it could influence on strtod, but no success. Since I intend to upgrade my system to 18.04 anyway, I will try again with the whole thing, but I think the error is coming from something in you environment. Can you post the output of the command env?

alex4200 commented 5 years ago

Hi,

see below the output of env:

CLUTTER_IM_MODULE=xim LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=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:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=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:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=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:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36: LC_MEASUREMENT=fr_FR.UTF-8 LESSCLOSE=/usr/bin/lesspipe %s %s LC_PAPER=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 XDG_MENU_PREFIX=gnome- LANG=en_US.UTF-8 DISPLAY=:0 GNOME_SHELL_SESSION_MODE=ubuntu COLORTERM=truecolor DESKTOP_AUTOSTART_ID=104b22cc59c14e6884154817250638816700000012620007 USERNAME=alex XDG_VTNR=2 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path LC_NAME=fr_FR.UTF-8 XDG_SESSION_ID=2 USER=alex DESKTOP_SESSION=ubuntu QT4_IM_MODULE=xim TEXTDOMAINDIR=/usr/share/locale/ GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/1899ef8c_18b9_4312_8338_8a5eb31ea97f DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path PWD=/home/alex HOME=/home/alex TEXTDOMAIN=im-config SSH_AGENT_PID=1358 QT_ACCESSIBILITY=1 XDG_SESSION_TYPE=x11 XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop XDG_SESSION_DESKTOP=ubuntu LC_ADDRESS=fr_FR.UTF-8 LC_NUMERIC=fr_FR.UTF-8 GTK_MODULES=gail:atk-bridge WINDOWPATH=2 VTE_VERSION=5202 TERM=xterm-256color SHELL=/bin/bash QT_IM_MODULE=ibus XMODIFIERS=@im=ibus IM_CONFIG_PHASE=2 XDG_CURRENT_DESKTOP=ubuntu:GNOME GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GNOME_TERMINAL_SERVICE=:1.70 XDG_SEAT=seat0 SHLVL=1 LC_TELEPHONE=fr_FR.UTF-8 GDMSESSION=ubuntu GNOME_DESKTOP_SESSION_ID=this-is-deprecated LOGNAME=alex DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus XDG_RUNTIME_DIR=/run/user/1000 XAUTHORITY=/run/user/1000/gdm/Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin LC_IDENTIFICATION=fr_FR.UTF-8 SESSION_MANAGER=local/AlexLenovo:@/tmp/.ICE-unix/1262,unix/AlexLenovo:/tmp/.ICE-unix/1262 LESSOPEN=| /usr/bin/lesspipe %s GTK_IM_MODULE=ibus LC_TIME=frFR.UTF-8 =/usr/bin/env


From: Juan Hernando notifications@github.com Sent: Tuesday, January 22, 2019 16:53 To: BlueBrain/RTNeuron Cc: Dietz Alexander; Author Subject: Re: [BlueBrain/RTNeuron] SWC parse error when showing detailed view in rtneuronApp (#25)

I have tried to reproduce this inside a Docker container with Ubuntu 18.04 and a fresh build of Brion (which is where the error is coming from). I also tried creating a Qt application before parsing to see if it could influence on strtod, but no success. Since I intend to upgrade my system to 18.04 anyway, I will try again with the whole thing, but I think the error is coming from something in you environment. Can you post the output of the command env?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/BlueBrain/RTNeuron/issues/25#issuecomment-456450757, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMI7yygssg94-k_-FZv4g3xJwrPD1Hwlks5vFzPegaJpZM4Z5p7f.

hernando commented 5 years ago

As I was suspecting, the problem is in the locale. You have LC_NUMERIC=fr_FR.UTF-8, which is not German, but is French, so same problem. I have been able to reproduce your problem exporting that variable (and installing the locale library for glibc). I can also confirm that LANG=C doesn't solve anything. Try exporting LC_NUMERIC=C, that should fix it. I will apply the same fix to the AppImage and #31 instead of using LANG right now. Good that we followed up on this.