CE7 image 2.1 -> 2.2 -- OpenGL ES 2.0 crashes

I just loaded CE7 image 2.2 onto Apalis T30, from previous 2.1, and I see strange crashes on an OpenGLES2 application, that runs flawlessly on 2.1.

I have tried to remove code sections to slim it down, removing textures being loaded etc, if the reason would be “out of memory” errors. (Application loads ~10MB of textures, and allocates ~60MB of client memory).
Most of crashes appear to happen on the eglSwapBuffers() call, with no previous gl calls returning errors.

What changed in this new build to cause this? Nothing on your change list looks related to what I’m seing.

Reading this post

https://www.toradex.com/community/questions/28995/lvds-signal-flickers-when-dfs-is-enabled.html?smartspace=wince-tegra-t20-t30

the user seems to experience memory bandwidth issue, and thinking I may be experience that too, so I applied these changes:

  • BootupStyle reg key = 0x01 (LVDS only)
  • Disabled DFS, and set all clocks to max value
  • Disabled the dynamic core power-off, to behave like 2.1

My setup:

  • T30 1GB IT V1.1B
  • Application is C, built for CE7 on VS2008
  • Libraries: 2.3
  • CE7 SDK: 2.1
  • Custom board, only LVDS out. No network hardware.

The following bootloader settings were changed (on both 2.1 and 2.2):

ss.lvdsenable=1
ss.lvdsmode=1	 (single display)
ss.lvdsmap=1
ss.ldds=24

I activated Dr. Watson, and got the .kdmp file. But when opening it in VS2008, it only shows the disassembly.
I placed the dump file in same folder as PDB and EXE, but it still didn’t load any symbols.
Build options were default settings for a Debug build. What am I missing here?

I apologize for possibly asking two questions in one post, but they are somewhat related.

Thank You.

Ebbe

Raja,

Thank you for the reply. Please disregard #2, there is no flicker. The changes I applied was an attempt to minimize the changes in default DFS settings apparently made from 2.1 to 2.2.

Here is a bare-bones OGLES2 application that will duplicate the crash.

OGLESTestApp.zip

Zip file contains source (VS2008) and the executable, no external dependencies.
Also included is the crash log from the debug serial output, produced with this exact build.

Program creates four textures, three 256x256 and one 512x512, and displays them as four rotating squares.

How to duplicate:

  • Load V2.2 on Apalis T30 1GB IT 1.1B

  • Boot loader changes:

ss.lvdsenable=1
ss.lvdsmode=1
ss.lvdsmap=1
dbg.serial=1

  • Registry changes:

[HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\NVDDI]
“MainPanelBpp”=dword:00000020
“BootupStyle”=dword:00000001

(I also changed the default USB function to RNDIS, but it should be irrelevant)

  • Copy OGLESTestApp.exe over

  • Start the application. Exit with “Esc” key.
    Run it a second time. Exit.
    Run it a third time. OS crashes.
    Sometimes the serial debug does not output anything, other times you’ll see 4 exceptions.

I appreciate any inputs on this.
Thank You.

Ebbe

Dear @ebbe,

It looks like you found a BUG in one of our last changes we did to improve opengl performance in image 2.2.
We tested it a lot with other OpenGL applications but none was producing the usecase your was, especially when closing it and reopening it.

The good news is that i already have a fix, but unfortunately this requires that you update the image with 2.3b1 attached here:
nk_ce7

We will release this as an official version in a few weeks. In the meantime can you test it and confirm the problem is solved?

BTW: there is another little problem: you get an assert at eglInitialize()
This is not really relevant, but if you want to get rid of it, just use:

g_eglDisplay = eglGetDisplay((EGLNativeDisplayType)EGL_DEFAULT_DISPLAY);

instead of going through the hdc as this seems to generate the assert (maybe it’s because you Release it before eglInitialize() ?)

Thank you for fixing that bug. I can confirm that it fixed the issue in the test application.

But to circle back to my original post – I have an application that still crashes in V2.2, including 2.3b1. Runs perfectly fine in 2.1.

The crash happens at the same place where it brought down the OS in V2.2, in V2.3b1 I can restart the application any number of times – So I guess the errors could be related to the bug you found.

I get a consistent “EMEM_DEC_ERR by idxsrd @ 0x014eaeb0 (Status = 0x20000018)”. I also get a “Exception ‘Data Abort’ (0x4)” in libnvrm_graphics.dll+0x00001468, if it helps. I will do some more debugging to make sure I’m not doing something illegal.

Thank You.
Ebbe

Dear @ebbe,

Can you send me the test app that reproduces the issue? With the one you sent i cannot see any problems anymore.
The exe version without source is enough, if you cannot send the source.

Germano,

Is there any way I can send this private, without making the entire thread private? I’ll include source as well.

Thank You.
Ebbe

Dear @ebbe,

Please upload the source in https://share.toradex.com/ and send a mail to support@toradex.com with the heading of the community link. We will take care of internally.