MegaGlest / megaglest-source

MegaGlest real-time strategy game engine (cross-platform, 3-d)
http://megaglest.org/
355 stars 90 forks source link

megaglest_editor: ../src/unix/glx11.cpp(86): assert "xid" failed in SetCurrent(): window must be shown #28

Closed apoleon closed 9 years ago

apoleon commented 9 years ago

I am using Megaglest 3.9.1 on Debian Testing and Unstable. When I try to run megaglest_editor, I get the following error message

megaglest_editor:

Debug: Unsupported OpenGL attribute 13177944 ../src/unix/glx11.cpp(86): assert "xid" failed in SetCurrent(): window must be shown The program 'megaglest_editor' received an X Window System error. This probably reflects a bug in the program. The error was 'BadMatch (invalid parameter attributes)'. (Details: serial 5944 error_code 8 request_code 156 minor_code 11) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)

Under Gnome3/Debian Testing (amd64) I can see a pop up window with an assertion message and the editor is usable after I click on "Continue". But on another system, Debian Unstable, Openbox window manager (i386), the editor won't start at all.

The assert info message from wxWidgets3.0.2 is: ASSERT INFO: ../src/unix/glx11.cpp(86): assert "xid" failed in SetCurrent(): window must be shown

BACKTRACE: [1] wxGLContext::SetCurrent(wxGLCanvas const&) const [2] MapEditor::GlCanvas::setCurrentGLContext() [3] MapEditor::MainWindow::init(std::string) [4] MapEditor::App::OnInit() [5] wxAppConsoleBase::CallOnInit() [6] wxEntry(int&, wchar_t**) [7] main [8] __libc_start_main [9] _start

softcoder commented 9 years ago

Possibly fixed by: https://github.com/MegaGlest/megaglest-source/commit/6faa3dc72543b55e1b469fd19a186d6f8be9c584

apoleon commented 9 years ago

On 29.11.2014 08:50, Mark Vejvoda wrote:

Possibly fixed by: 6faa3dc https://github.com/MegaGlest/megaglest-source/commit/6faa3dc72543b55e1b469fd19a186d6f8be9c584

Unfortunately the fix is not sufficient. I now get the following error:

01:17:18: Debug: Unsupported OpenGL attribute 28276768 ../src/unix/glx11.cpp(86): assert "xid" failed in SetCurrent(): window must be shown The program 'megaglest_editor' received an X Window System error. This probably reflects a bug in the program. The error was 'BadMatch (invalid parameter attributes)'. (Details: serial 998 error_code 8 request_code 156 minor_code 11) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)

softcoder commented 9 years ago

I updated my debian SID VM and doing a fresh compile, I am able to run megaglest_editor without error.

I am of course using the latest code but I think with the patch it should be the same?

apoleon commented 9 years ago

On 30.11.2014 23:42, Mark Vejvoda wrote:

I updated my debian SID VM and doing a fresh compile, I am able to run megaglest_editor without error.

I am of course using the latest code but I think with the patch it should be the same?

You forgot to mention that you pushed another commit related to this issue. :)

https://github.com/MegaGlest/megaglest-source/commit/c21317a5f4bf8e0f28fcad82734eae983872d21d

If I apply this one and also add -DNDEBUG to CPPFLAGS, the editor and g3dviewer work again.

I have just uploaded a new revision of Megaglest to Debian unstable and I am going to file an unblock request for Jessie now, so that this fix will be available in the next stable release.

Thanks for your help

Markus

filux commented 9 years ago

Good to hear about everything fine on debian :)