1. RE: Strange crash
- Posted by Phil Russell <pg_russell at lineone.net> Sep 12, 2002
- 401 views
Matt, A while ago I got a similar error with the line: GridTopRow[grid] -= GridDraw[grid][MAX_VISIBLE_ROWS] This gave me a page fault when processing a WM_VSCROLL on Win95 (but not on 98 or 2K). It went away when I amended it to: GridTopRow[grid] -= 0 GridTopRow[grid] -= GridDraw[grid][MAX_VISIBLE_ROWS] Similar assignments elsewhere in the code worked absolutely fine. Absolutely no idea why, though... Regards, Phil Russell Matthew Lewis wrote: > > I've been having this really strange crash, which I can't explain. It's > in > a function that's used as a callback for an ActiveX control. It crashes > on > this line (machine exception): > > rect[3..4] += rect[1..2] >
2. RE: Strange crash
- Posted by Bernie Ryan <xotron at bluefrognet.net> Sep 12, 2002
- 389 views
Matthew Lewis wrote: > > I've been having this really strange crash, which I can't explain. It's > in > a function that's used as a callback for an ActiveX control. It crashes > on > this line (machine exception): > > rect[3..4] += rect[1..2] > > but only in certain places: > > function IOleInPlaceSite_GetWindowContext( atom this, atom ppFrame, > atom ppDoc, atom lprcPosRect, atom lprcClipRect, atom lpFrameInfo ) > > sequence rect > integer obj_ix > atom pframe > > obj_ix = get_obj_from_this( this ) > > if not obj_ix then > poke4( ppFrame, 0 ) > poke4( ppDoc, 0 ) > poke4( lprcPosRect, repeat(0, 4 ) ) > poke4( lprcClipRect, repeat( 0, 4 ) ) > poke4( lpFrameInfo, repeat( 0, 5 ) ) > -- E_UNEXPECTED > return #800FFFF > end if > > rect = obj_table[OBJ_POS][obj_ix] > > -- ************************************************ > -- WORKS OK HERE > rect[3..4] += rect[1..2] > -- ************************************************ > > -- supply the pointer to IOleInPlaceFrame > pframe = find( IOleInPlaceFrame_b, interface_table[I_BYTES] ) > pframe = interface_table[I_THIS][pframe] > poke4( ppFrame, pframe ) > > -- ************************************************ > -- CRASHES HERE > --rect[3..4] += rect[1..2] > -- ************************************************ > > poke4( lprcPosRect, rect ) > poke4( lprcClipRect, rect ) > > -- Fill OLEINPLACEFRAME > poke4( lpFrameInfo, { 20, 0, obj_table[OBJ_PARENT][obj_ix], > 0, 0 } ) > return 0 > end function > > I haven't been able to duplicate this elsewhere, but it reminds me of > something where win32lib crashes if you call allocate before creating > controls (at least it did at one point). Has anyone else ever seen > this? > Have any ideas about what's causing it? Oh, I can also stop the crash > by > changing the line to > > rect[3] += rect[1] > rect[4] += rect[2] > > or printing or somehow referring to rect differently, or simply opening > up > the trace window. It's like it didn't properly allocate space correctly > or > something. > > Matt Lewis > > Matt: Did you try NOT using slicing math to see if this has something to do with the prroblem. rect[3] += rect[1] rect[4] += rect[2] OR rect[3] = rect[3] + rect[1] rect[4] = rect[4] + rect[2] Bernie
3. RE: Strange crash
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Sep 12, 2002
- 389 views
> From: Bernie Ryan [mailto:xotron at bluefrognet.net] > Matt: > > Did you try NOT using slicing math to see if this has something > to do with the prroblem. > > rect[3] += rect[1] > rect[4] += rect[2] > > OR > > rect[3] = rect[3] + rect[1] > rect[4] = rect[4] + rect[2] Yes, I had. The first method didn't work, but the second did. I just tried again, and using the original code, it works fine. I have trouble figuring out where exactly in the source these operations happen (+=), so if I have time, I may start inserting some debug print statements and recompile the interpreter. <SHRUG> Matt Lewis