After my intensive tests, I believe jCanvasES2.
Texture_Load_All can cause crash when starting the program.
01. File > New > Android [GUI] JNI Module [Lamw]
02. Put a
jImageList on the form
03. Put a
jCanvasES2 on the form
04. Set the property jCanvasES2_1.Images := jImageList1
05. Double the the jImageList1 (on the form)
06. Click "Add" to select and use the image
07. Put this code for jCanvasES2.
OnGLCreate:
procedure TAndroidModule1.jCanvasES2_1GLCreate(Sender: TObject);
begin
jCanvasES2_1.Texture_Load_All; // <--- This line cause runtime error
jCanvasES2_1.Shader_Compile('simon_Vert', 'simon_Frag');
jCanvasES2_1.Shader_Link;
end;
Compile the code, build the apk and run it. So far it won't crash. But the more code I add the more frequent it will crash on starting. For example, you can add some jButtons, a jTimer, etc.
Or you can use
glTest1 I submitted some days ago:
http://forum.lazarus.freepascal.org/index.php/topic,38777.msg264878.html#msg264878Remember, you need to add a jImageList, use/add an image and the code for jCanvasES2_1GLCreate to my glTest1 for testing. The error almost always reproducible.
Run the application and quit (using Back Button), do it repeatedly and you will get crash. The message is "Unfortunately, LamwGUIProject1 has stopped".
And one thing I'm sure is if I remove the line "
jCanvasES2_1.Texture_Load_All;", it will never crash.