C++ opengl are 2.0 eglGetDisplay fails

Hello

I'm porting a C + c++ / OpenGl ES 2.0 game to the current API of the Playbook.  My problem is that, inside bbutil_init_egl, eglGetDisplay is EGL_NO_DISPLAY without defining any error:

int main(int argc, char *argv[]) {
    screen_context_t screen_cxt;

    //Initialize BPS library
    bps_set_verbosity(2);
    bps_initialize();

    screen_create_context(&screen_cxt, 0);
    if (EXIT_SUCCESS != bbutil_init_egl(screen_cxt, GL_ES_2, AUTO)) {
         fprintf(stderr, "bbutil_init_egl failed\n");

The log output is:

[BPS:INFO] Setting verbosity 2 BPS
[BPS:INFO] bps init
[BPS:INFO] BPS initialized successfully
[BPS:INFO] The initialization of the thread channels
Called channel_create (783852,1,0) [BPS:INFO]
Io_notifier_create (3526836,0) [BPS:INFO]
eglGetDisplay: successful function
bbutil_init_egl failed

No idea where to start debugging it?

I tried the same initialization code in a bare C++ application and does NOT see the problem here.  So maybe it's something in my settings of generation or manifesto or something?

Thank you

Follow-up:

I solved this problem, it seems to actually be related to a problem with static linking of my application.  I was compiling code to support such as static libraries and then connect to my final application.  When I removed the link static and just compiled all code support in the main project, this problem has disappeared!  Really weird.

Tags: BlackBerry Developers

Similar Questions

  • Mixture of stunts and OpenGL ARE

    I use bbndk - 10.0.4 - beta with a Dev Alpha device. I want to have a record of the user of Cascades interface on top of an OpenGL ES 2.0 window. The web page of the Cascades examples indicates that this is possible.

    To see if it worked, I adapted the HelloForeignWindow sample so that the child window is linked to an OpenGL ES 2.0 context. I have essentially merged with the HelloForeignWindow sample GLES20Template sample and adapted bbutil_init_egl() so that it calls:

    screen_create_window_type (& screen_win, screen_ctx, SCREEN_CHILD_WINDOW)

    Instead of screen_create_window().

    All code initialization RULES and screen_ * works very well and is called createForeignWIndow() that is triggered by an event from the user interface. Note that this means that the following code is running in a different thread from the code in HelloForeignWindowApp::run() where I want to do my rendering:

    bool HelloForeignWindowApp::createForeignWindow(const QString &group, const QString id, int x,
            int y, int width, int height)
    {
    
        QByteArray groupArr = group.toAscii();
        QByteArray idArr = id.toAscii();
    
        // You must create a context before you create a window.
        if (screen_create_context(&mScreenCtx, SCREEN_APPLICATION_CONTEXT) != 0) {
            returnfalse;
        }
    
              // Adaptation of normal bbutil_init_egl()
        if(bbutil_init_egl_child(mScreenCtx, idArr.constData(), idArr.length(), groupArr.constData(), groupArr.length()) != 0)
        {
        return false;
        }
    
        if(initializegl() != 0)
        {
        return false;
        }
        return true;
    }
    

    The problem is when I call glClear() from inside the HelloForeignWindowApp::run() , I get a crash because of error of segmentation:

    • Thread [10] (Suspended: Signal: SIGSEGV: Segmentation fault)
    • glClear() to 0x78009ee4
    • Render() to helloforeignwindowapp.cpp:275 0 x 104110
    • HelloForeignWindowApp::doNoise() to helloforeignwindowapp.cpp:306 0x1042fc
    • HelloForeignWindowApp::run() to helloforeignwindowapp.cpp:88 0 x 103908

    The segmentation fault made me suspect that OpenGL ES didn't like me it boot to a thread and call it in another thread. So I tried to put the initialization and the entire interior of the HelloForeignWindowApp::run (), which would now be called HelloForeignWindowApp::initForeignWindow (). Generating this error:

    • ApplicationPrivate::screenSupport: ERROR called from the thread interface user HelloForeignWindowApp (0xaf484)
    • ApplicationPrivate::screenSupport: ERROR called from the UI thread

    from the inside of the initForeignWindow () during the call to createForeignWindow(), although createForeignWindow() has not actually called before the error was raised.

    If you're still with me at this time, thank you! My questions are:

    • What is the right way to integrate an OpenGL window in the sample of HelloForeignWindow?
    • Why glClear() causes segfault during my first attempt?
    • On my second attempt, why the 'ERROR called from the UI thread' get fired?
    • Where is the documentation that I can study to understand the Cascades model more in detail of thread? (eg. How Application: exec() works exactly, how the: run() call is threaded etc..)

    Thanks a lot guys.

    PS I tried to attach a zipper of my project, but I can't find the option.

    Solved.

    After looking at your example, I changed my second attempt and I got, it works. The cause of the "Independent from the UI thread called ERROR" was the call to ForeignWindow::mainWindowGroupId() of in the HelloForeignWindowApp::run thread (). I put this in the constructor call, stored the QString resulting as a member and then makes any OpenGL initialization and screen wire HelloForeignWindowApp::run() as before.

    I think it is equivalent to the example of your provided in terms of thread.

    For people who want this example code, see examples of community of Cascades on the developers blog. Community Macadamian mixes stunts and OpenGL rendering.

    So it seems that the constructor is executed on the user interface thread "" in this case, which is a little confusing for me because it is called main(), and I thought that a characteristic of the Cascades was that the user interface has been made on the main thread by default.

        // We complete the transaction started in the app constructor and start the client event loop here...
        return Application::exec();
    }
    

    Can you explain this comment further or point me to a document that is in the configuration of threading for Cascades and how it decides what constitutes a "user interface thread?

  • OpenGL are VBO

    Hey guys,.
    I triead to find a VBO exporter for opengl, unfortunately I have not found one. So I made my own using 3d software called 'blender' and made a script to get a list of my top of the object and export it as ASCII file and copy it in my source code for java, but it was submitted to run correctly from the GL. Mode of TRIANGLES to the pointer in opengl vertex.
    All were very good, at least when I'm testing is with a simple model which have about 10 trines after I test with my model have about 8-900 trines, to say that I'll get the tops of 2-3000, and run my opengl application but the build process cause failed my cod file is too large (I am using eclipse and that's what eclipse printed in the console).

    I know no need to speed change have more polygons in the 3d scene that I had to have.
    Now, I don't have to how and what right. Any idea given on your part will be a pleasure.
    I thank.

    You hit this limit?  The size of a BlackBerry smartphone application

    Or is the error, because your individual Java class is too large?  If Yes, you can store these data in a file packaged with the application.

    Add plain text or binary files to an application

  • The installation cannot continue because some of the processes are running.  Installation failed

    When you try to install Acrobat Professional 11 the following came the installation cannot continue because some of the processes are running.


    Installation failed


    Setup has encountered an error that caused the installation to fail.


    Contact the manufacturer of the software.

    If the processes are listed, turn them off prior to launch the installation.  Usually, these processes are something running in the background and may include virus protection.  Here are some links that can help fill the background programs:

    Programs interfere with the Installation of fence
    ----------------------------------------------

    Task Manager - PC: (CTRL-ALT-DEL)

    http://support.Microsoft.com/kb/323527

    Mac - Activity Monitor:

    http://osxdaily.com/2010/08/15/Mac-Task-Manager/

  • All downloads are indicated as having failed but are still online.

    Whenever I have download a file and go to Downloads it shows the file failed, but the Firefox icon displays a download progress bar and the file will end if left alone. The real problem I encounter is that I have no idea how fast that downloads a file and I can't estimate when it will be finished.

    I'm tempted to reinstall Firefox and disabling all add-ons, but none of these worked.

    Thanks in advance.

    Thanks, I think that's the theme I was using. It was actually both, in the toolbar and in the downloads folder.

  • My username and password are filled correctly, but fail to enter the site. Why?

    Gites explainatory!

    Which site or sites are you talking about. Obviously you have connected to this site and posted a message with no problems. If this is the only site you encounter a problem with maybe the site is a problem or you need password resetyour.

  • Impossible to send e-mails, they are rejected with Postmaster failed message

    I HAVE A PERSISTENT PROBLEM PASS MY E.MAILS. THEY ARE NOT ACCEPTED AND THEY RETURNED WITH A POSTMASTER HAS NO MESSAGE.

    * original title - REJECTION OF the ENVOY E.MAILS. *.

    This does not mean that the message has been rejected, it means that the email address you tried to send that there was.

    Check your spelling, make sure shift caps lock is turned off just to be sure and see if you still get the message from the postmaster.

    If you get one more time, it could you copy and paste everything in the message from the administrator (but take anything as the subject line of the email that you have sent to your privacy)

  • I'm using CS5 and when I try to upgrade packages: Bridge, Fireworks and Photoshop are downloaded, but updates fail-why?

    I can spend the other CS5 components but not these three. What can I do to get these updates are processed on my 64-bit platform of Windows 8.1?

    When I go through all the steps: download, unpacking, etc. The bridge 4.0.5 and updates of Photoshop Camera Raw 6.7 cause bridge to run during the upgrade process that stops the update process!

  • All my files are gone [after a failed installation]

    I have an Adobe Photoshop CS5 Extended folder containing all data, including language files (for example Adobe Photoshop CS5 Extended\resources\Dictionary), but I don't have the program itself. So I tried to install it by clicking on the Setup, I had to key in an activation code, but I don't have the code, so I simply cancelled the installation. A few hours later, all the files have disappeared. Anyone know what happened?

    [Title edited for clarity... MOD]

    I can only GUESS that leave the installation program done is delete the folder

    If you indeed have a serial number, download other downloads

  • Are 3 TB hard drives, more likely to fail earlier that say a 2 TB

    My HARD drive failed just after 1,5 years was 3 TB. My friend says that 3 TB are more likely to fail at low capacity HARD drive. Does he know what he's talking about or he speaks right on his butt?

    I highly doubt that the standard warranty of 2-3 years (5 years on WD Black and other models of brands 'business') would be offered on 3XL readers if a 1.5 year lifetime was common.

    "" More hard drives lasted at least 3 I've heard.".

    -Yes! 3 years, at the least.

    "a corrupt sector."

    -While the bad sectors are a common cause of HARD drive failure, you can only guess why a HARD drive failed

    If a HARD drive can no longer be read/accessible.

    Discover - CrystalDiskInfo . It will scan your HARD drive and

    warn you of problems on the HARD drive. If all goes well, until they fail (if you run it quite often).

    .

  • How to access the information in the report of a pass/fail test?

    I'll call you a LabVIEW VIs of TestStand which are configured as ' pass/fail Tests. The result of the Boolean "PASS/FAIL" of LabVIEW indicator apparently are accessed through the variable RunState.SequenceFailed of TestStand. However, I can't find a similar TestStand variable that contains the information of 'Text of the report' of LabVIEW. Not such a variable exist, nor will it take to create a?

    Hi bmihura,

    The best approach would be to use direct information from the stage itself. You can get the text of the report of the RunState.Step.Result.Report text

    In this way, you go to the step text report directly.

    Alternatively, you can store the text of the report to a variable in the parameters of the step.

    I hope that gets things moving along to you!

    Kind regards

  • upgrade important downloads failing

    ' error ' b100 - something "is not available on the list in the Help window. Why so much of the important downloads fail?

    Hi catbren,

    1. What are the updates that fail to install?

    2. did you of recent changes on the computer?

    3. What is the full error message you receive when installing the updates?

    View update history to know which update is not installing.

    (a) open Windows Update by clicking Start , all programsand then click Windows Update.

    (b) in the left pane, click view update history.

    (c) to view more information about an update, double-click it.

    I suggest that you reset the Windows Update components and you try to install updates.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I have updates that are missing on Windows Server 2008, with 80248014 error.

    I have updates that fail on Windows Server 2008. Error 80248014 and here are a few updates failed install, KB955839 KB950050 KB952287 KB940157.

    Any information is appreciated!

    Thank you for your help in advance.

    http://TechNet.Microsoft.com/en-us/WindowsServer/bb430837.aspx

    Windows Server 2008

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

    Server Forums link is above.

    Here is the Vista Forums.

    See you soon. Mick Murphy - Microsoft partner

  • Safety poster Windows automatic updates is turned off, but they are on

    original title; Problems with automatic updates. Help, please.

    Security alerts Windows keeps advising me that I have automatic updates turned off even if I turned them on in the system menu. Security Center said, however, that they are turned off and fails to address the problem. I tried to run windows repair, but it has encountered an unexpected error and could not continue. I'm afraid that I have some types of malware on my computer and there is a security risk.

    Hi, Thatreallyawesomeguylololol,

    Start in safe mode with network.  Turn off the system restore to ensure that no malware hides in the restore points.

    http://support.Microsoft.com/kb/310405

    Download the tool from Microsoft.  Run a full scan.

    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&id=16

    Once you have determined, there is no malware or malicious software has been quarantined or deleted from your system, run the System File Checker.

    Right-click on the command prompt window and select run as administrator

    Type the following command:

    SFC/scannow

    Press enter

    Note: There is a space between SFC and / scannow

    Press start > run

    Type %windir%\Logs\CBS

    Press Ok

    Search for can't fix... and note files SFC is unable to repair (if applicable)

    Right-click on command prompt and select run as administrator

    Type the following command:

    CHKDSK /F /R

    Press enter

    You will receive a message about the disk must be locked.  When asked if you want to scan on reboot, press on Y and press enter

    Restart the computer

    The scan takes a few minutes and once completed, once the computer restarts, open the event viewer > Windows > application log. Look for Winninet to see the results of the analysis.

    Reset Windows Update

    Search for new updates

  • Security Center fails to notify.

    After forget to reactivate my Comodo firewall at least a week, I noticed that the Security Center did not warn me. I want that it notify me with the icon in the taskbar, it never appears. Security Center is enabled, the application window displays the status of my firewall and notification options are selected, but it fails to display the icon. I uninstalled Comodo firewall and Avast antivirus and rinse the WMI repository, still no icon. In addition, if start in safe mode and then back to the normal mode, the appearance style Office goes to Windows Classic. Never had these problems before. I have Win XP Media Center and in addition have Malwarebyte Anti-malware and SUPERAntispyware installed.

    Hi MadMatter,

    Step 1: We recommend that you cross check if the Security Center service is running on the computer. To do this, try the following steps:
    a. Click Start, click Run, type services.msc and click ok.
    b. in the list of services, double-click Security Center.
    c. change the startup type to automatic and click on the Start button.
    d. click ok to apply the changes.

    Step 2: Scanner of sfc (System File Checker) to see if any system file is missing or damaged. To do this, try the following steps:
    a. Click Start, click Run, type cmd and click ok.
    b. at the command prompt, type sfc/scannow and press ENTER.
    c. once the analysis is complete, restart the computer and check if the problem persists.

    Note: You will be asked to insert the Windows XP disk, if a file is missing.

    For more information, see Description of Windows XP System File Checker (Sfc.exe)

    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • How can I export my Inbox to Excel

    I want to filter all email on my Inbox addresses so that I can send an email to everyone telling them to stop using this email address. Problem is I don't have access tot Hat more and anyway - I would like to automate the process. How can I explore a

  • I don't seem to receive emails from confirmation of Mozilla, why?

    When I registered as a user and as a volunteer, I was informed that a confirmation email would be sent to my email address. It was yesterday and today. I checked both spam and there is no emails from Mozilla at all.

  • Cannot write DVD/RW and CD/RW on my new Slimline DVD-RAM

    Hi, I have added one slimline DVD - RAM Toshiba PA3231E-1DV1 http://be.computers.toshiba-europe.com/cgi-bin/ToshibaCSG/jsp/individualOptions.do?LNG=9&service=BE&ACTION=SHOW _ ATTRIBUTES & OPTION_ID = 44333 & tab = 1 #1in my Portoge M100. I can read a

  • How to use on the Satellite 2430-101 S-Video port?

    Hi all! I don't know if I'm in the right section... I have a second hand S Satellite 2430-101 and use Microsoft Windows XP. Unfortunately I can't use the s-video output, because I do not know, how should be done. Quite simply, do not attach the s-vid

  • HP Pavilion 15-p073TX: upgrade Windows 10

    I booked a free update to Windows 10 recently, but as it came for laptop with a Sound Enhancer 'Beats' Audio. I love this sound Enhancer but I wonder if "Beats Audio" would work after upgrade to Windows 10. Please help in this regard