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

Author Topic: SFML instant segfault (core dumped)  (Read 2542 times)

0 Members and 1 Guest are viewing this topic.

deathlab

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
SFML instant segfault (core dumped)
« on: October 17, 2016, 12:33:33 am »
Hi,

I'm beginning to use SFML for a school project and I want to use SFML for my graphics. I'm using the new windows feature "Bash on Ubuntu on Windows" which is basically a Linux subsystem on which I've obviously installed SFML, I used the apt-get install from the tutorial, and I'm trying to launch the tutorial code :
http://www.sfml-dev.org/tutorials/2.4/start-linux.php

I also used the tutorial's make lines to compile, and until then, no problem, but whenever I use an SFML line in the code, boom I get a magnificent segfault (core dumped). I tried searching, but not a lot of people use the Bash on Ubuntu thing since it's quite new and haven't found anything. I ran the code on gdb, and I've put a screen as an attachement.
The two things written in french are just "success" and the line after it's "System call interupted/aborted"
and the part of the library it blocks on is basically the first instruction, the function to create a window.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML instant segfault (core dumped)
« Reply #1 on: October 17, 2016, 11:21:37 am »
Ubuntu on Windows is still a rather new thing and there's no guarantee that anything will run properly that way, especially not for something as complex as SFML (lots of different system calls etc). My guess is that Ubuntu on Windows can't properly translate some Linux call to Windows, thus probably causing a crash.
Maybe if you provide the backtrace one could see some more information, but I essentially recommend to either use a Linux native or use SFML under Windows native.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: SFML instant segfault (core dumped)
« Reply #2 on: October 17, 2016, 10:55:30 pm »
Might want to read through this thread a bit: https://www.reddit.com/r/Windows10/comments/4ea4w4/fyi_you_can_run_gui_linux_apps_from_bash/

Looks like it's possible, but potentially slower than you might like (as of ~6 months ago or so, given the thread's date).

deathlab

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: SFML instant segfault (core dumped)
« Reply #3 on: October 18, 2016, 09:43:10 pm »
Thanks for your answers, I already lost too much time on trying to make the BoUoW work as I'd like it to do, so I'm just gonna make a bootable USB stick with Ubuntu on it and I'll make it as 1st storage read by my BIOS, and this'll do the trick, I'll have Linux whenever my USB is plugged in, and windows the rest of the time.
This should be much simpler and allow me to develop in a good environment instead of having to take hours of research everytime I have a problem with the subsystem.

Still, thanks for the answers and looking that up, I hope someone that find this topic can solve its problem thanks to it ^^

 

anything