Re: sudo 4.6.4 Aborted
On domingo, 14 de maio de 2017 23:22:55 PDT Martin Měřinský wrote: > > we should fix the reason you run as root in the first place. > > > > > Because importing dives from DC doesn't work for me as a user. So > > > for > > > the short moment I run Subsurface as a root. > > > > > > I tried, what manual says, but it didn't work. > > > > > > sudo usermod -a -G dialout mermar > > > sudo usermod -a -G uucp mermar > > > > > > subsurface divelog.2017-04-10.xml > > > Insufficient privileges to open the device /dev/ttyUSB0 Suunto > > > (HelO2) > > > > Can you send us the output of > > > > ls -l /dev/ttyUSB0 > > crw-rw 1 root dialout 188, 0 kvě 15 08:21 /dev/ttyUSB0 And did you log out and then back in after running the usermod command? Check that the "id" command shows dialout. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Ratio iX3M connection fails
On 2017-05-15 05:13, Miika Turkia wrote: On Sun, May 7, 2017 at 10:22 AM, Jef Driesen wrote: On 07-05-17 07:07, Miika Turkia wrote: We have a bug report that iX3M download does not work after latest firmware update. Do you Jef (or anyone else) have ideas what is going on? https://github.com/Subsurface-divelog/subsurface/issues/387 The ix3m protocol doesn't support memory dumps. It will fail immediately with DC_STATUS_UNSUPPORTED with doing any communication. That's why the log file doesn't show anything useful. Instead of downloading a memory dump, just do a normal download with only the logfile checkbox enabled, and attach that logfile to the bug report. That should tell us more. Now we have a new log attached to the bug report. The loading ends with unexpected packet length... I received several similar reports. Apparently the new firmware changed the data format. The size of the samples changed from 0x36 bytes to 0xC0 bytes, and that causes the download to fail. I already patched a version of the dctool application available to fix the download part: http://libdivecomputer.org/builds/experimental/windows/ix3m.exe It's a command-line application which you need to run with these options: ix3m -v -l ix3m.log -f idive -m 0x24 download -f raw -o dive.%n.bin COM3 Send back the ix3m.log and (if present) all dive.*.bin files. I still need to figure out some way to detect the firmware version, to support both the old and new firmware. Can you tell me which version your ix3m has? And I also need to verify whether the parser needs any changes or not. Most likely the first 0x36 bytes of the new sample is backwards compatible and the extra data contains new info, but I don't know for sure. To verify that, I'll probably need the database of the ratio software to compare against. The Ratio applications stores its data as a set of xml files in a directory named "dives-divelogger" in the installation directory. (This might be different depending on the windows version you have.) Just zip the entire directory. Jef ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: sudo 4.6.4 Aborted
> we should fix the reason you run as root in the first place. > > > Because importing dives from DC doesn't work for me as a user. So > > for > > the short moment I run Subsurface as a root. > > > > I tried, what manual says, but it didn't work. > > > > sudo usermod -a -G dialout mermar > > sudo usermod -a -G uucp mermar > > > > subsurface divelog.2017-04-10.xml > > Insufficient privileges to open the device /dev/ttyUSB0 Suunto > > (HelO2) > > Can you send us the output of > > ls -l /dev/ttyUSB0 crw-rw 1 root dialout 188, 0 kvě 15 08:21 /dev/ttyUSB0 ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: sudo 4.6.4 Aborted
On domingo, 14 de maio de 2017 21:52:56 PDT Dirk Hohndel wrote: > Ah, apparently this is a Qt bug that was declared not a bug at some point > (you can find quite a few threads about this), and the way to work around > it is to implement your own Logger class and exit() instead of abort() > when you get a "Could not connect to display error". > > Not one of the more useful aspects of Qt, I'd like to add... Unfortunately, exit() is often harmful in C++ programs, since the global & atexit destructors are run, but the stack hasn't been unwound so objects in the main() function continue to exist. This breaks a number of assumptions about the order in which things are destroyed (namely, that it is the opposite in which they were constructed). Using _exit() might help, but it may bring its own set of problems. At least it's closer to the qFatal call that is there now. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: sudo 4.6.4 Aborted
On Mon, May 15, 2017 at 06:43:36AM +0200, Martin Měřinský wrote: > > New info: happens only with Wayland. Under X, it requests for -- > allow_run_as_root and with this option it works. I was going to ask you about that as that's the error I get. I wonder why you don't get that under Wayland... but realistically, we should fix the reason you run as root in the first place. > Because importing dives from DC doesn't work for me as a user. So for > the short moment I run Subsurface as a root. > > I tried, what manual says, but it didn't work. > > sudo usermod -a -G dialout mermar > sudo usermod -a -G uucp mermar > > subsurface divelog.2017-04-10.xml > Insufficient privileges to open the device /dev/ttyUSB0 Suunto (HelO2) Can you send us the output of ls -l /dev/ttyUSB0 that should tell us why you aren't able to open it. /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: sudo 4.6.4 Aborted
On Sun, May 14, 2017 at 09:43:49PM -0700, Dirk Hohndel wrote: > On Sun, May 14, 2017 at 09:32:45PM -0700, Thiago Macieira wrote: > > On domingo, 14 de maio de 2017 21:20:01 PDT Martin Měřinský wrote: > > > sudo subsurface divelog.xml > > > [sudo] password for mermar: > > > QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime- > > > root' > > > No protocol specified > > > QXcbConnection: Could not connect to display :0 > > > Aborted (core dumped) > > > > Your X server refused the connection. > > > > Best solution: don't use sudo. In fact, don't run Subsurface as root. > > > > Why were you trying this? > > Good question. > > But I'd like to point out that Subsurface shouldn't crash when it can't > open the display. I'll fix that part :-) Ah, apparently this is a Qt bug that was declared not a bug at some point (you can find quite a few threads about this), and the way to work around it is to implement your own Logger class and exit() instead of abort() when you get a "Could not connect to display error". Not one of the more useful aspects of Qt, I'd like to add... /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: sudo 4.6.4 Aborted
On Sun, May 14, 2017 at 09:32:45PM -0700, Thiago Macieira wrote: > On domingo, 14 de maio de 2017 21:20:01 PDT Martin Měřinský wrote: > > sudo subsurface divelog.xml > > [sudo] password for mermar: > > QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime- > > root' > > No protocol specified > > QXcbConnection: Could not connect to display :0 > > Aborted (core dumped) > > Your X server refused the connection. > > Best solution: don't use sudo. In fact, don't run Subsurface as root. > > Why were you trying this? Good question. But I'd like to point out that Subsurface shouldn't crash when it can't open the display. I'll fix that part :-) /D ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: sudo 4.6.4 Aborted
On Sun, 2017-05-14 at 21:32 -0700, Thiago Macieira wrote: > On domingo, 14 de maio de 2017 21:20:01 PDT Martin Měřinský wrote: > > sudo subsurface divelog.xml > > [sudo] password for mermar: > > QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to > > '/tmp/runtime- > > root' > > No protocol specified > > QXcbConnection: Could not connect to display :0 > > Aborted (core dumped) > > Your X server refused the connection. New info: happens only with Wayland. Under X, it requests for -- allow_run_as_root and with this option it works. > Best solution: don't use sudo. In fact, don't run Subsurface as root. > > Why were you trying this? Because importing dives from DC doesn't work for me as a user. So for the short moment I run Subsurface as a root. I tried, what manual says, but it didn't work. sudo usermod -a -G dialout mermar sudo usermod -a -G uucp mermar subsurface divelog.2017-04-10.xml Insufficient privileges to open the device /dev/ttyUSB0 Suunto (HelO2) Logout & login. subsurface divelog.2017-04-10.xml Insufficient privileges to open the device /dev/ttyUSB0 Suunto (HelO2) [0.82] ERROR: Permission denied (13) [in serial_posix.c:177 (dc_serial_open)] [0.000139] ERROR: Failed to open the serial port. [in suunto_vyper2.c:101 (suunto_vyper2_device_open)] Martin M. ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: sudo 4.6.4 Aborted
On domingo, 14 de maio de 2017 21:20:01 PDT Martin Měřinský wrote: > sudo subsurface divelog.xml > [sudo] password for mermar: > QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime- > root' > No protocol specified > QXcbConnection: Could not connect to display :0 > Aborted (core dumped) Your X server refused the connection. Best solution: don't use sudo. In fact, don't run Subsurface as root. Why were you trying this? -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
sudo 4.6.4 Aborted
Hi. In Ubuntu 17.04, running Subsurface under sudo (two displays setup) makes it fail. Without sudo it seems to work. subsurface --version Subsurface v4.6.4, built with libdivecomputer v0.6.0-devel-Subsurface- branch (b04f393b97fbc5762ac21b09df8e097f205ba0ec) sudo subsurface divelog.xml [sudo] password for mermar: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime- root' No protocol specified QXcbConnection: Could not connect to display :0 Aborted (core dumped) sudo gdb subsurface ... (gdb) run Starting program: /usr/bin/subsurface [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux- gnu/libthread_db.so.1". QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime- root' No protocol specified QXcbConnection: Could not connect to display :0 Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58 58 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x7016277f in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58 #1 0x7016437a in __GI_abort () at abort.c:89 #2 0x71277451 in () at /usr/lib/x86_64-linux- gnu/libQt5Core.so.5 #3 0x7fffdfdc305e in QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #4 0x7fffdfdc626e in QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**) () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #5 0x7fffe008730d in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so #6 0x7198f41d in QPlatformIntegrationFactory::create(QString const&, QStringList const&, int&, char**, QString const&) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #7 0x7199d77a in QGuiApplicationPrivate::createPlatformIntegration() () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #8 0x7199e20d in QGuiApplicationPrivate::createEventDispatcher() () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #9 0x71466def in QCoreApplicationPrivate::init() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #10 0x7199fc3f in QGuiApplicationPrivate::init() () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #11 0x74b05049 in QApplicationPrivate::init() () ---Type to continue, or q to quit--- x-gnu/libQt5Widgets.so.5 #12 0x5567562b in main () ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
Re: Ratio iX3M connection fails
On Sun, May 7, 2017 at 10:22 AM, Jef Driesen wrote: > On 07-05-17 07:07, Miika Turkia wrote: >> >> We have a bug report that iX3M download does not work after latest >> firmware update. Do you Jef (or anyone else) have ideas what is going >> on? >> >> https://github.com/Subsurface-divelog/subsurface/issues/387 > > > The ix3m protocol doesn't support memory dumps. It will fail immediately > with DC_STATUS_UNSUPPORTED with doing any communication. That's why the log > file doesn't show anything useful. Instead of downloading a memory dump, > just do a normal download with only the logfile checkbox enabled, and attach > that logfile to the bug report. That should tell us more. Now we have a new log attached to the bug report. The loading ends with unexpected packet length... miika ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface