Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crash] iptux::DialogBase::AttachEnclosure: drag and drop text to the chat window #144

Closed
lidaobing opened this issue Feb 5, 2018 · 0 comments
Labels
Milestone

Comments

@lidaobing
Copy link
Member

lidaobing commented Feb 5, 2018

How to reproduce

  1. open iptux, and open a chat window
  2. select some text in terminal and drag it into the iptux chat window

what expected:

  1. text pasted in the chat window or nothing happened

what happend:
crashed as follows

$ ./src/main/iptux

(iptux:94437): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
[2018-02-06 01:47:47][iptux][WARN ]iptux/Application.cpp:184:onActiveWindowChanged:new active window 0x7ff5320a42b0
[2018-02-06 01:47:49][iptux][WARN ]iptux/Application.cpp:184:onActiveWindowChanged:new active window 0x7ff5320a42b0

(iptux:94437): Gtk-WARNING **: Allocating size to GtkFrame 0x7ff532872850 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?

(iptux:94437): Gtk-CRITICAL **: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed

(iptux:94437): GLib-GObject-WARNING **: gtype.c:4265: type id '0' is invalid

(iptux:94437): GLib-GObject-WARNING **: can't peek value table for type '<invalid>' which is not currently referenced
Segmentation fault: 11


(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x30)
  * frame #0: 0x00000001003d8899 libgtk-3.0.dylib`gtk_tree_model_get_valist + 301
    frame #1: 0x00000001003d8718 libgtk-3.0.dylib`gtk_tree_model_get + 197
    frame #2: 0x000000010001f02a iptux`iptux::DialogBase::AttachEnclosure(this=0x0000000108c44aa0, list=0x0000000000000000) at DialogBase.cpp:216
    frame #3: 0x000000010001f41a iptux`iptux::DialogBase::DragDataReceived(dlgpr=0x0000000108c44aa0, context=0x0000000101a033a0, x=52, y=66, data=0x00000001028b8d40, info=4294967293, time=0) at DialogBase.cpp:541
    frame #4: 0x00000001002e9fa6 libgtk-3.0.dylib`_gtk_marshal_VOID__OBJECT_INT_INT_BOXED_UINT_UINT + 107
    frame #5: 0x0000000100b4df8a libgobject-2.0.0.dylib`g_closure_invoke + 198
    frame #6: 0x0000000100b6145c libgobject-2.0.0.dylib`signal_emit_unlocked_R + 2347
    frame #7: 0x0000000100b61df2 libgobject-2.0.0.dylib`g_signal_emit_valist + 1816

(lldb) f 2
frame #2: 0x000000010001f02a iptux`iptux::DialogBase::AttachEnclosure(this=0x0000000108c44aa0, list=0x0000000000000000) at DialogBase.cpp:216
   213 	  totalsendsize = 0;
   214 	  gtk_tree_model_get_iter_first(model, &iter);
   215 	  do {  //遍历待发送model
-> 216 	    gtk_tree_model_get(model, &iter, 4, &file, -1);
   217 	    totalsendsize += file->filesize;
   218 	  } while (gtk_tree_model_iter_next(model, &iter));
   219

and if we set G_DEBUG=fatal-criticals, we'll see the first critical warnings as follows

(iptux:94294): Gtk-CRITICAL **: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed
Process 94294 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
    frame #0: 0x0000000100bbcf07 libglib-2.0.0.dylib`_g_log_abort + 22
libglib-2.0.0.dylib`_g_log_abort:
->  0x100bbcf07 <+22>: addq   $0x8, %rsp
    0x100bbcf0b <+26>: popq   %rbx
    0x100bbcf0c <+27>: popq   %rbp
    0x100bbcf0d <+28>: retq
Target 0: (iptux) stopped.
(lldb)  bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
  * frame #0: 0x0000000100bbcf07 libglib-2.0.0.dylib`_g_log_abort + 22
    frame #1: 0x0000000100bbcaa7 libglib-2.0.0.dylib`g_logv + 967
    frame #2: 0x0000000100bbc6c2 libglib-2.0.0.dylib`g_log + 120
    frame #3: 0x00000001003d888a libgtk-3.0.dylib`gtk_tree_model_get_valist + 286
    frame #4: 0x00000001003d8718 libgtk-3.0.dylib`gtk_tree_model_get + 197
    frame #5: 0x000000010001f02a iptux`iptux::DialogBase::AttachEnclosure(this=0x000000010159f9f0, list=0x0000000000000000) at DialogBase.cpp:216
    frame #6: 0x000000010001f41a iptux`iptux::DialogBase::DragDataReceived(dlgpr=0x000000010159f9f0, context=0x00000001028c4bc0, x=159, y=44, data=0x00000001028c8340, info=4294967293, time=0) at DialogBase.cpp:541
    frame #7: 0x00000001002e9fa6 libgtk-3.0.dylib`_gtk_marshal_VOID__OBJECT_INT_INT_BOXED_UINT_UINT + 107
    frame #8: 0x0000000100b4df8a libgobject-2.0.0.dylib`g_closure_invoke + 198
    frame #9: 0x0000000100b6145c libgobject-2.0.0.dylib`signal_emit_unlocked_R + 2347
    frame #10: 0x0000000100b61df2 libgobject-2.0.0.dylib`g_signal_emit_valist + 1816
    frame #11: 0x0000000100b625fc libgobject-2.0.0.dylib`g_signal_emit_by_name + 258
    frame #12: 0x000000010043149b libgtk-3.0.dylib`gtk_drag_get_data + 226
    frame #13: 0x00000001003bb108 libgtk-3.0.dylib`gtk_text_view_drag_drop + 156
    frame #14: 0x00000001002e461e libgtk-3.0.dylib`_gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT + 110
    frame #15: 0x0000000100b4df8a libgobject-2.0.0.dylib`g_closure_invoke + 198
...
(lldb) f 5
frame #5: 0x000000010001f02a iptux`iptux::DialogBase::AttachEnclosure(this=0x000000010159f9f0, list=0x0000000000000000) at DialogBase.cpp:216
   213 	  totalsendsize = 0;
   214 	  gtk_tree_model_get_iter_first(model, &iter);
   215 	  do {  //遍历待发送model
-> 216 	    gtk_tree_model_get(model, &iter, 4, &file, -1);
   217 	    totalsendsize += file->filesize;
   218 	  } while (gtk_tree_model_iter_next(model, &iter));
   219
(lldb) f 6
frame #6: 0x000000010001f41a iptux`iptux::DialogBase::DragDataReceived(dlgpr=0x000000010159f9f0, context=0x00000001028c4bc0, x=159, y=44, data=0x00000001028c8340, info=4294967293, time=0) at DialogBase.cpp:541
   538 	  }
   539
   540 	  list = selection_data_get_path(data);  //获取所有文件
-> 541 	  dlgpr->AttachEnclosure(list);
   542 	  g_slist_foreach(list, GFunc(g_free), NULL);
   543 	  g_slist_free(list);
   544 	  widget =

@lidaobing lidaobing changed the title [critical] drag and drop text to the chat window [crash] drag and drop text to the chat window Feb 6, 2018
@lidaobing lidaobing added this to the 0.8.0 milestone Feb 12, 2018
@lidaobing lidaobing changed the title [crash] drag and drop text to the chat window [crash] iptux::DialogBase::AttachEnclosure: drag and drop text to the chat window Mar 7, 2021
lidaobing added a commit that referenced this issue Mar 10, 2021
lidaobing added a commit that referenced this issue Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant