[Xbae-discuss] [ xbae-Bugs-932049 ] Crash on row height calculations during initialization
Brought to you by:
dannybackx
From: SourceForge.net <no...@so...> - 2004-04-09 07:54:17
|
Bugs item #932049, was opened at 2004-04-08 23:40 Message generated for change (Comment added) made by dannybackx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=401980&aid=932049&group_id=31337 Category: Bugs Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Danny Backx (dannybackx) Summary: Crash on row height calculations during initialization Initial Comment: Hi, I've had to make several changes to the latest Xbae (4.50.5+) for our software to not crash. These changes may or may not be helpful to integrate. I used IBM/Rational Purify to close in on some of the problems. /// file:src/Matrix.c /* SGO: need to recalculate new row positions & heights */ { int i; if (!new->matrix.row_heights_used) { /* create default array */ new->matrix.row_heights = #if 1 /* Need to allocate something as it will be freed */ (short*)XtMalloc(Max(1, new->matrix.rows) * sizeof(short)); new->matrix.row_heights[0] = ROW_HEIGHT(new); #else (short*)XtMalloc(new->matrix.rows * sizeof(short)); #endif xbaeFreeRowHeights(current); for (i=0; i<new->matrix.rows; i++) { new->matrix.row_heights[i] = ROW_HEIGHT(new); } } xbaeGetRowPositions(new); } ... static void Destroy(XbaeMatrixWidget mw) ... /* XmFontListFree(mw->matrix.font_list); */ mw->matrix.font_list = NULL; /* XmFontListFree(mw->matrix.label_font_list); */ mw->matrix.label_font_list = NULL; /// file:src/Methods.c /* SGO: changed adaption of VERT_ORIGIN() */ VERT_ORIGIN(mw) = xbaeMaxVertScroll(mw) - VSB_SLIDER_SIZE(mw); #if 1 /* Might not have any rows yet */ rows_visible = (0 < mw->matrix.rows) ? VISIBLE_HEIGHT(mw) / SOME_ROW_HEIGHT(mw, rows) : 0; #else /* VAN: force redraw of Matrix to cover expanded rows */ rows_visible = VISIBLE_HEIGHT(mw) / SOME_ROW_HEIGHT(mw, rows); #endif Hope that helps! ---------------------------------------------------------------------- >Comment By: Danny Backx (dannybackx) Date: 2004-04-09 09:54 Message: Logged In: YES user_id=39146 Applied your fixes. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=401980&aid=932049&group_id=31337 |