pure virtual function call error

BlitzMax Forums/BlitzMax Beginners Area/pure virtual function call error

hub(Posted 2006) [#1]
(maxgui)
i don't understand why bmax crash with this error (output window) :
runtime error R6025 - pure virtual function call

To reproduce the error. Right click and close the second window !

Many thanks for your help !




Scott Shaver(Posted 2006) [#2]
I don't get that error I do get a null pointer access error though:

	While WaitEvent()
	
			SetGraphics CanvasGraphics(canvas2)
				Cls
				SetColor 255,255,255
				DrawPixmap Tiles, 0,0
				Afficher_grille()
				
				SetColor 0,255,0

*********** DIES HERE *************
				DrawImage hImagePointeur, ox*32,oy*32
				
				SetColor 255,0,0
				DrawImage hImagePointeur, MapTileX*32,MapTileY*32
			
				SetColor 255,255,255
				DrawText "x=" + String(ox) + ",y=" + String(oy) ,0,0
				Flip


because hImagePointeur is null

where is the pointeur.png image?


Scott Shaver(Posted 2006) [#3]
okay added my own and now I get the error


Scott Shaver(Posted 2006) [#4]
I don't why but the problem is the freegadget win1 call, comment it out.

Function Fenetre_choix_tile()
...
			Case EVENT_WINDOWCLOSE
				'FreeGadget win1 
				Exit
....



Koriolis(Posted 2006) [#5]
That should be "FreeGadget win2", looks like the usual copy/paste error


hub(Posted 2006) [#6]


exit correctly from the win2 but now i've an crash error with the 'cls' line !!!!

SetGraphics CanvasGraphics(canvas)
cls <----- crash here !

RrrrrrrRRRRR.


degac(Posted 2006) [#7]
I red your program and I think the error is the fact you are freeing the windows. Try simply to Hide the window you don't need to use, because when you free it you lose all the gadget in it...(not tested anything at the moment)