GLFW and v64 memory access violation
Monkey Targets Forums/Desktop/GLFW and v64 memory access violation| 
 | ||
| At version 60 it works, but the 64 will give this error. memory access violation in console ... (null) STOPPED Monkey Runtime Error : Memory access violation TRANS FAILED: TRANS Failed to execute 'MonkeyGame', return code=1073807364 Done. | 
| 
 | ||
| Raise a bug in the bug forum. | 
| 
 | ||
| In fact, that's a bug Rendering operations can only be performed inside OnRender | 
| 
 | ||
| Problem solved. Check that you have a false in #OPENGL_GLES20_ENABLED="false" | 
| 
 | ||
| What am I doing wrong? Again, this same error. 
'----------------------------------------------------------------  BUG ?
Import mojo
'Import reflection
'Mojo settings
#MOJO_HICOLOR_TEXTURES="true"
#MOJO_IMAGE_FILTERING_ENABLED="false"
'GLFW settings
#GLFW_WINDOW_TITLE="~qElectro Man Merry Christmass~q"
#GLFW_WINDOW_WIDTH=960
#GLFW_WINDOW_HEIGHT=640
#GLFW_WINDOW_RESIZABLE="false"
#GLFW_WINDOW_FULLSCREEN="false"
'XNA settings
#XNA_WINDOW_WIDTH=1248
#XNA_WINDOW_HEIGHT=768
#XNA_WINDOW_WIDTH_XBOX=640
#XNA_WINDOW_HEIGHT_XBOX=480
#XNA_WINDOW_WIDTH_PHONE=320
#XNA_WINDOW_HEIGHT_PHONE=480
#XNA_WINDOW_RESIZABLE="False"
#XNA_WINDOW_FULLSCREEN="False"
'IOS settings
#IOS_RETINA_ENABLED="True"
#IOS_ACCELEROMETER_ENABLED="True"
#IOS_DISPLAY_LINK_ENABLED="False"
'Android settings
#ANDROID_APP_LABEL="Electromon"
#ANDROID_APP_PACKAGE="com.terem.electromon"
#ANDROID_SCREEN_ORIENTATION="landscape"  'one of: user, portrait, landscape, behind, sensor, nosensor, unspecified
'OpenGL settings - valid for html5, glfw, android, ios
#OPENGL_GLES20_ENABLED="false"
#OPENGL_DEPTH_BUFFER_ENABLED="true"
'C++ settings - valid for glfw, ios, stdcpp
#CPP_INCREMENTAL_GC=1
#CPP_DOUBLE_PRECISION_FLOATS=0
#HTML5_SUSPEND_ON_BLUR_ENABLED="false"
Class MyGame Extends App
    Field FPS:Int = 20
	Field mg_sound21:Sound
	
    Method OnSuspend()
    End Method
    Method OnLoading()
    End Method
	Method OnCreate()
	
    mg_sound21=LoadSound("sound/x_death.wav")'+mg_soundFmt)
    PlaySound mg_sound21,0
	SetUpdateRate FPS			
	End
	
	Method OnUpdate()	
	End Method
	
	Method OnRender()
	End Method				
End
Function Main:Int()
	New MyGame
End
 | 
| 
 | ||
| Hi, It works here. If you run in debug mode, the debugger in Ted should at least show you where the error occurred... Is x_death.wav inside a 'sound' directory inside your app's data directory? Can you post a link to it? Also, note that app config settings are case sensitive, so #blah="True" and "False" should be "true" and "false" (this is getting fixed soon) although it worked as-is for me. | 
| 
 | ||
| TED is written in the console Monkey Runtime Error : Memory access violation D:/MonkeyPro60/modules/mojo/audio.monkey<69> D:/MonkeyPro60/bananas/teremochek/electromon/electromon_bug.monkey<52> D:/MonkeyPro60/modules/mojo/app.monkey<53> TRANS FAILED: TRANS Failed to execute 'MonkeyGame', return code=1073807364 Done. D:\MonkeyPro60\bananas\teremochek\electromon\electromon_bug.dara\sound\x_death.wav Thanks, now I see the error. But this is not all. This error in my game because I deleted it 
Import "extras/extras.${TARGET}.${LANG}"
And these lines were not working. #If TARGET="glfw" 'GLFW supports WAV only mg_soundFmt="wav" mg_musicFmt="wav" #Elseif ... Strange how to work without Extras so long. .... There is no error in this .. | 
| 
 | ||
| In this sample all works. But my game does not print the word "wav" Build folder is deleted, did not help. Any ideas? 
Import mojo
Import "extras/extras.${TARGET}.${LANG}"
Class MyGame Extends App
	Field mg_soundFmt:String
	Field mg_zoomX:Int
	
    Method OnSuspend()
    End Method
    Method OnLoading()
    End Method
	Method OnCreate()
	
#If TARGET="glfw"
  mg_soundFmt="wav"
  mg_zoomX=1234
#End
Print mg_soundFmt+" format "+mg_zoomX 
		
End
	
	Method OnUpdate()	
	End Method
	
	Method OnRender()
	End Method				
End
Function Main:Int()
	New MyGame
End
 | 
| 
 | ||
| It looks like a typo in the code, or a bug TED. | 
| 
 | ||
| I found it. here's the thing. ... #If TARGET="glfw" 'comment here ... 'Good if we fix these errors with refleñtion module. |