Opened 6 years ago

Last modified 3 years ago

#14735 new bug

[GLTeapot] The teapot is not displayed (GL: Error code $0502)

Reported by: Akuji Owned by: kallisti5
Priority: normal Milestone: Unscheduled
Component: Applications/GLTeapot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Error 'GL: Error code $0502' appears when opening GLTeapot. The teapot is not displayed, changing anything in settings of the app doesn't help.

hrev52612 gcc2

Lenovo T430s

device Display controller (VGA compatible controller, VGA controller) [3|0|0]

vendor 8086: Intel Corporation device 0166: 3rd Gen Core processor Graphics Controller

Attachments (2)

glteapot_haiku-cocobean.jpeg (284.0 KB ) - added by cocobean 4 years ago.
GLTeapot application showing teapot display and error code $0502 on Haiku R1B2
GLTeapot-haiku-x86_64-cocobean.png (125.0 KB ) - added by cocobean 4 years ago.
GLTeapot on hrev54795 x86_64 w/Mesa 17.1.10 (no errors were generated in terminal)

Download all attachments as: .zip

Change History (14)

comment:1 by X512, 5 years ago

Does it still present? Note that Haiku currently use software rendering and videocard have no effect on OpenGL operation.

comment:2 by cocobean, 4 years ago

Tested on hrev54790 and R1B2 (hrev54154+123). Reproducible bug.

  1. Run '/system/demos/GLTeapot' in Terminal window.
  2. Move cursor over GLTeapot's GUI window display.

Result: Should see the error in terminal window. Error only happens during mouse movement over application's window - but not main desktop display.

Seems this is coming from events when reading the mouse cursor position over app display. No major issues with teapot display, or any app functions, and can control teapots (i.e. hold/modify) with mouse.

Last edited 4 years ago by cocobean (previous) (diff)

by cocobean, 4 years ago

GLTeapot application showing teapot display and error code $0502 on Haiku R1B2

comment:3 by cocobean, 4 years ago

@X512 - GLTeapot display is fine on my system. No issues in application functionality. Debug error info is listed here.

  1. Mesa: User Error: GL_INVALID_OPERATION in glReadBuffer(buffer=0x405)
  2. GL: Error code $0502

See: https://github.com/haiku/haiku/blob/master/src/apps/glteapot/TeapotWindow.cpp

void
TeapotWindow::DirectConnected(direct_buffer_info* info)
{
	// TODO: Direct rendering causes the mouse to flicker due
	// to the lack of a Hardware Cursor, however without
	// it the teapot freezes on mouse move. (bug?)
	#if 1
	if (fObjectView != NULL) {
		fObjectView->DirectConnected(info);
		fObjectView->EnableDirectMode(true);
	}
	#endif
}
void
TeapotWindow::MessageReceived(BMessage* msg)
{
//	msg->PrintToStream();
	switch (msg->what) {
		default:
			BDirectWindow::MessageReceived(msg);
	}
}

comment:4 by kallisti5, 4 years ago

Please run "GLInfo" from the command line and let us know what it says.

comment:5 by cocobean, 4 years ago

  1. mesa-7.9.2-11* (GCC2, Haiku R1B2 +123)

GUI shows:

Mesa Project, 2.1 Mesa 7.9.2, GLU 1.3, GLUT 5

comment:6 by kallisti5, 4 years ago

Ah. 32-bit gcc2 image.

I'm pretty sure there were some locking fixes applied to the modern Mesa packages (for x86_64). gcc2 gets an old creaky 7.x version of Mesa from our own fork. Were those locking fixes applied there as well?

comment:8 by cocobean, 4 years ago

No issue on hrev54795 x86_64.

Recompiling GLTeapot with 32-bit x86 GCC8 and Mesa 17.1.10 fixed the issue. Seems reasonable for faster GL performance (800 FPS vs 500 FPS).

Fixing Mesa 7.9.2 GL lock/unlock seems reasonable as well.

by cocobean, 4 years ago

GLTeapot on hrev54795 x86_64 w/Mesa 17.1.10 (no errors were generated in terminal)

comment:9 by cocobean, 3 years ago

Resolved. Please close this ticket. Tested platforms: Haiku R1B2 (+123) x86_gcc2, Haiku hrev55147 x86_64

comment:10 by X512, 3 years ago

What was the cause?

Version 0, edited 3 years ago by X512 (next)

comment:11 by cocobean, 3 years ago

Cause: GL Lock/unlock issue.

  Mesa: User Error: GL_INVALID_OPERATION in glReadBuffer(buffer=0x405)
  GL: Error code $0502

Result:

  1. The GL locking/unlocking was fixed in Mesa 17.1.10 and we moved the GLTeapot app to Mesa 17.1.10 and GCC8. Reviewed again on Haiku hrev55145.
  2. GLTeapot is visible to users and works fine.

comment:12 by pulkomandy, 3 years ago

In Haiku gcc2 we do not use Mesa 17, we use Mesa 7.9.2. So what you say makes no sense.

I will wait for confirmation from original reporter (or lack of reply) before closing, since it seems no one else has reproduced this problem.

Note: See TracTickets for help on using tickets.