Your message dated Thu, 22 Nov 2012 20:56:49 +0100
with message-id <874nkhqum6....@turtle.gmx.de>
and subject line Unichrome driver removed in Mesa 8.0
has caused the Debian Bug report #447849,
regarding via_tex.c:428: viaSwapOutWork: Assertion 'sz == 
vmesa->total_alloc[heap]' failed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
447849: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447849
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libgl1-mesa-dri
Version: 6.5.1-0.6


When using a program that calls glCallLists, or glReadPixels, or glDrawPixels, 
the following message is printed and the program aborted:

----------
deb4-sbc:/mnt/nfs/opengl# gdb ./glmeter
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library 
"/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) r
Starting program: /mnt/nfs/opengl/glmeter
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1214355776 (LWP 2392)]
glmeter: via_tex.c:428: viaSwapOutWork: Assertion `sz == 
vmesa->total_alloc[heap]' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread -1214355776 (LWP 2392)]
0xb7ef1410 in ?? ()
(gdb) where
#0  0xb7ef1410 in ?? ()
#1  0xbfc98a18 in ?? ()
#2  0x00000006 in ?? ()
#3  0x00000958 in ?? ()
#4  0xb7c3a811 in raise () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7c3bfb9 in abort () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7c33fbf in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#7  0xb77f9455 in viaSwapOutWork () from /usr/lib/dri/unichrome_dri.so
#8  0xb77fa1fe in viaCheckDma () from /usr/lib/dri/unichrome_dri.so
#9  0xb77fa7f9 in viaWaitIdle () from /usr/lib/dri/unichrome_dri.so
#10 0xb7800b41 in viaSpanRenderStart () from /usr/lib/dri/unichrome_dri.so
#11 0xb78ecd00 in _swrast_ReadPixels () from /usr/lib/dri/unichrome_dri.so
#12 0xb7941b00 in _mesa_ReadPixels () from /usr/lib/dri/unichrome_dri.so
#13 0xb7bed0b4 in glReadPixels () from /usr/lib/libGL.so.1
#14 0x0804913f in fake_draw (color=0x804c56c) at glmeter.c:1074
#15 0x0804ba86 in display () at glmeter.c:1117
#16 0xb7ecad34 in glutJoystickGetCenter () from /usr/lib/libglut.so.3
#17 0xb7ece99a in fgEnumWindows () from /usr/lib/libglut.so.3
#18 0xb7ecb263 in glutMainLoopEvent () from /usr/lib/libglut.so.3
#19 0xb7ecbcbe in glutMainLoop () from /usr/lib/libglut.so.3
#20 0x0804ae44 in main (argc=Cannot access memory at address 0x958
) at glmeter.c:1472
----------

But this only the first time I run the program. Other runs of the program run 
fine.


You can reproduce this by compiling this:
----------
#include <GL/gl.h>
#include <GL/glut.h>
#include <sys/time.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <X11/Intrinsic.h>
#include <GL/glx.h>

#include "glmeter.h"



#define DRAWS_BETWEEN_PRINTFS 500
#define N_METERS 8



GLuint window_width = 1024;
GLuint window_height = 400;



#define MAX(a,b) ((a > b) ? a : b)


void fake_draw(float *color) {

 //--- Draw background color
 glColor4fv(color);
 glBegin(GL_QUADS);
 glVertex2i(0, window_height);
 glVertex2i(window_width, window_height);
 glVertex2i(window_width, 0);
 glVertex2i(0, 0);
 glEnd();



 // Draw the central line
 glColor4fv(color+4);
 glBegin(GL_LINES);
 glVertex2i(window_width/2, window_height);
 glVertex2i(window_width/2, 0);
 glEnd();

// prova a usare malloc x l'array

 GLubyte *arr = malloc(400*4*sizeof(arr));
 *arr = 0;

 // Copy wave pixels in wave_old_img: in the next drawing will be used 
glDrawPixels to shift the pixels down by wave_step pixels
 glReadPixels(0, 0, 20, 20, GL_RGBA, GL_UNSIGNED_BYTE, arr);




/*
 int i;
 for (i=0; i < 1600; i++) {
  arr[i][0] = color[0] * 255;
  arr[i][1] = color[1] * 255;
  arr[i][2] = color[2] * 255;
  arr[i][3] = color[3] * 255;
 }

 glRasterPos2i(0, 0);
 glDrawPixels(40, 40, GL_RGBA, GL_UNSIGNED_BYTE, arr);
*/
}




void display(void)
{
 // Benchmark code
    static int n = 0;
    static struct timeval t1, t2;
    if ( (n % DRAWS_BETWEEN_PRINTFS) == 0 ) {
  t1 = t2;
  gettimeofday(&t2, NULL);
  float fps = ((float)1000000*DRAWS_BETWEEN_PRINTFS) / 
((t2.tv_sec*1000000+t2.tv_usec)-(t1.tv_sec*1000000+t1.tv_usec));
  if (n != 0)
      printf("draw %d frames, %f fps\n", DRAWS_BETWEEN_PRINTFS, fps);
    }
    n++;


printf("Draw n %d\n", n);

    glMatrixMode(GL_MODELVIEW);
 float c[] = {1.0, 0.0, 0.0, 0.0,
    0.0, 1.0, 0.0, 0.0
    };

 if (n < 200) {
  fake_draw(c);
     glutSwapBuffers();
     return;
 }




}



void init (void) 
{
 glViewport(0, 0, window_width, window_height);
    glMatrixMode(GL_PROJECTION);
 glLoadIdentity();
 gluOrtho2D(0.0, window_width, 0.0, window_height);

    glMatrixMode(GL_MODELVIEW);
 glLoadIdentity();

 glTranslatef(0.375, 0.375, 0.0);
}


// Idle function, called when there is nothing else to do
void idle(void) {
 // Request a redisplay
 glutPostRedisplay();
}


// Timer function, called at regular intervals
void timer_func(int timer_val) {
 glutTimerFunc(timer_val, timer_func, timer_val);

 // Request a redisplay
 glutPostRedisplay();
}


int main(int argc, char** argv)
{
 glutInit(&argc, argv);
 glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB); // Display mode: double buffered 
RGB
 glutInitWindowPosition (0, 0);
 glutInitWindowSize (window_width, window_height);
 glutCreateWindow ("meter");
 init ();
 glutDisplayFunc(display);
// glutIdleFunc(idle);
 glutTimerFunc(1000/30, timer_func, 1000/31);
 glutMainLoop();

 return 0;
}
----------
compile with
gcc -Wall -g -O3 -o test test.c -lglut -L/usr/X11R6/lib -lXt -lSM -lICE -lXext 
-lX11 -lXi


The first time I run this program when I turn on the system, it prints the 
error and aborts.
Other runs of this program work fine.

If I turn on the system, run an openGL program that don't calls one of 
(glCallLists, glDrawPixels, glReadPixels),
then close it, and run this program, it works fine.


The hardware is a single-board computer from AMPRO, model ReadyBoard 710
(damn they removed it from their website), it has a Celeron ULV at 650MHz and 
integrated
graphics, the Unichrome.

This bug is present for etch 4.0r0, and for etch with all updates of yesterday
Linux deb4-sbc 2.6.18-5-686 #1 SMP
Linux deb4-sbc 2.6.18-4-686 #1 SMP




I have seen many hits of this bug googling the net, and found this bug, 
reported by Gabriel Mansi:
http://bugs.freedesktop.org/show_bug.cgi?id=12021

I don't know what that assert is there for, but if what he is saying is true, 
removing that assert will resolve
this, and many, many other bugs depending on this.





--- End Message ---
--- Begin Message ---
Package: mesa
Version: 8.0-1

The Unichrome 3D driver has been removed in Mesa 8.0 and is no longer
shipped in Debian, I'm closing the bugs related to it.

Sorry for not bringing better news.

Cheers,
       Sven

--- End Message ---

Reply via email to