Skip to content
← Back to Community
sf::RenderWindow causes segfault in SFML... Maybe a problem on Replits side?
Profile icon
MatthewWesolows

After struggling with keeping framerate high in my game engine for a couple days, I decided to take a week-or-so break. I later come back to find that creating a renderwindow causes a segmentation fault, which happens when an invalid memory operation happens. This is probably not a problem on my side, because I ran an older version of the code that worked fine when I released it, and it still segfaulted. I may be completely wrong and it may be a problem on my side, but I don't think thats likely. Any ideas/help would be greatly appreciated.

Thanks in advance!

Voters
Profile icon
C0PE
Profile icon
MasterCyph3r
Profile icon
MatthewWesolows
Comments
hotnewtop
Profile icon
Coder100

ah yes blame the library before blaming yourself

in all seriousness though, segmentation faults are very finicky -- they sometimes happen and they sometimes don't. Check your code to make sure you have allocated all the memory required to make all operations.

Profile icon
MatthewWesolows

@Coder100 The code was working fine until I got back from my week long break. As I said on the post, the old code was working fine a week or so ago, but once I ran it recently, I got a segfault. It's not only me, I checked @SPQR repl I forked to get SFML running from and it also segfaulted. https://replit.com/@SPQR/SFML-Template-1?v=1

Profile icon
Coder100

hm, would you click the get help button to get help? @MatthewWesolows

Profile icon
CSharpIsGud

@Coder100 https://en.sfml-dev.org/forums/index.php?topic=22335.0
This is the case where you blame the library before you blame yourself.

Profile icon
MatthewWesolows

@Coder100 Sorry for the late reply, I submitted a bug report a while ago. I described that the problem is also happening with other repls as well as mine.

Profile icon
MatthewWesolows

@CSharpIsGud Sorry, ignore my last reply. I remember looking around reddit yesterday, and I did see posts from a couple months ago complaining about Fluxbox. Fluxbox was just added this January. It may be the cause, as the segfaults only started to happen once the little workspace toolbar popped up. The strange thing is that the workstation option only showed up a couple weeks ago... Even though Fluxbox was added since the beginning of the year... I poked around the Fluxbox webpage, but was unable to find anything that might help. Any ideas?