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

Author Topic: AlexxanderX problems...  (Read 25592 times)

0 Members and 1 Guest are viewing this topic.

MadMartin

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: AlexxanderX problems...
« Reply #30 on: July 02, 2013, 02:14:33 pm »
Perhaps it's a misunderstanding about the y-coordinates?
In SFML, y = 0 is at the top, while it can be at the bottom in other libs etc.

cpolymeris

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: AlexxanderX problems...
« Reply #31 on: July 02, 2013, 02:35:08 pm »
I think AlexxanderX means the text isn't aligned to the top of the window, but that is just because the font has some "headroom". Actually, what bothers me more is the often poor kerning, but that might, too, be the font's fault:



EDIT: That said, firefox manages to render it much better.
« Last Edit: July 02, 2013, 02:37:38 pm by cpolymeris »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: AlexxanderX problems...
« Reply #32 on: July 02, 2013, 04:52:31 pm »
Quote
Actually, what bothers me more is the often poor kerning, but that might, too, be the font's fault
SFML applies kerning correctly for each pair of characters, so yes it might be the font.

Quote
That said, firefox manages to render it much better.
Hum, I don't see any major difference.
Laurent Gomila - SFML developer

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: AlexxanderX problems...
« Reply #33 on: July 05, 2013, 11:05:48 am »
Yea, the font was the fault!

Now have another problem:
Handler::Handler()
{
window.create(sf::VideoMode(800,600),"SpeedCuber Challenge");
window.setFramerateLimit(60);
 
Menu menu(window);
Loading loading(window, menu.loadStages);
 
sf::Thread loadData(&Menu::loadData,&menu);
 
stage = 0;
 
loadData.launch();
while (window.isOpen())
{
//...
}
}

And I got those error:
Quote
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
client: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Aborted

So I tried to call XInitThreads() and I got those error:
Quote
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
after 86 requests (86 known processed) with 1 events remaining.
Failed to retrieve the screen configuration while trying to get the desktop video modes
Failed to get the window attributes
[xcb] Unknown sequence number while processing reply
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
client: ../../src/xcb_io.c:635: _XReply: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted

Those errors are errors from running, not from compiling!
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: AlexxanderX problems...
« Reply #34 on: July 05, 2013, 11:08:42 am »
I have no idea, sorry. Calling XInitThread() usually works fine and solves this kind of errors.
Laurent Gomila - SFML developer

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: AlexxanderX problems...
« Reply #35 on: July 05, 2013, 11:14:23 am »
I tryed to put XInitThreads in first line:
Handler::Handler()
{
     XInitThreads();
     //...
}
And I got those errors, but I tried to put after I create the window and worked, somehow. Now it's freeze - can't close, nothing happen.

This is a common problem( with threads) on Linux?
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: AlexxanderX problems...
« Reply #36 on: July 05, 2013, 11:35:08 am »
No, as I said usually everything works fine.
Laurent Gomila - SFML developer

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: AlexxanderX problems...
« Reply #37 on: September 06, 2013, 08:10:03 am »
Reinstalled linux and followed this link for installind dependencies, but when running 'sudo make' i got this warning:
[ 36%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Linux/JoystickImpl.cpp.o
/home/alexxanderx/Work/Programare/Libraries/SFML-2.1/src/SFML/Window/Linux/JoystickImpl.cpp: In static member function ‘static bool sf::priv::JoystickImpl::isConnected(unsigned int)’:
/home/alexxanderx/Work/Programare/Libraries/SFML-2.1/src/SFML/Window/Linux/JoystickImpl.cpp:123:51: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]

 
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: AlexxanderX problems...
« Reply #38 on: September 06, 2013, 08:18:00 am »
Yes, I know. You can ignore it.
Laurent Gomila - SFML developer

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: AlexxanderX problems...
« Reply #39 on: September 06, 2013, 09:26:22 am »
Thanks for fast replay :D

When try to run a compiled code I get this error:
./test: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory
 
[/s]

EDIT: resolved :D
« Last Edit: September 06, 2013, 09:40:49 am by AlexxanderX »
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: AlexxanderX problems...
« Reply #40 on: October 03, 2013, 01:07:54 pm »
I have a question not about SFML: I want to add to my game a resolution changer but I don't really know how to do with my background: my idea is to take an image with hight resolution( e.g. 2560x1980) and for smaller resolutions than the image to cut the image in rects( 1 rect size = max texture size) and after to scale it to feet the screen. Is good my idea? For lower resolutions as 800x600 will not take too much time to do this?

-resolved-
« Last Edit: October 03, 2013, 06:13:02 pm by AlexxanderX »
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: AlexxanderX problems...
« Reply #41 on: May 02, 2014, 09:22:19 am »
Started creating a app which get the pixels from an image( webcam) and send to a host/server and the host recreate the image and show it on an RenderWindow. The client send packets of maximum 1000000~=1MB and send them to host. The host get almost of them and put them in a vector. The problem is that when the host tries to unpack the second packet the app crash with segmentation fault. Here is the code:
(click to show/hide)
After I get the output of packets size and "No more packets!..." and start the unpaching funtion it only shows: "Unpack the packet #1... end of packet..." and get segmentation fault:
Received 999988 bytes
Received 999988 bytes
Received 61440 bytes
No more packets! Received 3 packets!
Unpack the packet #0... end of packet...
./run: line 3:  5283 Segmentation fault      ./host
« Last Edit: September 06, 2014, 02:24:24 pm by AlexxanderX »
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11035
    • View Profile
    • development blog
    • Email
AW: AlexxanderX problems...
« Reply #42 on: May 02, 2014, 09:48:25 am »
Run it through a debugger and get the call stack where it's crashing.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: AlexxanderX problems...
« Reply #43 on: May 22, 2014, 04:10:12 pm »
Thanks eXpl0it3r.

Sometimes when I run my app( and not only) the window, I think the view is not adjusted: the click position is wrong( for elements of SFGUI) and texts positions are not displayed at the correct position( on another project with no SFGUI). This happens only sometimes at the runtime of the app, sometimes when run the app everything works good. I can't show the code because is a huge code, but what I can provide is that I don't change the view of window and only create the window. Here is a video of the bug: https://www.youtube.com/watch?v=bUi_M_8xdWs&feature=youtu.be
« Last Edit: May 22, 2014, 04:12:58 pm by AlexxanderX »
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

AlexxanderX

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • AlexanderX
Re: AlexxanderX problems...
« Reply #44 on: September 06, 2014, 02:23:46 pm »
I have a problem with my game: it's flickering( i don't know is the perfect word for my problem). I'm using Thor for animate my player and whenever I move the tiles are moved:
(click to show/hide)
But when I don't move the player everything is normal:
(click to show/hide)
This happen only when a draw everything to a sf::RenderTexture and after to the window:
m_scene.clear();
m_scene.draw(...)
m_scene.display();

sf::Sprite spriteScene(m_scene.getTexture());
window.draw(spriteScene);
When I draw directly to the window everything works fine.

I can't post the code, but trying to create an example code( until now I have not managed to remake the bug).
If you have some thoughts about how to resolve or from where it come the bug, please post.

I'm using the last version of SFML from GitHub.
« Last Edit: September 06, 2014, 02:30:11 pm by AlexxanderX »
Here you can find my blog and tutorials about SFML - http://alexanderx.net/ (died...) - http://web.archive.org/web/20160110002847/http://alexanderx.net/

 

anything