changes of the coloring rules sometimes crashed as dissection keeps pointers to the color_filter for later reference -> simply deleting the filters leave the pointers invalid -> crash.

for now, don't delete the filters but keep them floating around in memory (leaking) -> at least better than crashing

svn path=/trunk/; revision=19421
This commit is contained in:
Ulf Lamping 2006-10-03 22:32:03 +00:00
parent ad50bdf507
commit 0da877169b
2 changed files with 11 additions and 11 deletions

View File

@ -190,7 +190,17 @@ void
color_filters_apply(GSList *cfl)
{
/* remove "old" entries */
color_filter_list_delete(&color_filter_list);
/* color_filter_list_delete(&color_filter_list);*/
/* deleting the color filters crashes unpredictably
* (e.g. sometimes while clearing the list) :-(
*
* for now, just clear the list and let the filters remain in memory
* until WS is closed -> memory leak
*
* XXX - move the filters to a "removed list" as before
* and delete them if the file is closed (or on rescan of packets or such?) */
color_filter_list = NULL;
/* clone all list entries from edit to normal list */
color_filter_list = color_filter_list_clone(cfl);

10
file.c
View File

@ -3068,16 +3068,6 @@ cf_select_packet(capture_file *cf, int row)
/* We don't need the columns here. */
cf->edt = epan_dissect_new(TRUE, TRUE);
/* colorize packet: coloring rules might be changed (removed) since last run,
recalculate now.
if packet is marked, use preferences, otherwise try to apply color filters */
if (fdata->flags.marked) {
fdata->color_filter = NULL;
packet_list_set_colors(row, &prefs.gui_marked_fg, &prefs.gui_marked_bg);
} else {
fdata->color_filter = color_filters_colorize_packet(row, cf->edt);
}
epan_dissect_run(cf->edt, &cf->pseudo_header, cf->pd, cf->current_frame,
NULL);