Bug 319947 - Crash - after Click to applie Grub2 Changes
Summary: Crash - after Click to applie Grub2 Changes
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_grub2 (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Konstantinos Smanis
URL:
Keywords:
: 318687 325718 345051 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-17 14:37 UTC by Lux
Modified: 2022-09-20 04:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
gdblog.txt (11.57 KB, text/plain)
2013-05-18 13:52 UTC, Lux
Details
dpkg-report (500.66 KB, text/plain)
2013-05-18 20:15 UTC, Lux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lux 2013-05-17 14:37:48 UTC
Application: systemsettings (1.0)
KDE Platform Version: 4.10.2
Qt Version: 4.8.4
Operating System: Linux 3.8.0-21-generic x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
I changed the Background of Grub2 and used the function to resize and set a Jpeg 
When I Click to applie the changes the Application crashes

.... Savepoint for the new Image was /boot/grub/<filename>

-- Backtrace:
Application: Systemeinstellungen (systemsettings), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f1e473a87c0 (LWP 3396))]

Thread 3 (Thread 0x7f1e2685a700 (LWP 3403)):
#0  0x00007f1e3d42c359 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f1e3d42c5e9 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f1e3d3ed0ac in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f1e3d3ed304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f1e44b40036 in QEventDispatcherGlib::processEvents (this=0x7f1e100008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007f1e44b1038f in QEventLoop::processEvents (this=this@entry=0x7f1e26859d90, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f1e44b10618 in QEventLoop::exec (this=this@entry=0x7f1e26859d90, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f1e44a12410 in QThread::exec (this=this@entry=0x25ed640) at thread/qthread.cpp:542
#8  0x00007f1e44af1edf in QInotifyFileSystemWatcherEngine::run (this=0x25ed640) at io/qfilesystemwatcher_inotify.cpp:256
#9  0x00007f1e44a14bec in QThreadPrivate::start (arg=0x25ed640) at thread/qthread_unix.cpp:338
#10 0x00007f1e3d8bff8e in start_thread (arg=0x7f1e2685a700) at pthread_create.c:311
#11 0x00007f1e443c7e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7f1e270a5700 (LWP 3405)):
#0  0x00007f1e443bb3cd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f1e3d3ed1dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f1e3d3ed6ba in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f1e16a274f6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f1e3d410eb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f1e3d8bff8e in start_thread (arg=0x7f1e270a5700) at pthread_create.c:311
#6  0x00007f1e443c7e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f1e473a87c0 (LWP 3396)):
[KCrash Handler]
#6  0x00007f1e44305037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f1e44308698 in __GI_abort () at abort.c:90
#8  0x00007f1e446f6e8d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007f1e446f4f76 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007f1e446f4fa3 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#11 0x00007f1e446f5226 in __cxa_rethrow () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x00007f1e44b10884 in QEventLoop::exec (this=this@entry=0x7fffbfddad40, flags=...) at kernel/qeventloop.cpp:218
#13 0x00007f1e44b15cf6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#14 0x00007f1e45773ffc in QApplication::exec () at kernel/qapplication.cpp:3828
#15 0x000000000040aa2e in main (argc=5, argv=0x7fffbfddafa8) at ../../../systemsettings/app/main.cpp:49

Possible duplicates by query: bug 318896, bug 318309, bug 316907, bug 316495, bug 316465.

Reported using DrKonqi
Comment 1 Jekyll Wu 2013-05-18 03:21:31 UTC
If the crash is reproducible, please follow the guide[1] and try to provide a better backtrace. 

[1]   http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_when_an_uncaught_exception_is_causing_a_crash
Comment 2 Lux 2013-05-18 13:52:56 UTC
Created attachment 79947 [details]
gdblog.txt

Hi, 

Here is the gdblog with the reproduced  error
Hope it helps

Lux



