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.


Messages - Caeous

Pages: [1] 2
1
Window / Re: DInput crash during pollEvent
« on: October 25, 2013, 02:27:27 pm »
Laurent,

We found the issue. It's because of a special Watch software that was installed on the computer.

You can download the Watch software here:

http://www.movescount.com/connect/moveslink/Suunto_Ambit

Steps to Reproduce: Run the code in my original post, and run this application software (even when it's asking for the watch, just leave it on).

The crash takes a while to occur, but does nonetheless. I would suggest leaving it overnight.

Do you have any idea why it could be crashing? I'm just worried that other special equipment (like maybe Galaxy Gear, etc) could be crashing in SFML.

2
Window / Re: DInput crash during pollEvent
« on: October 22, 2013, 06:47:51 pm »
Have you heard of any conflicts with AutoHotkey?

3
Window / Re: DInput crash during pollEvent
« on: October 22, 2013, 04:41:34 pm »
We're looking into reinstalling DirectX, but last I checked it comes with Windows so there's no way to uninstall it, and the installer doesn't give a repair option.

Anyways, I'm thinking as a last resort it might be a good idea to remove the joystick check? I looked into Window::initialize for any joystick code and I couldn't find any, and the callstack is pretty vague as to where the check is occurring. I figure you might know? Where should I be looking to minimize any Joystick code?

4
Window / Re: DInput crash during pollEvent
« on: October 22, 2013, 04:10:53 pm »
Soryy, I know you must be really busy, but do you have any recommendations for something that we could try? We have two computers running with the same version of DirectX (and I guess as a result DInput), but only one of them is crashing. I also have no idea why it's crashing. Both computers have the same hardware configuration.

Merci.

5
Window / Re: DInput crash during pollEvent
« on: October 22, 2013, 03:30:10 pm »
Thank you for the response. I will make the code even more concise next time. I've updated the main post code.

I do not have a joystick.

6
Window / DInput crash during pollEvent
« on: October 22, 2013, 03:13:38 pm »
Hello everyone,

I'm experiencing a weird crash while running a very simple SFML application. Here is the code below:

#include "stdafx.h"

#include <SFML\Graphics.hpp>
#include <SFML\OpenGL.hpp>
#include <SFML\System.hpp>
#include <SFML\Window.hpp>

int main(int argc, char *argv[])
{
   sf::RenderWindow window;
   window.create( sf::VideoMode( 800, 600 ), "SFML", sf::Style::Default );
   window.setFramerateLimit( 60 );

   sf::Event event;
   while( window.isOpen() )
   {
      window.pollEvent( event );
   }

   return 0;
}

This crash occurs on both SFML 2.1 and the latest Unofficial Nightly Build (2013-09-24) running Windows 7 32bit. I've managed to get the crash while debugging, and here is the callstack:

dinput.dll!_CJoyCfg_New@12()   Unknown
dinput.dll!_StringCbCopyW@12() Unknown
dinput.dll!_hresDupPtszPptsz@8()       Unknown
dinput.dll!_CHid_Init@8()      Unknown
dinput.dll!_CHid_New@16()      Unknown
dinput.dll!_DIWdm_JoyHidMapping@16()   Unknown
dinput.dll!_JoyReg_GetConfigInternal@16()      Unknown
dinput.dll!_JoyReg_GetConfig@16()      Unknown
dinput.dll!_CJoyCfg_GetConfig@16()     Unknown
winmm.dll!_joyOpen@8() Unknown
winmm.dll!_joyGetPosEx@8()     Unknown
sfml-window-d-2.dll!0f9c941d()  Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for sfml-window-d-2.dll]      
sfml-window-d-2.dll!sf::Joystick::operator=() + 482 bytes       Unknown
sfml-window-d-2.dll!sf::Window::initialize() + 5176 bytes       Unknown
sfml-window-d-2.dll!sf::Window::initialize() + 4581 bytes       Unknown
sfml-window-d-2.dll!sf::Window::pollEvent() + 40 bytes  Unknown
ConsoleApplication2.exe!main(int argc, char * * argv) Line 44   C++
ConsoleApplication2.exe!__tmainCRTStartup() Line 536    C
ConsoleApplication2.exe!mainCRTStartup() Line 377       C
kernel32.dll!@BaseThreadInitThunk@12() Unknown
ntdll.dll!___RtlUserThreadStart@8()    Unknown
ntdll.dll!__RtlUserThreadStart@8()     Unknown
 

To reproduce the bug, I just run the application and let it sit for 5-30 minutes and then the crash will occur.

Any ideas?

7
Window / Re: Black window icon through Remote Desktop
« on: October 15, 2013, 04:02:27 pm »
Yes, it's definitely a corner case, but it would be nice if it could be fixed! It's pretty glaring when you see the black icon. ;)

Would you like me to open up a bug issue for this?

