#30 cssed-findinfiles-plugin 0.2 crashes

0.4.0
closed
5
2006-01-02
2005-12-25
No

Compiled from cvs, there are two problems:

1 - When no document is open and a directory is choosen to search
within files, the plugin floods the terminal with messages related to
copy.

2 - When a document is open and the base directory is choosen from
the open document, cssed crashes if the user clicks on a line in the
result editor if the search is not complete; below part of the crash
report:

Host Name: iMac
Date/Time: 2005-12-25 01:59:46.604 +0100
OS Version: 10.4.3 (Build 8F46)
Report Version: 3

Command: cssed
Path: /Volumes/FireWire3/sw/bin/cssed
Parent: launchd [1]

Version: ??? (???)

PID: 8742
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000005

Thread 0 Crashed:
0 libgtk-x11-2.0.0.dylib 0x011636b4 splay + 24 (icplusplus.c:
28)
1 libgtk-x11-2.0.0.dylib 0x011646c8 _gtk_sequence_ptr_next +
36 (icplusplus.c:28)
2 libgtk-x11-2.0.0.dylib 0x0110be98 gtk_list_store_iter_next +
184 (icplusplus.c:28)
3 libgtk-x11-2.0.0.dylib 0x0121d594 gtk_tree_view_expose +
4044 (icplusplus.c:28)
4 libgtk-x11-2.0.0.dylib 0x01112e68
_gtk_marshal_BOOLEAN__BOXED + 208 (icplusplus.c:28)
5 libgobject-2.0.0.dylib 0x014510d4 g_closure_invoke + 352
(icplusplus.c:28)
6 libgobject-2.0.0.dylib 0x01464238 signal_emit_unlocked_R +
3248 (icplusplus.c:28)
7 libgobject-2.0.0.dylib 0x0146555c g_signal_emit_valist + 2128
(icplusplus.c:28)
8 libgobject-2.0.0.dylib 0x01465998 g_signal_emit + 48
(icplusplus.c:28)
9 libgtk-x11-2.0.0.dylib 0x012436a8 gtk_widget_event_internal
+ 716 (icplusplus.c:28)
10 libgtk-x11-2.0.0.dylib 0x01111198 gtk_main_do_event +
1548 (icplusplus.c:28)
11 libgdk-x11-2.0.0.dylib 0x0072c4e8
gdk_window_process_updates_internal + 348 (icplusplus.c:28)
12 libgdk-x11-2.0.0.dylib 0x0072c5b0
gdk_window_process_all_updates + 136 (icplusplus.c:28)
13 libgtk-x11-2.0.0.dylib 0x0106b9c4 gtk_container_idle_sizer +
268 (icplusplus.c:28)
14 libglib-2.0.0.dylib 0x014c1980 g_main_context_dispatch +
876 (icplusplus.c:28)
15 libglib-2.0.0.dylib 0x014c21c8 g_main_context_iterate + 1380
(icplusplus.c:28)
16 libglib-2.0.0.dylib 0x014c2584 g_main_loop_run + 812
(icplusplus.c:28)
17 libgtk-x11-2.0.0.dylib 0x0111092c gtk_main + 216
(icplusplus.c:28)
18 cssed 0x00002fd4 main + 340 (main.c:348)
19 cssed 0x000026b8 _start + 340 (crt.c:272)
20 cssed 0x00002560 start + 60

Thread 1:
0 libSystem.B.dylib 0x9001422c read + 12
1 libSystem.B.dylib 0x9001ab48 _sread + 40
2 libSystem.B.dylib 0x9001aabc __srefill + 376
3 libSystem.B.dylib 0x90035698 __srget + 24
4 libSystem.B.dylib 0x9005ab10 fgetc + 80
5 findinfiles.so 0x01be3fa8 getline + 112 (callbacks.c:67)
6 findinfiles.so 0x01be4970 fif_search_proc + 520
(callbacks.c:375)
7 libglib-2.0.0.dylib 0x014ed640 g_thread_create_proxy + 356
(icplusplus.c:28)
8 libSystem.B.dylib 0x9002b200 _pthread_body + 96

