GNOME Bugzilla – Bug 661317
Python plugins connected to the Loaded signal make gedit crash if there is an error when the doc is loaded
Last modified: 2019-03-23 20:49:54 UTC
I get a crash each time I open the db_mysql.php (attached) from FTP if the plugin SyncTex is activated. Some traces :
+ Trace 228725
Thread 5 (Thread 0x7fffdeada700 (LWP 4736))
Thread 1 (Thread 0x7ffff7fb68c0 (LWP 4727))
Thread 5 (Thread 0x7fffe2a9f700 (LWP 4789))
Thread 5 (Thread 0x7fffe2a9f700 (LWP 4967))
Thread 1 (Thread 0x7ffff7fb68c0 (LWP 4958))
Thread 1 (Thread 0x7ffff7fb68c0 (LWP 5156))
The Trace 228725 is wrong. I repost the 4 traces. Trace 1 :
+ Trace 228726
Trace 2 :
+ Trace 228727
Trace 3 :
+ Trace 228728
Trace 4 :
+ Trace 228729
Created attachment 198652 [details] db_mysql.php
I cannot reproduce when I try to edit db_mysql.php, can you explain the exacts steps for reproduce the bug.? I test with gedit git master version.
1) Run gedit (no plugin) 2) Enable SyncTex plugin 3) Open db_mysql.php file from FTP folder (from Nautilus) (tried with 2 differents FTP server) 4) Crash I do not have a crash when I open this file from a local folder. I dot not have a crash when the SyncTex plugin is not enabled. But when I open the file from FTP without SyncTex plugin, I get the message : There was a problem opening the file .... The file you opened has some invalid characters. If you continue edit this file you could corrupt this document. You can also choose another character encoding and try again. I get another crash with formulaire_inscription.php file from FTP and SyncTex plugin. I also get the message : There was a problem opening the file .... It seems I get the crash when Gedit could not detect the encoding when opening a file from FTP and SyncTex plugin activated. I use Gedit 3.2.0 on Archlinux 64 bits. I will try to reproduce the crash on another computer.
Created attachment 198696 [details] formulaire_inscription.php
I reproduce the same crash on another computer (Archlinux 64 bits). Same steps to reproduce. It seems only happen when gedit could not detect the encoding (most of the time with db_mysql.php file). Sometimes, gedit does not crash, the file opens and gedit do not display the message : There was a problem opening the file .... I use : - gedit 3.2.0 - gedit-plugins 3.2.0 - gtksourceview3 3.2.1 - gtk3 3.2.0 - pango 1.29.4 The trace :
+ Trace 228738
I also tried with other plugins. The crash only happens with the SyncTex plugin enabled. I use SyncTex plugin version 3.2.0. All others plugins do not crash gedit. And, I would precise, I use gvfs 1.10.0.
Hi, this is most certainly happen because I think I asumed that the file was local in the plugin, however, it is a bit strange as the plugin should not do anything if the file you are opening is not a LaTex file. I'll investigate further.
I have also tried to reproduce this bug on Fedora 16. Downstream bug : https://bugzilla.redhat.com/show_bug.cgi?id=750087 I get this trace :
+ Trace 228944
Thread 1 (Thread 0xb77c6880 (LWP 2158))
The problem seems to be in GTK+, not in gedit or SyncTex plugin.
Or maybe in glib. The tmem value of g_slice_alloc seems strange (0x7) in the trace 228944 :
+ Trace 228946
Maybe a bug in thread_memory_from_self ?
Another trace with G_SLICE=always-malloc :
+ Trace 228952
Thread 1 (Thread 0xb780f880 (LWP 8413))
any news for this report?
Created attachment 202425 [details] Capture with encoding detection problem
I tried this morning to reproduce this bug with the latest software available in Archlinux repositories. I tried to open the file (db_mysql.php) from FTP my current settings (SyncTex disable) and this is OK (but encoding can't be detected (see capture)). I activated the SyncTex plugin. I tried to open the file : crash. Version used : gedit : 3.2.3 gedit-plugins : 3.2.1 gtksourceview : 3.2.3 gtk : 3.2.2
By the last comment, it is clear that there is something wrong on the synctex plugin... the problem is that I can't reproduce. Do you get the same traces? Can you get a minimal file that can be shared (I am guessing this is related to the can't detect encoding issue) where you have the issue? Greetings
The trace is not consistent but I get a crash every time when the encoding detection is bad. The traces are similar to those in this report. I have produced a minimal crashing example file (minimal.txt). This is a very simple file containing a french e with an accent (e9 in hexadecimal in ISO-8859-1) followed by LF (0a) : xxd minimal.txt 0000000: e90a With this file, I get the encoding error (and crash) every time from a local folder. I hope this will help you.
Created attachment 202427 [details] minimal.txt
It is indeed very helpful. Thanks
Actually I fixed this issue for 3.0... Still not sure why it reappeared... Will look into it.
This has nothing to do with the gedit-latex plugin, reassigning.
The error paramater of the GeditDocument::loaded signal has been removed, and the synctex plugin has been adapted accordingly, so this bug should be fixed.