Tryton - Issues

 

Issue7541

Title The Client is closed suddenly when attaching files
Priority bug Status chatting
Superseder Nosy List Timitos, angel, bernatnan, ced, pokoli, resteve, reviewbot
Type crash Components tryton
Assigned To Keywords GTK3, review
Reviews

Created on 2018-06-27.00:35:15 by bernatnan, last changed by ced.

Files
File name Uploaded Type Edit Remove
screenshot_001.jpg bernatnan, 2018-06-27.00:35:15 image/jpeg
unnamed bernatnan, 2018-06-27.09:58:03 text/plain
unnamed bernatnan, 2018-06-27.11:35:09 text/plain
Messages
msg43829 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-12.12:36:45
Even if it does not fix this issue, I created issue7691 to remove vfunc.
review66371002 updated at https://codereview.tryton.org/66371002/#ps1
msg43826 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-12.11:52:01
Indeed review53391002 does not fix it, I could reproduce the crash.
So I tried the other suggestion to replace vfunc by signal in review66371002. The code is simpler but I could still reproduce the crash.
msg43825 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-12.11:25:18
As suggested by https://gitlab.gnome.org/GNOME/pygobject/issues/254, here is review53391002 which seems to work. I could attached more the 50 rows while usually it fails between 2 and 20. But it is just a workaround, we should probably investigate the vfunc annotation.
New review53391002 at https://codereview.tryton.org/53391002/#ps1
msg43676 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-02.14:45:29
I tried to understand this error. I could reproduce it (especially on Windows) by creating attachment on the editable list view and selecting a file. This does not happen each time but it requires to repeat this operations many times.
I run with debug symbol on Gtk and GObject and I got this traceback:

#0  0x63c6b506 in g_type_check_instance_is_fundamentally_a (
    type_instance=type_instance@entry=0x6,
    fundamental_type=fundamental_type@entry=80)
    at ../../glib-2.56.2/gobject/gtype.c:4023
#1  0x63c4a44c in g_object_ref (_object=0x6)
    at ../../glib-2.56.2/gobject/gobject.c:3206
#2  0x710ce24b in gdk_event_copy () from C:\msys32\mingw32\bin\libgdk-3-0.dll
#3  0x63c6c0f6 in _g_type_boxed_copy (type=type@entry=59999912,
    value=value@entry=0x5471c90) at ../../glib-2.56.2/gobject/gtype.c:4298
#4  0x63c44143 in g_boxed_copy (boxed_type=59999912, src_boxed=0x5471c90)
    at ../../glib-2.56.2/gobject/gboxed.c:343
#5  0x6890c401 in gi-cpython-37m!PyInit__gi ()
   from C:\msys32\mingw32\lib\python3.7\site-packages\gi\_gi-cpython-37m.dll
#6  0x000000a3 in ?? ()
#7  0x660c4819 in ?? () from C:\msys32\mingw32\bin\libgirepository-1.0-1.dll
#8  0x05471c90 in ?? ()
#9  0x00000007 in ?? ()
#10 0x00000007 in ?? ()
#11 0x00000000 in ?? ()

So the gi try to make a boxed copy of an object which seems to be a GdkEvent. The copy fails because the event is not valid (the window attribute if 0x6 (which is unbound)).
I put a print statement in gdk_event_copy to see the type of the event. Each time it fails, the event is of a type which is not part of the enum. So it looks like memory junk.

I tried to find a place where such event could be instantiated but I could not find it.
msg42000 (view) Author: [hidden] (bernatnan) Date: 2018-07-01.13:39:17
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007ffff632ac07 in g_type_check_instance_is_fundamentally_a () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) 
(gdb) bt
#0  0x00007ffff632ac07 in g_type_check_instance_is_fundamentally_a () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1  0x00007ffff6309a7e in g_object_ref () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#2  0x00007ffff2cc6ef1 in gdk_event_copy () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#3  0x00007ffff6302ecb in g_boxed_copy () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4  0x00007ffff67a63fd in  () at /usr/lib/python2.7/dist-packages/gi/_gi.x86_64-linux-gnu.so
#5  0x00007ffff67aafd9 in  () at /usr/lib/python2.7/dist-packages/gi/_gi.x86_64-linux-gnu.so
#6  0x00007ffff67a6c64 in  () at /usr/lib/python2.7/dist-packages/gi/_gi.x86_64-linux-gnu.so
#7  0x00007ffff5ddbd6f in ffi_closure_unix64_inner () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#8  0x00007ffff5ddc136 in ffi_closure_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#9  0x00007fffed9d71f4 in gtk_cell_renderer_start_editing () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#10 0x00007fffed9cf4b9 in gtk_cell_area_activate_cell () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#11 0x00007fffed9cf9ed in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#12 0x00007fffedbfa794 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#13 0x00007ffff5ddbfce in ffi_call_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#14 0x00007ffff5ddb93f in ffi_call () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#15 0x00007ffff6305b4d in g_cclosure_marshal_generic_va () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff63051a6 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff63206df in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff6320e0f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007fffeda7d49c in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#20 0x00007ffff6307e68 in g_cclosure_marshal_VOID__BOXEDv () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff63051a6 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff63206df in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff6320e0f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007fffeda7a42e in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#25 0x00007fffeda7b97b in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#26 0x00007fffeda7e63e in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#27 0x00007fffeda4be81 in gtk_event_controller_handle_event () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#28 0x00007fffedc0ac2b in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#29 0x00007fffedac5c5b in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#30 0x00007ffff6304f6d in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007ffff6317ac8 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#32 0x00007ffff631fd8f in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#33 0x00007ffff6320e0f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#34 0x00007fffedc0ced4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#35 0x00007fffedac2cce in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#36 0x00007fffedac4da8 in gtk_main_do_event () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#37 0x00007ffff2cc6785 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#38 0x00007ffff2cf6fa2 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#39 0x00007ffff602b287 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007ffff602b4c0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007ffff602b7d2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007fffedac3e85 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#43 0x00007ffff5ddbfce in ffi_call_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#44 0x00007ffff5ddb93f in ffi_call () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#45 0x00007ffff67a8ea1 in  () at /usr/lib/python2.7/dist-packages/gi/_gi.x86_64-linux-gnu.so
#46 0x00007ffff67aab38 in  () at /usr/lib/python2.7/dist-packages/gi/_gi.x86_64-linux-gnu.so
#47 0x000055555563290e in PyObject_Call ()
#48 0x000055555564b6d3 in PyEval_EvalFrameEx ()
#49 0x0000555555646c7a in PyEval_EvalCodeEx ()
#50 0x000055555564edb4 in PyEval_EvalFrameEx ()
#51 0x0000555555646c7a in PyEval_EvalCodeEx ()
#52 0x000055555564edb4 in PyEval_EvalFrameEx ()
#53 0x0000555555646c7a in PyEval_EvalCodeEx ()
#54 0x0000555555646709 in PyEval_EvalCode ()
#55 0x000055555567771f in  ()
#56 0x0000555555672472 in PyRun_FileExFlags ()
#57 0x00005555556718ed in PyRun_SimpleFileExFlags ()
#58 0x0000555555620a2b in Py_Main ()
#59 0x00007ffff6e69a87 in __libc_start_main (main=0x555555620390 <main>, argc=2, argv=0x7fffffffe0a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe098) at ../csu/libc-start.c:310
#60 0x00005555556202aa in _start ()
msg41907 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-27.11:58:52
It is a little bit short. Are you sure you have all debugging symbols? And execute the 'bt' command?
msg41899 (view) Author: [hidden] (bernatnan) Date: 2018-06-27.11:35:10
>
> Then it should be traced under gdb to get the backtrace.
>

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007ffff632ac07 in g_type_check_instance_is_fundamentally_a () from
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0

PS: @bernatnan could you avoid posting legal notice on the bugtracker, this
> is a public service and such notice has no place here.

Yes. Sorry, I have see it too late.
msg41894 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-27.11:23:48
Then it should be traced under gdb to get the backtrace.


PS: @bernatnan could you avoid posting legal notice on the bugtracker, this is a public service and such notice has no place here.
msg41885 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-06-27.10:04:00
I've got the same error sometimes since version 4.8 but I do not have any steps to reproduce it.
msg41884 (view) Author: [hidden] (bernatnan) Date: 2018-06-27.09:58:03
2018-06-27 8:31 GMT+02:00 Cédric Krier <bugs@tryton.org>:

>
> Cédric Krier <cedric.krier@b2ck.com> added the comment:
>
> Please provide a traceback?
>

I had provided it. Only obtain a line of segmentation fault.

>
> PS: Do not add me on nosy list if I did not ask it.
>

Sorry again.

> ----------
> status: chatting -> need-eg
>
> ______________________________________
> Tryton issue tracker <bugs@tryton.org>
> <https://bugs.tryton.org/issue7541>
> ______________________________________
>

-- 

Bernat Brunethttp://www.NaN-tic.com
Telf: (+34) 935 531 803
http://twitter.com/nan_tichttp://www.nan-tic.com/blog