Discussion

  • Iago Rubio

    Iago Rubio - 2005-12-26

    Logged In: YES
    user_id=910507

    > 1 - When no document is open and a directory is choosen to
    > search within files, the plugin floods the terminal with
    > messages related to copy.

    Unable to reproduce this one. Could you please post those
    messages here ?

    > 2 - When a document is open and the base directory is
    > choosen from the open document, cssed crashes if the
    > user clicks on a line in the result editor if the search
    > is not complete; below part of the crash report:

    Also, unable to reproduce this one :/

    Those actions, to write the matches, and to move to a given
    document line by reading the ouput on the list, are made by
    separate threads.

    The proccess that's failing is the main one, not the search
    thread, somewhere deep on the gtk main loop.

    Does it happens always ?

    Did you tried on diferent directories ?

    It will be easy to protect the list to be clicked on OsX
    until the search proccess ends, but it may be quite anoying
    in long searches.

    Have you updated you gtk lately ?

    What's its version ?

     
  • Anonymous - 2005-12-26

    Logged In: YES
    user_id=552580

    >> 1 - When no document is open and a directory is choosen to
    >> search within files, the plugin floods the terminal with
    >> messages related to copy.

    >Unable to reproduce this one. Could you please post those
    >messages here ?

    The messages do not come immediately, you have to wait a bit, say 11
    seconds at least on my computer; and they are for example:

    grep: copie/.DS_Store: No such file or directory
    grep: copie/doxydoc.txt: No such file or directory
    grep: copie/Doxyfile: No such file or directory
    grep: copie/footer.txt: No such file or directory
    grep: copie: No such file or directory
    grep: 1/.DS_Store: No such file or directory
    grep: copie: No such file or directory
    grep: 1/doxydoc.txt: No such file or directory
    grep: copie: No such file or directory
    grep: 1/Doxyfile: No such file or directory
    grep: copie: No such file or directory
    grep: 1/footer.txt: No such file or directory

    when searching for string cssed in the directory above cssed tree from cvs
    with 2 level deepness.

    The more I think about it, the more it seems related to the fact that some
    directories have spaces in their names, which is quite common on Mac. Then
    the name is splitted in two parts and obviously no match is found.

    > 2 - When a document is open and the base directory is
    > choosen from the open document, cssed crashes if the
    > user clicks on a line in the result editor if the search
    > is not complete; below part of the crash report:

    Yes, it is fully reproducible in any directory as long as the search lastes
    sufficiently to allow to click on a line before the search comes to an end.
    One way to reproduce it is either to open many applications at the same time,
    or to choose a string which occurs many many times in a directory where
    there are a lot of files .

    Today I've got bus errors and three threads involved:

    Exception: EXC_BAD_ACCESS (0x0001)
    Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000004

    Thread 0 Crashed:
    0 libgtk-x11-2.0.0.dylib 0x01151f78 _gtk_rbtree_next + 136
    (icplusplus.c:28)
    1 libgtk-x11-2.0.0.dylib 0x0121d578 gtk_tree_view_expose + 4016
    (icplusplus.c:28)
    2 libgtk-x11-2.0.0.dylib 0x01112e68 _gtk_marshal_BOOLEAN__BOXED
    + 208 (icplusplus.c:28)
    3 libgobject-2.0.0.dylib 0x014510d4 g_closure_invoke + 352 (icplusplus.c:
    28)
    4 libgobject-2.0.0.dylib 0x01464238 signal_emit_unlocked_R + 3248
    (icplusplus.c:28)
    5 libgobject-2.0.0.dylib 0x0146555c g_signal_emit_valist + 2128
    (icplusplus.c:28)
    6 libgobject-2.0.0.dylib 0x01465998 g_signal_emit + 48 (icplusplus.c:28)
    7 libgtk-x11-2.0.0.dylib 0x012436a8 gtk_widget_event_internal + 716
    (icplusplus.c:28)
    8 libgtk-x11-2.0.0.dylib 0x01111198 gtk_main_do_event + 1548
    (icplusplus.c:28)
    9 libgdk-x11-2.0.0.dylib 0x0072c4e8
    gdk_window_process_updates_internal + 348 (icplusplus.c:28)
    10 libgdk-x11-2.0.0.dylib 0x0072c5b0
    gdk_window_process_all_updates + 136 (icplusplus.c:28)
    11 libgtk-x11-2.0.0.dylib 0x0106b9c4 gtk_container_idle_sizer + 268
    (icplusplus.c:28)
    12 libglib-2.0.0.dylib 0x014c1980 g_main_context_dispatch + 876
    (icplusplus.c:28)
    13 libglib-2.0.0.dylib 0x014c21c8 g_main_context_iterate + 1380
    (icplusplus.c:28)
    14 libglib-2.0.0.dylib 0x014c2584 g_main_loop_run + 812 (icplusplus.c:
    28)
    15 libgtk-x11-2.0.0.dylib 0x0111092c gtk_main + 216 (icplusplus.c:28)
    16 cssed 0x00002fd4 main + 340 (main.c:348)
    17 cssed 0x000026b8 _start + 340 (crt.c:272)
    18 cssed 0x00002560 start + 60

    Thread 1:
    0 libSystem.B.dylib 0x9001422c read + 12
    1 libglib-2.0.0.dylib 0x014bec6c child_watch_helper_thread + 88
    (icplusplus.c:28)
    2 libglib-2.0.0.dylib 0x014ed640 g_thread_create_proxy + 356
    (icplusplus.c:28)
    3 libSystem.B.dylib 0x9002b200 _pthread_body + 96

    Thread 2:
    0 libSystem.B.dylib 0x9001422c read + 12
    1 libSystem.B.dylib 0x9001ab48 _sread + 40
    2 libSystem.B.dylib 0x9001aabc __srefill + 376
    3 libSystem.B.dylib 0x90035698 __srget + 24
    4 libSystem.B.dylib 0x9005ab10 fgetc + 80
    5 findinfiles.so 0x01be3fa8 getline + 112 (callbacks.c:67)
    6 findinfiles.so 0x01be4970 fif_search_proc + 520 (callbacks.c:
    375)
    7 libglib-2.0.0.dylib 0x014ed640 g_thread_create_proxy + 356
    (icplusplus.c:28)
    8 libSystem.B.dylib 0x9002b200 _pthread_body + 96

    I noticed also that the grep process consume about 45% of cpu, and may goes
    up to 75%. That may explain the crash.

    gtk is version 2.6.10 at the moment. It has been updated in August or so.

     
  • Iago Rubio

    Iago Rubio - 2005-12-30

    Logged In: YES
    user_id=910507

    Could you please try CVS and comment on it ?

    I've fixed the white space in directory name issue, and made
    insensitive the results window meanwhile the search is not
    completed.

    Thanks in advance for your review.

     
  • Anonymous - 2006-01-01

    Logged In: YES
    user_id=552580

    The crash issue is solved, making impossible to click on a line meanwhile the
    search is not complete.

    But the white space in directory name issue is still here. A problem of encoding?

     
  • Iago Rubio

    Iago Rubio - 2006-01-02

    Logged In: YES
    user_id=910507

    > But the white space in directory name issue is still here.
    > A problem of encoding?

    No, a problem of being so dumb to code without the right
    cafeine levels :)

    I took a bougus approach escaping the directory passed to
    find, not the find results.

    I've commited a fix on cvs, but it'll require the -0 switch
    on xargs.

    Could you please try it ?

    May be better to first check in the xargs man page if xargs
    have the -0 switch on OsX - it's the number 0 not a letter O.

    I didn't see this failure because on Linux because this
    switch is used. I'm unsure why I did not used it on Mac, but
    I suposse that's just because I forgot to do it.

    If xargs -0 does not work, it can be solved with sed, but it
    will add another dependency to this plugin.

     
  • Anonymous - 2006-01-02
    • status: open --> closed
     
  • Anonymous - 2006-01-02

    Logged In: YES
    user_id=552580

    I've removed the last conditional on Darwin, since -xargs0 implies -xprint0, and
    combination of both works on Mac OS X.

    I've committed changes in cvs, see mail on cssed-dev with changes.

    So, now, all seems fine.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks