Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: X Error of failed request: BadShmSeg (invalid shared segmen)  (Read 2056 times)

0 Members and 1 Guest are viewing this topic.

rodari78

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Hi guys
I'm trying to test the hello world project but a I have this error:

Setting vertical sync not supported
X Error of failed request:  BadShmSeg (invalid shared segment parameter)
  Major opcode of failed request:  130 (MIT-SHM)
  Minor opcode of failed request:  3 (X_ShmPutImage)
  Segment id in failed request:  0x60000d
  Serial number of failed request:  118
  Current serial number in output stream:  119


My code is:
#include <SFML/Graphics.hpp>


int main()
{
   
     sf::RenderWindow window(sf::VideoMode(200,200), "Hello From SFML");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Magenta);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if(event.type == sf::Event::Closed){
                window.close();
            }
        }
        window.clear();
        window.draw(shape);
        window.display();
       
    }
return 0
}

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11000
    • View Profile
    • development blog
    • Email
Re: X Error of failed request: BadShmSeg (invalid shared segmen)
« Reply #1 on: July 11, 2023, 11:40:45 pm »
What's your OS/Distro/emu?

Try updating your mesa/GPU drivers.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/