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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - miki151

Pages: [1]
1
Window / JoystickImpl::isConnected crash
« on: May 06, 2016, 07:47:12 am »
This is from a minidump from a remote machine. I can send in the minidump and symbols, if needed.

Crashing line:
        cache.connected = joyGetPosEx(JOYSTICKID1 + index, &joyInfo) == JOYERR_NOERROR;

index is 0

Stack trace:
    dinput.dll!CDIDev_Acquire()   Unknown
    WINMMBASE.dll!joyGetPosEx()   Unknown
   sfml-window-2.dll!sf::priv::JoystickImpl::isConnected(unsigned int index=0) Line 191   C++
    sfml-window-2.dll!sf::priv::JoystickManager::update() Line 88   C++
    sfml-window-2.dll!sf::priv::WindowImpl::processJoystickEvents() Line 164   C++
    sfml-window-2.dll!sf::priv::WindowImpl::popEvent(sf::Event & event={...}, bool block) Line 119   C++
    sfml-window-2.dll!sf::Window::pollEvent(sf::Event & event={...}) Line 186   C++

2
Window / RenderWindow::create freezes on Windows 10
« on: April 12, 2016, 01:56:31 pm »
A user is reporting that my game doesn't start, it just freezes without opening a window. I got a minidump file from him, the stacktrace is as follows:

   sfml-system-2.dll!587d59c0()   Unknown
    sfml-system-2.dll!587d59cc()   Unknown
    sfml-system-2.dll!587d1096()   Unknown
    sfml-window-2.dll!0f099fd8()   Unknown
    sfml-window-2.dll!0f09311b()   Unknown
    sfml-window-2.dll!0f0950f4()   Unknown
    sfml-window-2.dll!0f09abce()   Unknown
    sfml-window-2.dll!0f095604()   Unknown
    sfml-window-2.dll!0f0949a8()   Unknown
    keeper.exe!Renderer::initialize() Line 268   C++


The last line is in my code, as follows (display is a RenderWindow).

display.create(sf::VideoMode::getDesktopMode(), "KeeperRL");

The method is called in an extra thread, while some stuff is done in the main thread first (RenderWindow constructor, Font::loadFromFile), could this cause any trouble?

EDIT: the problem persists even when the game is run in a single thread.

Is there any way to load the SFML symbols and see the whole stacktrace?

Note that this is a pretty uncommon bug, I couldn't reproduce it on many PCs, and the game has worked for lots of players for years. On that user's particular machine, we've tried a Visual Studio 14 build with the most recent SFML version, as well as a Mingw-w64 build with a slightly older verison of SFML.

The user's spec:
Quote
Windows 10
i7-4930K
GTX 970

3
Graphics / Visual glitches and flickering when drawing sprites
« on: April 13, 2015, 02:54:54 pm »
A player has sent me screenshots of a visual glitch in my game. The first screenshot is what the game normally looks like. The glitches reportedly flicker very quickly.

The bug is pretty rare, probably no more than 1 in 200 players experience it. It seems to be related to having a dual video card setup. I asked the player to manually switch to his GTX 980 card, we'll see if that helps. Meanwhile, if anyone has any clue on how to resolve this, I would gladly hear it.

Michal




4
Graphics / Small max texture size on a fairly modern system
« on: April 10, 2015, 06:45:22 pm »
A user has reported a problem:
Quote
Failed to create texture, it's internal size is too high (2048x2048, maximum is 1024x1024)

His system is actually pretty modern, it seems weird that it can't load bigger textures. Any chance this is actually some kind of bug?

Quote
------------------
System Information
------------------
Operating System: Windows 7 Home Premium 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.150202-1526)
Processor: Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz (4 CPUs), ~2.3GHz
Memory: 6144MB RAM

---------------
Display Devices
---------------
Card name: Mobile Intel(R) HD Graphics
Manufacturer: ATI Technologies Inc.
Chip type: Intel(R) HD Graphics Family
DAC type: Internal
Display Memory: 4095 MB
Dedicated Memory: 2092 MB
Shared Memory: 2003 MB
Current Mode: 1600 x 900 (32 bit) (60Hz)

5
Graphics / Possible reasons for a garbled font?
« on: February 08, 2015, 12:00:30 am »
I've run into a very annoying problem with text rendering. Once every few runs of the program, it looks like this:


The way it should look like:


The second screenshot is actually from the same run, except the font was enlarged by one point (it scales with window size). This hints that only one specific size gets corrupted. Sometimes only a single letter or number is corrupted, and the rest of the font looks good. Sometimes the letter is only of a wrong size.

I checked the usual stuff, sf::Font is created inside of main(), and passed around by reference. I'm running the program with valgrind, but it doesn't detect any memory corruption. The problem occurs with different fonts, on both Linux and Windows, 32bit and 64bit, although in slightly different variations.

Any hint on how to tackle this would be greatly appreciated!

6
Window / Mouse wheel unusable on Mac
« on: January 26, 2015, 09:15:06 pm »
Mouse scrolling is very sensitive on Mac, merely touching the wheel or touchpad causes an event to be generated with non-zero delta.

I realize this is because OSX has a different scrolling mechanism. Is there any way around this?

7
Audio / Music::~Music sometimes hangs
« on: April 28, 2014, 12:05:15 pm »
I'm using SFML 2.1 and my program sometimes hangs when I call exit(0). A stack trace reveals:

