Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6917379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:43:23+00:00 2026-05-27T09:43:23+00:00

I’m trying to create video from images using OpenGL ES and ffmpeg, but on

  • 0

I’m trying to create video from images using OpenGL ES and ffmpeg, but on iPad(4.3) I have a crash on glReadPixels

-(NSData *) glToUIImage {

    int numberOfComponents = NUMBER_OF_COMPONENTS; //4
    int width = PICTURE_WIDTH; 
    int height = PICTURE_HEIGHT;

    NSInteger myDataLength = width * height * numberOfComponents;   

    NSMutableData * buffer= [NSMutableData dataWithLength :myDataLength];    

    [self checkForGLError]; 

    GLenum type = NUMBER_OF_COMPONENTS == 3 ? GL_RGB : GL_RGBA; //RGBA
    glReadPixels(0, 0, width, height, type, GL_UNSIGNED_BYTE, [buffer mutableBytes]);   //EXC_BAD_ACCESS here

    return buffer; 
}

It is working on iPhone 4 (4.3) and iPod Touch, but have problems on iPhone 3G(3.0) and iPad(4.3). Can you help me with this issue?

Also on iPhone 3G(3.0) and iPad(4.3) I have problems with Video – first 5-20 video frames have trash. Maybe issue with optimization? Or architecture?

EDITED
Stack:

#0  0x33be3964 in void BlockNxN<64ul, 16ul, 1, BLOCK_CONVERTER_NULL_32>(unsigned long, int, int, unsigned long, int, int, unsigned int, unsigned int, unsigned int, unsigned int) ()
#1  0x33be1c76 in glrBIFDetile ()
#2  0x33b586b2 in sgxGetImage(SGXImageReadParams const*) ()
#3  0x33b50d38 in gldReadPixels ()
#4  0x31813e16 in glReadPixels_Exec ()
#5  0x31e3c518 in glReadPixels ()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:43:23+00:00Added an answer on May 27, 2026 at 9:43 am

    I’ve figured out!!!

    I’ve fixing this issue about two weeks.

    You must call glReadPixels() before [(EAGLView *)eagleView presentFramebuffer];

    And so you must bind colorRenderbuffer before you will read pixels.
    Final method listing:

    int numberOfComponents = NUMBER_OF_COMPONENTS;
    int width = PICTURE_WIDTH;
    int height = PICTURE_HEIGHT;
    
    NSInteger myDataLength = width * height * numberOfComponents; 
    
    
    NSMutableData * buffer= [NSMutableData dataWithLength :myDataLength];
    glBindRenderbuffer(GL_RENDERBUFFER_OES, [((EAGLView *)eagleView) colorRenderbuffer]);
    [self checkForGLError];
    glPixelStorei(GL_PACK_ALIGNMENT, 4); // force 4 byte alignment
    
    glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, [buffer mutableBytes]);
    return buffer;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.