-------------------------------------------
Advertència Legal: aquest missatge i, en el seu cas, els fitxers
adjunts poden contenir informació privada
i/o confidencial. Si vostè no és el destinatari del missatge, si us
plau, elimini i notifiqui'ns-ho
immediatament, no el reenvii ni copi el seu contingut. Si us plau,
avisi'ns d'immediat si vostè o la seva
empresa no admeten la utilització del correu electrònic via internet
per a missatges d'aquest tipus.
NaN Projectes de Programari Lliure, S.L. no garanteix la
confidencialitat, integritat, rapidesa o correcte
recepció del present correu, ni es responsabilitza de possibles
perjudicis derivats de la captura,
incorporacions de virus o qualsevol altre manipulació efectuada per
tercers. No s'autoritza la utilització
amb finalitats comercials o per a la seva incorporació a fitxers
automatitzats de les direccions de
l'emissor o del destinatari.
La informació continguda en aquest missatge de correu electrònic és
confidencial i pot revestir el caràcter
de reservada. Està dirigida exclusivament a la persona destinatària.
L'accés o qualsevol us per part de
qualsevol altra persona, no estan autoritzats i poden esdevenir
il·legals. Si vostè no és la persona
destinatària, li preguem que procedeixi a esborrar-lo i a no fer-ne
cap us ni transmetre'l a tercers.
Si ho considera oportú pot avisar al remitent que el missatge ha
arribat a un destí no desitjat.
Advertencia Legal: este mensaje y, en su caso, los ficheros anexos
pueden contener información privilegiada
y/o confidencial. Si usted no es el destinatario del mensaje, por
favor, bórrelo y notifíquenoslo
inmediatamente, no lo reenvíe ni copie su contenido. Por favor,
avísenos de inmediato si usted o su empresa
no admite la utilización del correo electrónico vía internet para
mensajes de este tipo. Nan Projectes de
Programari Lliure, S.L. no garantiza la confidencialidad, integridad,
rapidez o correcta recepción del
presente correo, ni se responsabiliza de posibles perjuicios derivados
de la captura, incorporaciones de
virus o cualesquiera otras manipulaciones efectuadas por terceros. No
se autoriza la utilización con fines
comerciales o para su incorporación a ficheros automatizados de las
direcciones del emisor o del
destinatario.
La información contenida en este mensaje de correo electrónico es
confidencial y puede revestir el carácter
de reservada. Está dirigida exclusivamente a la persona destinataria.
El acceso o cualquier uso por parte
de cualquier otra persona, no están autorizados y pueden llegar a ser
ilegales. Si usted no es la persona
destinataria, le rogamos que proceda a borrarlo y no hacer ningún uso
de él ni transmitirlo a terceros.
Si lo considera oportuno puede avisar al remitente que el mensaje ha
llegado a un destino no deseado.
msg41882 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-27.08:31:24
Please provide a traceback?


PS: Do not add me on nosy list if I did not ask it.
msg41879 (view) Author: [hidden] (bernatnan) Date: 2018-06-27.01:16:30
More info:

OS: Debian unstable
gtk: 3.22.30-1
pygtk: 2.24.0-5.1+b1

The tryton is 4.8
changeset:   5727:0000a7014b42
msg41878 (view) Author: [hidden] (bernatnan) Date: 2018-06-27.00:49:51
The traceback that obtains is:

[1]    27026 segmentation fault  tryton/bin/tryton
msg41877 (view) Author: [hidden] (bernatnan) Date: 2018-06-27.00:35:15
When trying to attach any type of file in any module sometimes the client close suddenly. It happens when you double-click on the file.

Attach a screenshot to show the place where the client close.
History
Date User Action Args
2018-09-25 16:59:11cedsetassignedto: ced ->
2018-09-25 16:59:03cedsetreviews: 53391002 ->
2018-09-12 12:36:45cedsetstatus: in-progress -> chatting
reviews: 53391002,66371002 -> 53391002
messages: + msg43829
2018-09-12 11:52:54reviewbotsetmessages: + msg43827
2018-09-12 11:52:04cedsetstatus: testing -> in-progress
2018-09-12 11:52:01cedsetreviews: 53391002 -> 53391002,66371002
messages: + msg43826
2018-09-12 11:25:18cedsetstatus: chatting -> testing
assignedto: ced
messages: + msg43825
2018-09-12 11:24:08reviewbotsetnosy: + reviewbot
messages: + msg43824
2018-09-12 11:24:07reviewbotsetreviews: 53391002
keyword: + review
2018-09-02 14:45:29cedsetstatus: need-eg -> chatting
messages: + msg43676

Showing 10 items. Show all history (warning: this could be VERY long)