8
Window / Black window icon through Remote Desktop
« on: October 15, 2013, 03:25:40 pm »
Hello everyone,

I'm getting an issue where if you remote desktop to a Windows XP computer and launch an SFML window with a custom icon loaded, it'll be all black. If you remote desktop from XP to Win 7, the icon is fine.

Here's the code used:

sf::Image icon_bmp;
if( icon_bmp.loadFromFile( path ) )
{
   sf::Vector2u icon_bmp_size = icon_bmp.getSize();
   icon_bmp.createMaskFromColor( sf::Color( 255, 0, 255 ) ); // have tried using with and without
   this->window.setIcon( icon_bmp_size.x, icon_bmp_size.y, icon_bmp.getPixelsPtr() );
}
 

Any ideas?

9
Window / Re: Ctrl+Pause key event has Key::Unknown code
« on: October 15, 2013, 02:54:01 pm »
Thank you expl0it3r.

10
Window / Ctrl+Pause key event has Key::Unknown code
« on: October 11, 2013, 09:28:22 pm »
Hello,

I've noticed that specifically the combination of Ctrl+Pause will not give a code of Key::Pause but rather Key::Unknown.

Alt+Pause generates the appropriate Key::Pause code.

Any ideas?

11
Window / Re: Clear Keyboard Events in buffer
« on: October 07, 2013, 07:58:46 pm »
Thanks everyone for your input and help (Laurent, zsbzsb, binary1248). It's greatly appreciated. I've decided to go ahead and simply:
while( window.pollEvent( _event ) );

If the user continues to press a key or moving the mouse, well then it's his problem. In reality, after testing, the pollevent is faster than the key repeat, so it technically works for 99%, there's just this one edge case where if the mouse is constantly moving, then my app blocks until it stops. Odds of that happening in reality are low so I'm willing to compromise.

I'd rather not make you guys bloat the library with another function that only us legacy-stuck dudes are going to need.

Cheers and keep up the good work on SFML.

12
Window / Re: Clear Keyboard Events in buffer
« on: October 07, 2013, 05:54:11 pm »
Yes, obviously in a situation where there's a main loop that would work.

Unfortunately, this is a legacy application, and the original creator decided to allow only one event to be handled at a time. We handle input in a whole bunch of places (I hate it).

As a result, having a vector of events is of no use to me (I was merely suggesting it since others could make use of it?).

I understand that this is bad code, and it would potentially be silly to implement a new feature to fix code that is bad in the first place, but I can't help but wonder if I'm the only one that truly needs this? A simple SDL_PeepEvents search with SDL_GETEVENT will show that it's used quite often (http://code.ohloh.net/search?s=sdl_peepevents%20get_event&pp=0&fl=C%2B%2B&fe=cpp&ff=1&mp=1&ml=1&me=1&md=1&filterChecked=true).

What do you think?

13
Window / Re: Clear Keyboard Events in buffer
« on: October 07, 2013, 04:37:53 pm »
That's potentially dangerous if events keep coming (continuously pressing key, or mouse move, etc).

You'd have to know how many events there are in the queue at the moment that you want to clear the buffer.

Perhaps in the form of:
int sf::Window::getEventCount()

std::vector<sf::Event> getEvents(sf::Window& window)
{
    std::vector<sf::Event> events;
    sf::Event event;
    int eventCount = window.getEventCount();
    while ( eventCount > 0 && window.pollEvent(event))
    {
        events.push_back(event);
        eventCount--;
    }
    return events;
}
 

14
Window / Re: Clear Keyboard Events in buffer
« on: October 07, 2013, 04:00:29 pm »
Sorry guys,

I should have been more specific; The database check doesn't occur at every keyboard event in the main input/event handler, but only when you're in this specific list. Yes, multithreading the database would have been a good solution then.

I'm dependent on this database check in the main thread as I need to process the results. We're essentially going through the list and then choosing an item.

Thanks for taking the time to answer my question.

Marc

15
Window / Re: Clear Keyboard Events in buffer
« on: October 07, 2013, 03:42:04 pm »
Thanks for the response.

Yes, my loop is really really slow, I'm checking a MASSIVE database at every keyboard event.

There's not much that can be done about that unfortunately. This is a legacy application (20+ yrs old).

We're talking about ~2 seconds per keyboard event. So if you're scrolling down the list by pressing the keyboard arrow down multiple of times, it's going to take a while before you reach the bottom, and if you've pressed the arrow down too often, sometimes you have to wait 10 seconds before you can start doing something else again. It really sucks.

Perhaps instead of having something to clear the buffer, wouldn't it useful to be able to just get all the current events in the buffer - and simultaneously clear them - and then you can handle them as you wish?

Something along the lines of:

std::vector< sf::Event > sf::Window::getEvents() const

Pages: [1] 2