Crash only on release

Monkey Targets Forums/Desktop/Crash only on release

Landon(Posted 2016) [#1]
I have a weird situation where the game runs fine in html5, and fine in glfw if debug is on, however the release version of glfw crashes after i click to the next screen (using diddy). So after my splash screen i do a fadetoscreen command into this one and it only works in html5 and glfw if debug mode is on, otherwise i get a MAV

Here the code in question.. i cannot seem to figure out what the problem is.

Class MainScreen Extends Screen
	Field widgets:WidgetManager
	Field button:ImageButton[3]
	Field Cursor:ScaledTouchPointer
	Field Logo:Image
	Method New()
		Cursor = New ScaledTouchPointer()
		name = "Title"
		widgets = New WidgetManager(Cursor)
    	button[0] = New ImageButton(20,200,256, 64, Cursor,GreenFont,LoadImage("graphics/bloodmenu.png",Image.MidHandle))
    	button[0].Text = "Start"
    	widgets.Attach(button[0]) 
    	Logo = LoadImage("splash.png")
	End
	
	Method Start:Void()
		
	End
	
	Method Render:Void()
		Cls
		DrawImage(Logo,0,0)
		widgets.RenderAll()
	End
	
	Method Update:Void()
		Cursor.Poll()
		widgets.PollAll()
		If button[0].hit Then
			FadeToScreen(levelSelScreen)
		End

	End
End	



Landon(Posted 2016) [#2]
ok so i've narrowed it down, it works fine if i FadetoScreen using the enter key, but if i click with the mouse i get a MAV


Landon(Posted 2016) [#3]
seems like anytime i use mousehit or mousedown it crashes in glfw in release mode now, i have no idea what i could have possibly done to F that up.