Am Samstag, 18. Mai 2013, 03:21:31 schrieben Sie:
> [1] and try to provide a
Comment 3 Konstantinos Smanis 2013-05-18 17:35:09 UTC
Hi,

thanks a lot for the log. Can you please specify the exact version of Ubuntu being used and of the package to try and reproduce this? Is this Ubuntu or some derivative? If so, is it version 0.5.8-0ubuntu2 from the official repositories?
Comment 4 Lux 2013-05-18 20:15:01 UTC
Created attachment 79957 [details]
dpkg-report

Hi, 

It is the new 13.04 Ubuntu itself, I send you a "dpkg -l" Report in 
Attachment.

LG 

Lux


Am Samstag, 18. Mai 2013, 17:35:09 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=319947
> 
> Konstantinos Smanis <konstantinos.smanis@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
> Resolution|BACKTRACE                   |WAITINGFORINFO
> 
> --- Comment #3 from Konstantinos Smanis <konstantinos.smanis@gmail.com> ---
> Hi,
> 
> thanks a lot for the log. Can you please specify the exact version of Ubuntu
> being used and of the package to try and reproduce this? Is this Ubuntu or
> some derivative? If so, is it version 0.5.8-0ubuntu2 from the official
> repositories?
Comment 5 Jekyll Wu 2013-05-21 03:17:11 UTC
update report status
Comment 6 Konstantinos Smanis 2013-06-01 20:41:17 UTC
Hello again, I can only crash the module when trying to save in a directory where the user doesn't have write-privileges (i.e. /boot/grub/).

- Can you try saving the output image in your home folder and see if the crash occurs?
- Also, if possible, run the module using 'kcmshell4 kcm_grub2' in a terminal and try and reproduce the crash as always (saving in a root-owned directory). This is just so that I can confirm that we are on the same page; the terminal output contains some extra info about the cause of the crash.

Unless I am mistaken, the cause of the crash is ImageMagick throwing an exception about being unable to write the file.

PS: Ubuntu in a VM is ssslow. What were they thinking with LLVMpipe being the fallback?
Comment 7 Konstantinos Smanis 2013-06-01 20:54:45 UTC
*** Bug 318687 has been marked as a duplicate of this bug. ***
Comment 8 Lux 2013-06-03 12:05:38 UTC
Hi, KDE-Team,

Am Samstag, 1. Juni 2013, 20:41:17 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=319947
> 
> Konstantinos Smanis <konstantinos.smanis@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED                 |CONFIRMED
>      Ever confirmed|0                           |1
> 
> --- Comment #6 from Konstantinos Smanis <konstantinos.smanis@gmail.com> ---
> Hello again, I can only crash the module when trying to save in a directory
> where the user doesn't have write-privileges (i.e. /boot/grub/).
 
> - Can you try saving the output image in your home folder and see if the
> crash occurs?

I tried to do so and got the same error,

> - Also, if possible, run the module using 'kcmshell4 kcm_grub2' in a
> terminal and try and reproduce the crash as always (saving in a root-owned
> directory). 

I tried to do so and to save in /etc/ (root owned) and /root/ (roots one) but 
in both cases the same crash occours.

> This is just so that I can confirm that we are on the same
> page; the terminal output contains some extra info about the cause of the
> crash.

Terminal-Output running "kcmshell4 kcm_grub2":

