EXW crash

new topic     » goto parent     » topic index » view thread      » older message » newer message

I'm getting a fairly consistent crash (EXW caused an invalid page 
fault in module KERNEL32.DLL at 0167:bff71459) under the following 
circumstances:

The application is a Japanese - English dictionary.

euGrid is used to display the data, of either the entire dictionary 
database or the results of a search.

As I scroll down through the list, on each row change the Japanese 
characters from one or two fields are written above the grid, using a 
16 x 16 bitmap font. I use repaintWindow to erase the previous 
character bitmaps (I can't just write over them, as there might be 
fewer characters than previous)

After scrolling through several dozen rows, thus having painted 
perhaps a few hundred bitmaps, the crash occurs.

A screensave of the application is here - 
http://www.welchaviation.org/carnarvon/euphoria/screensave.bmp
(over a megabyte).

The code to draw the characters is:

-- On any change, re-write the japanese text above the grid

-- See if the row has changed
cell_data = EGW_GetCurrentCell(self)
row = cell_data[ROW]
column = cell_data[COLUMN]
if row != old_row and row != -1 then
	-- changed focus to new row, re-write japanese text
	row_buffer = EGW_GetDataRow (self, row)
	if length(row_buffer[KANJI]) = 0 then
		to_write = row_buffer[KANA]
	else
		to_write = row_buffer[KANJI]
		& BJQ & row_buffer[KANA] & EJQ
	end if
		
	repaintWindow( Window2 )
	x = 1
	y = 1
	for i = 1 to length(to_write) by 2 do
		char_to_write = to_write[i] & to_write[i+1]
		makebitmap(char_to_write) -- expands the font data
		drawBitmap( Window2, hBitmap, x,y)
		x  += 16
	end for
	
	old_row = cell_data[ROW]
end if -- row had changed, so write Japanese chars above grid


I guess it's a resource problem, with memory being chewed up and not 
freed. I've looked in the archives, and see a few posts that touch on 
the issue, but none that directly seem to solve this problem.

Appreciate any advice.

Thanks,

-- 
Craig

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu