Bug 1369909

Summary: texstudio only starts as root
Product: [Fedora] Fedora Reporter: chris
Component: texstudioAssignee: hannes <johannes.lips>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: andrebrait, glenn.l.jenkins908, johannes.lips, jonas.k
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-08 16:46:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot of the adwaita style on the crashing installation
none
gdb backtrace none

Description chris 2016-08-24 16:57:51 UTC
Description of problem:
texstudio can only be started as root. 
if i start it as a regular user it fails without error on terminal.
in the journal i find the following errors

GLib-GObject-WARNING **: cannot register existing type 'GdkDisplayManager'
GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
GLib-GObject-WARNING **: invalid (NULL) pointer instance
GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
GLib-GObject-WARNING **: invalid (NULL) pointer instance
GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
GLib-GObject-WARNING **: cannot register existing type 'GdkDisplay'
GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed
GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

Version-Release number of selected component (if applicable):
texstudio-2.11.0-1.fc24.x86_64

How reproducible:
fresh fedora 24 installation with all current updates.
start texstudio

Steps to Reproduce:
1.
2.
3.

Actual results:
doesn't start

Expected results:
should start

Additional info:
problem is discussed here
https://ask.fedoraproject.org/en/question/89787/texstudio-only-runs-as-root-on-fedora-24/
but the *.ini file is not even created in my case. using a modified ini from a different system doesn't help.

Comment 1 chris 2016-08-24 16:59:14 UTC
here is the upstream bug that was rejected as it seems to be fedora only.

https://sourceforge.net/p/texstudio/bugs/1833/

Comment 2 chris 2016-08-24 17:14:13 UTC
strange enough, on a machine updated from fedora 21 up to fedora 24 texstudio is running just fine with the exception that i can not chose the adwaita style (compared to running it as root on the fresh installed system) so there are more differences.

maybe some leftover configurations of qt avoid the problem that texstudio is not starting?

Comment 3 hannes 2016-08-24 19:02:49 UTC
I don't really understand the last comment. Which Desktop Environment are you using and which style is selected in the copied over .ini file. Does this copied file have the same permissions?

Comment 4 chris 2016-08-24 20:43:20 UTC
gnome 3 standard fedora workstation installation. 
the selected style in the ini file was gtk+. yes it had the same permissions.

the last comment was:
I have 2 computer in my office. one has a new installation of fedora 24 and texstudio is unable to start as described above.
The other one was continuously upgraded over time from fedora ~20 to 24 and on this one i can use texstudio without a problem.

one difference though is, that i can not select the adwaita style on the latter machine. it is not even in the list (and i have no idea why. but maybe this is connected with this problem)

i was now able to start texstudio as describd in another post of the askfedora thread.
I downloaded the appimage of texstudio, deleted the .config folder of texstudio and started the appimage. afterwards I was able to start texstudio that was installed by the package manager.

Comment 5 hannes 2016-08-25 04:45:15 UTC
There is no possibility to select any special Gtk+ theme for a Qt application. So it's not an error, that there's no Adwaita in the list of texstudio. Great that it's working now, although I've no idea what's causing the issue.

Comment 6 hannes 2016-08-25 07:45:51 UTC
Could you please check if the following package is installed:
https://apps.fedoraproject.org/packages/qt5-qtstyleplugins
It would be even better if you could check if it's installed in the working and not installed in the failing installation.
Thanks a lot.

Comment 7 chris 2016-08-25 11:17:12 UTC
i made a screenshot to show you where i can select the adwaita style in the texstudio installation that won't start. this entry is not available on the other machine (where texstudio is starting fine) and the appimage.
It is the first dropdown under general settings.

qt5-qtsyleplugins is not installed on any of the machines.
at least that is what rpm -q qt5-qtsyleplugins says.

Comment 8 chris 2016-08-25 11:20:56 UTC
Created attachment 1193986 [details]
screenshot of the adwaita style on the crashing installation

this entry is only visible on the new installation of fedora 24 where texstudio fails to start.
also, if i select this style, texstudio freezes and won't start again.
deleting ~/.config/texstudio, starting the appimage that creates a new config folder makes it start again.

Comment 9 hannes 2016-08-25 11:30:40 UTC
Ok, well any theme, which is related to Gtk+ won't start, so both adwaita and gtk+ will not be an option as theme for texstudio. 
Could you please check if the following command will start texstudio, regardless of the initial setup:
QT_STYLE_OVERRIDE=gtk2 texstudio

Comment 10 chris 2016-08-25 11:56:57 UTC
with a deleted config folder i get:

(texstudio:2077): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplayManager'

(texstudio:2077): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(texstudio:2077): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

(texstudio:2077): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(texstudio:2077): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(texstudio:2077): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(texstudio:2077): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(texstudio:2077): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplay'

(texstudio:2077): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(texstudio:2077): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed

(texstudio:2077): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(texstudio:2077): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed


and then it hangs until killed.

Comment 11 hannes 2016-08-25 13:10:39 UTC
Thanks again for your patience. Would it be possible for you to provide us with a full backtrace with gdb. That would be really helpful. 

Please see https://fedoraproject.org/wiki/StackTraces#Obtaining_a_stack_trace_using_just_GDB

Comment 12 chris 2016-08-25 14:05:53 UTC
Created attachment 1194042 [details]
gdb backtrace

i followed the instructions given by the link.
the output is attached. Notice, that i had to interrupt (ctrl + c) the "execution" after the error messages mentioned earlier as the program did not terminate on its own.

Comment 13 Glenn L. Jenkins 2016-09-06 21:45:46 UTC
Working with a fresh install of Fedora 24 so had no existing working install to copy.

Initially tried to run as root and copy the .config/texstudio to my own .config/ directory, then change the owner and group. That didn't work.

I then ran it as root, changed the window manager to (default - i think, or something other than gtk+) then went though the same process. This seems to have worked, however, I did fiddle with other things in between (on of which might have worked). Could someone test this as a work around?

Comment 14 Jonas Kantic 2016-10-11 22:42:41 UTC
(In reply to Glenn L. Jenkins from comment #13)
> Working with a fresh install of Fedora 24 so had no existing working install
> to copy.
> 
> Initially tried to run as root and copy the .config/texstudio to my own
> .config/ directory, then change the owner and group. That didn't work.
> 
> I then ran it as root, changed the window manager to (default - i think, or
> something other than gtk+) then went though the same process. This seems to
> have worked, however, I did fiddle with other things in between (on of which
> might have worked). Could someone test this as a work around?

I had the same problem with texstudio on my fresh Fedora 24 installation.
I followed the steps mentioned by G. L. Jenkins and it worked well.
The only thing to mention is:
After you copied the /root/.config/texstudio directory to your own .config directory and before you start texstudio with your user account (not root), you have to kill all other texstudio processes that are running in the background, otherwise it wont start even with this workaround.

Comment 15 Andre Brait 2016-10-12 09:31:40 UTC
I can confirm that this workaround cited by G. L. Jenkins and Jonas Kantic works as they describe.

Comment 16 Andre Brait 2016-10-12 10:45:30 UTC
It seems it works as root because thebroot user uses a different GTK+ theme. It also looks like this was ok in Fedora 24 betas and only this bug only surfaced in the final release. Maybe investigating what changed GTK-wise between the two would reveal more of the reason why it happens. Changing the theme to default in the config files also work.

Comment 17 Fedora End Of Life 2017-07-25 22:37:49 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 18 Fedora End Of Life 2017-08-08 16:46:32 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.