lux@Wismerhill:~$ kcmshell4 kcm_grub2
true 
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Magick::ErrorBlob'
  what():  Magick: unable to open image `/home/lux/Arbeitsfl�che/Lux-USB16/cube 
o tubes(1920x1200).jpg': Datei oder Verzeichnis nicht gefunden @ 
error/blob.c/OpenBlob/2638
KCrash: Application 'kcmshell4' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/lux/.kde/socket-Wismerhill/kdeinit4__0

[1]+  Angehalten              kcmshell4 kcm_grub2
lux@Wismerhill:~$ QSocketNotifier: Invalid socket 16 and type 'Read', 
disabling...

[1]+  Exit 253                kcmshell4 kcm_grub2
lux@Wismerhill:~$ 

> Unless I am mistaken, the cause of the crash is ImageMagick throwing an
> exception about being unable to write the file.
> 
> PS: Ubuntu in a VM is ssslow. What were they thinking with LLVMpipe being
> the fallback?

I didn't recognized that libllvm is installed! 
A short background of the machine the ubuntu is installed:
It is a MSI GT60 Bar-Metall installation, no VM. The main thing is that it is 
one of the new SandyBridge from Intel with a Nvidia 670(with optimus problem)
When i make an install of Ubuntu it was used in first stage bevor i integrated 
bumblebee with optirun and later primus.

Lux :-)
Comment 9 Konstantinos Smanis 2013-06-03 13:07:07 UTC
Hey Lux,

your crash is different from what I had in mind, but I managed to reproduce it too. Your crash is occured due to 'ä' in the 'Arbeitsfläche' folder. If you try using folders withoult umlaut I believe you won't get a crash. You should try to confirm this and if possible report back.
Comment 10 Lux 2013-06-04 08:52:32 UTC
Hi,

I tried your advice und used a Picture from /home/lux/something.png
and it worked, so the umlaute are the problem...
On the Debian system i used 2 years ago they didn't
had the problem, "Desktop" stays "Desktop" even in the German version
When i remember right!
By the way do you know who had the Idea to use the word "Arbeitsfläche"
Insted of e.g "Arbeitsplatz" which don't have any Umlaute in itself and pretty 
close enought means the same......

Thanks for the help!

Can you report and talk with the Ubuntu Team, this is not only an KDE Problem 
is an generall thing -> don't use special "types of characters" stay easy ...

Liebe Grüße

Phil[Lux]

Am Montag, 3. Juni 2013, 13:07:07 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=319947
> 
> --- Comment #9 from Konstantinos Smanis <konstantinos.smanis@gmail.com> ---
> Hey Lux,
> 
> your crash is different from what I had in mind, but I managed to reproduce
> it too. Your crash is occured due to 'ä' in the 'Arbeitsfläche' folder. If
> you try using folders withoult umlaut I believe you won't get a crash. You
> should try to confirm this and if possible report back.
Comment 11 Konstantinos Smanis 2013-06-04 09:00:27 UTC
Well, perhaps they could avoid non-Latin characters in the default folders but the user can always create such a folder. So the problem should be solved in a per-application basis, in this case it seems that Qt and ImageMagick use different encodings.

The bug is successfully triaged thanks to you, so now it's up to me to present a proper fix for both crashes. Thanks a lot for your efforts Phil!
Comment 12 Lux 2013-06-04 13:11:03 UTC
Hi,

The Thing with the encoding is a better idea, well at least it will welp the 
"Out of the Box" experience when any distro would avoid such special 
characters in default stuff till there will be a solution for every programm. 
I sucessfully put my mother as user on linux (ubuntu) she would have no Chance
to solve that.

Such problems will okkure always when there is such a mismatch in encoding and 
i'm for shure it will not be just a german "Umlaute" Problem, imagin. the 
Special characters in French:ćèê The list is as big as UTF-8 when i understand 
it right.

How something like this happen? What is a reason for using a different 
encoding? I m just curiouse :-)

Phil[Lux]

Am Dienstag, 4. Juni 2013, 09:00:27 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=319947
> 
> Konstantinos Smanis <konstantinos.smanis@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
> Status|CONFIRMED                   |ASSIGNED
> 
> --- Comment #11 from Konstantinos Smanis <konstantinos.smanis@gmail.com> ---
> Well, perhaps they could avoid non-Latin characters in the default folders
> but the user can always create such a folder. So the problem should be
> solved in a per-application basis, in this case it seems that Qt and
> ImageMagick use different encodings.
> 
> The bug is successfully triaged thanks to you, so now it's up to me to
> present a proper fix for both crashes. Thanks a lot for your efforts Phil!
Comment 13 Konstantinos Smanis 2013-06-04 21:46:02 UTC
ImageMagick expects strings using std::string (the string class defined in the standard C++ library). Qt on the other hand, and KDE as an extension, uses QString, a string class used universally within Qt. While converting from QString to std::string there was loss of information (in this case the umlaute). This was really my mistake, I never noticed this issue because I mostly use Latin-only filenames. In fact, there is a big fat warning in the developer's documentation about it:

"Returns a std::string object with the data contained in this QString. The Unicode data is converted into 8-bit characters using the toAscii() function.
This operator is mostly useful to pass a QString to a function that accepts a std::string object.
If the QString contains Unicode characters that the QTextCodec::codecForCStrings() codec cannot handle, using this operator can lead to loss of information."

In any case, I should have taken care of any exceptions thrown by ImageMagick, so that it would just fail, not crash the whole module. Sorry for the bit technical response, this issue will have been taken care of in the next release, whenever this will be.
Comment 14 Lux 2013-06-05 09:23:00 UTC
Hi,

Thanks for taking time to explain it to me, it's ok with  the technical stuff,
(when i was programming linenummbers were used "GOTO" in Basic ;-)
Right now, i just do a bit Shell.
... Ubuntu 13.04 updates the complete  KDE 4.10.2 to 4.10.3  right now, 
big pack (299 Packages at once)! 
Have a nice day :-)

Phil[Lux]


Am Dienstag, 4. Juni 2013, 21:46:02 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=319947
> 
> --- Comment #13 from Konstantinos Smanis <konstantinos.smanis@gmail.com> ---
> ImageMagick expects strings using std::string (the string class defined in
> the standard C++ library). Qt on the other hand, and KDE as an extension,
> uses QString, a string class used universally within Qt. While converting
> from QString to std::string there was loss of information (in this case the
> umlaute). This was really my mistake, I never noticed this issue because I
> mostly use Latin-only filenames. In fact, there is a big fat warning in the
> developer's documentation about it:
> 
> "Returns a std::string object with the data contained in this QString. The
> Unicode data is converted into 8-bit characters using the toAscii()
> function. This operator is mostly useful to pass a QString to a function
> that accepts a std::string object.
> If the QString contains Unicode characters that the
> QTextCodec::codecForCStrings() codec cannot handle, using this operator can
> lead to loss of information."
> 
> In any case, I should have taken care of any exceptions thrown by
> ImageMagick, so that it would just fail, not crash the whole module. Sorry
> for the bit technical response, this issue will have been taken care of in
> the next release, whenever this will be.
Comment 15 Konstantinos Smanis 2013-06-20 11:45:14 UTC
Git commit 5612e52fb0e3818cf2fe810d35b9d6c44a36e462 by Konstantinos Smanis.
Committed on 20/06/2013 at 11:37.
Pushed by ksmanis into branch 'master'.

Manage some ImageMagick crashes.

1. Do not crash when saving in a directory where we don't have write
   permissions.
2. Do not crash when using path names with non-ASCII characters.

M  +5    -2    src/convertDlg.cpp

http://commits.kde.org/kcm-grub2/5612e52fb0e3818cf2fe810d35b9d6c44a36e462
Comment 16 Konstantinos Smanis 2013-10-06 23:17:29 UTC
*** Bug 325718 has been marked as a duplicate of this bug. ***
Comment 17 Konstantinos Smanis 2013-10-12 14:53:27 UTC
The fix for this bug has been released in v0.6.4 [1]. All affected users should consider updating.

[1] http://ksmanis.wordpress.com/2013/10/12/grub2-editor-v0-6-4/
Comment 18 ivan 2015-03-12 10:22:11 UTC
*** Bug 345051 has been marked as a duplicate of this bug. ***