#0  0xf7fdb430 in __kernel_vsyscall ()
#1  0xf7cc3e1c in pthread_join () from /lib/i386-linux-gnu/libpthread.so.0
#2  0xf7f753ab in sf::priv::ThreadImpl::wait() () from ./libsfml-system.so.2
#3  0xf7f743c8 in sf::Thread::wait() () from ./libsfml-system.so.2
#4  0xf7fd3f92 in sf::SoundStream::stop() () from ./libsfml-audio.so.2
#5  0xf7fcedf1 in sf::Music::~Music() () from ./libsfml-audio.so.2


I also get this error on start-up:
AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up

This is a class that I use to handle music. Maybe I'm doing something wrong with the fact that it's a global variable. Jukebox::initialize is called from main().

#include <SFML/Audio/Music.hpp>

class Jukebox {
  public:
  enum Type { INTRO, PEACEFUL, BATTLE };
  void initialize(const string& introPath, const string& peacefulPath, const string& warPath);

  void setCurrent(Type);
  void toggle();
  void update();

  private:
  bool turnedOff();
  sf::Music& get(Type);
  unique_ptr<sf::Music[]> music;
  Type current = INTRO;
  Type currentPlaying;
  bool on = true;
};

extern Jukebox jukebox;
 

#include "music.h"

using sf::Music;

Jukebox jukebox;

void Jukebox::initialize(const string& introPath, const string& peacefulPath, const string& warPath) {
  music.reset(new Music[3]);
  music[0].openFromFile(introPath);
  music[1].openFromFile(peacefulPath);
  music[2].openFromFile(warPath);
  music[1].setLoop(true);
  music[2].setLoop(true);
  currentPlaying = current;
  if (!turnedOff())
    get(current).play();
  else
    on = false;
}

bool Jukebox::turnedOff() {
  return !Options::getValue(OptionId::MUSIC);
}

sf::Music& Jukebox::get(Type type) {
  return music[int(type)];
}

void Jukebox::toggle() {
  if ((on = !on)) {
    currentPlaying = current;
    get(current).play();
  } else
    get(current).stop();
}

void Jukebox::setCurrent(Type c) {
  if (current != INTRO)
    current = c;
}

const int volumeDec = 20;

void Jukebox::update() {
  if (turnedOff())
    return;
  if (currentPlaying == INTRO && music[0].getStatus() == sf::SoundSource::Stopped) {
    currentPlaying = current = PEACEFUL;
    get(current).play();
  }
  if (current != currentPlaying) {
    if (get(currentPlaying).getVolume() == 0) {
      get(currentPlaying).stop();
      currentPlaying = current;
      get(currentPlaying).setVolume(100);
      get(currentPlaying).play();
    } else
      get(currentPlaying).setVolume(max(0.0f, get(currentPlaying).getVolume() - volumeDec));
  }
}

8
Window / Crash after failed inotify_init() call (Linux, SFML 2.1)
« on: August 05, 2013, 08:17:57 am »
Everything was working fine, when my game started crashing as follows (without recompiling):

Failed to initialize inotify, joystick connections and disconnections won't be notified
*** buffer overflow detected ***: /home/michal/zagadka/zagadka terminated
======= Backtrace: =========
[...]

Gdb shows this:
#0  0x00007ffff6ee6425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6ee9b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff6f2439e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6fba817 in __fortify_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff6fb9710 in __chk_fail () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007ffff6fba7ce in __fdelt_warn () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x00007ffff7996b61 in (anonymous namespace)::canRead(int) () from /usr/local/lib/libsfml-window.so.2
#7  0x00007ffff7996f98 in sf::priv::JoystickImpl::isConnected(unsigned int) () from /usr/local/lib/libsfml-window.so.2
#8  0x00007ffff7992541 in sf::priv::JoystickManager::update() () from /usr/local/lib/libsfml-window.so.2
#9  0x00007ffff79955ff in sf::priv::WindowImpl::WindowImpl() () from /usr/local/lib/libsfml-window.so.2
#10 0x00007ffff799926c in sf::priv::WindowImplX11::WindowImplX11(sf::VideoMode, sf::String const&, unsigned long, sf::ContextSettings const&) ()
   from /usr/local/lib/libsfml-window.so.2
#11 0x00007ffff79942cf in sf::priv::WindowImpl::create(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&) ()
   from /usr/local/lib/libsfml-window.so.2
#12 0x00007ffff7993e6a in sf::Window::create(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&) ()
   from /usr/local/lib/libsfml-window.so.2
#13 0x00007ffff7bc6881 in sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&) ()
   from /usr/local/lib/libsfml-graphics.so.2

Apparently joystick (which I'm not using) was not initialized correctly, but something tried to use it anyway. This is the line that fails (Linux/JoystickImpl.cpp):
114:  if (canRead(notifyFd))     // notifyFd is negative here

It would be great to be able to turn this functionality off altogether, so people don't get bogus crashes when playing my game.

9
Window / Shift + numpad keys
« on: August 04, 2013, 06:25:12 pm »
Hello,

I'm porting my game from another library to SFML. I was using a shift + numpad arrows combination for specific movement commands, but in SFML they don't produce the right event (which should be Keyboard::NumpadX with the shift modifier I think). I've temporarily switched to using the control key, but it would be great to use shift.

Pages: [1]