Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Windows 10 issues

This thread is locked; no one can reply to it. rss feed Print
Windows 10 issues
Apollo_EE
Member #14,148
March 2012

Having some issues here related to an Allegro 5 project I have been working on. Currently runs in any environment prior to Windows 10. This could be an issue with Nvidia drivers as I have a laptop upgraded from Windows 8 to 10 running the same program just fine. Also, I have tested this in Windows 7 with Nvidia Geforce and have had no problems. I have updated the drivers for the Nvidia card on Windows 10 but still have freeze up issues in my video thread. It seems that the program runs without crashing even though the video has failed. Also, disabling the display adapter via device manager in Windows 10 is the only fix I have atm. Not doing much more with this than making a game that draws lots of bitmaps and calls for some keyboard and mouse inputs. The card is Geforce GTX 1050 Ti driver version 397.64 released 5/9/2018. Any thoughts or advice would be tremendously helpful.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Apollo_EE said:

I have updated the drivers for the Nvidia card on Windows 10 but still have freeze up issues in my video thread. It seems that the program runs without crashing even though the video has failed.

I'm not quite sure what you're doing. What do you mean, 'video thread' ? Do you have a separate thread to play a video? What do you mean the video has failed? It doesn't play? Or the window doesn't get created?

Please be as descriptive as possible to help us diagnose this. I'm running Windows 10 with Allegro 5.2.4 no problems for a while now, as well as others, so it may be a driver specific issue.

Apollo_EE
Member #14,148
March 2012

I have narrowed it down to a most likely a driver issue with Nvidia on Geforce 10xx Ti series displays. By video thread I mean the program runs a separate threads for network connections and video rendering just so neither lags out the other. I am making a bit of an assumption here that there might be driver issues in the environment of Windows 10 post creators update and NVidia Geforce 10xx Ti series. I cannot produce the same issue via other graphics cards such as Intel HD in Windows 10. I don't have access to dozens of machines and card setups so I am at a bit of a loss here. I am working with the 5.0.10 build of Allegro 5 with TDM-GCC 4.7.1 (yes, I know it is slightly outdated). I have tried reaching out to Nvidia through customer support and their developer forums with no success yet. I don't feel like it is a platform issue using older library files as this game does run in the Windows 10 environment, just not with an Nvidia Geforce attached. The game flow is a simple Login with a few bitmaps drawn, which has a bit of lag with Geforce, and then upon trying to enter the game world where there are large amounts of bitmap calls to render it fails almost entirely less a few bitmaps. I should note that Nvidia + earlier versions of Windows works just fine. Just wondering if anyone else is having issues such as this and if there is a work around within the community.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Apollo_EE said:

I am working with the 5.0.10 build of Allegro 5 with TDM-GCC 4.7.1 (yes, I know it is slightly outdated).

I'm sorry, but that's way out of date. Come back when you can reproduce the issue with the latest version of allegro. 5.0.10 was released 5 years ago. Not trying to be rude, but there's no point trying to fix an issue that has likely been dead for a long time.

Apollo_EE
Member #14,148
March 2012

So your suggestion is that because 5.0.10 is 5 years old it won’t work on an OS that is 3 years old? You do realize Allegro 4 programs still run on Windows 10, right? I am fairly certain it is Nvidia at this point after doing some further research with many developers having issues with rendering using other libraries such as SDK and OpenGL in Windows 10. I can run programs developed in Win98 using much older libraries. Does every program just stop working because the binary was compiled with out-dated libraries? Nope. I can’t reproduce this after a few tests from peers with other video cards so I am going to leave this at Nvidia is working thru some bugs and older versions of Allegro can still draw bitmaps on modern machines. Ciao.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Okay, so what do you suggest we do instead? The point is there is no reason not to be compiling with a version of allegro that is not 5 years old. Should we make a new branch based off 5.0.10, try to find the cause of your problem, and then patch it and try to merge it with master? Or gf, you update your allegro version, and see if the problem still exists. Then we can actually do something.

Right now, the way I see it is like this. "I run Windows 95, and there's a bug, can I get it fixed?"

Sorry to be so blunt. I always try to be more welcoming, so my apologies.

Chris Katko
Member #1,881
January 2002
avatar

His point is that you should always run the most recent version when developing a program, to make sure the bug hasn't ALREADY been fixed. It's a lot of work to support older versions when the solution may be as simple as... download the most recent version.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I came off pretty harsh. Let me rephrase everything.

I don't doubt you're having problems. I also believe you when you say you're having problems with Nvidia cards on Windows 10. Those are noteworthy issues. However, the root cause of those issues is what is important here.

Let me try and address your issues one by one.

Apollo_EE said:

So your suggestion is that because 5.0.10 is 5 years old it won’t work on an OS that is 3 years old?

Well, yes. But not necessarily because the OS is new. Windows has done an amazing job keeping everything backwards compatible all this time. There are other things to consider here, namely the hardware. The Nvidia GTX 1050 Ti was released around a year and a half to two years ago. That makes Allegro 5.0.10 3 years old by the time it was released. It would be nice if we could make allegro support indefinitely forward compatible, but that's kind of impossible given changes in hardware.

Apollo_EE said:

You do realize Allegro 4 programs still run on Windows 10, right?

You do realize allegro 4 is a software renderer that runs on the cpu, and allegro 5 is a hardware accelerated renderer that runs on the gpu? Which means it depends explicitly on the graphics card you are using.

Apollo_EE said:

Does every program just stop working because the binary was compiled with out-dated libraries?

Not every program. But if everyone kept using old buggy versions of software when there was a newer version available that probably fixed the problem, then what?

Come back when you can reproduce the issue with the latest version of allegro.

That would imply I wanted you to leave, which is not true. But if you want to verify the root cause of this issue, whether it's video drivers, hardware, or a problem with allegro, then you need to compile against the latest version of allegro. Otherwise there's literally nothing we can do to help you.

I know it can be a pain to upgrade your tool chain, but the options these days are pretty good. The Allegro 5.2.4 release thread has links to the most current binaries.

SiegeLord builds the official binaries, and you can find them here :
Allegro 5 releases

I build my own with all the dependencies and examples and the whole smorgasbord included here :
Allegro524_MinGW64_GCC72_posix_dwarf.7z

You need the compiler they were built with, which you can get here :
MinGW-W64_GCC7.2.0_posix_dwarf.7z

Apollo_EE said:

still have freeze up issues in my video thread. It seems that the program runs without crashing even though the video has failed. Also, disabling the display adapter via device manager in Windows 10 is the only fix I have atm.

If you're using multiple threads, then you need to be aware that when you draw to a display, it has to be from the same thread that created it.

What does 'the video failed' mean?

Disabling the display adapter is a drastic 'fix'. And what exactly does that 'fix' anyway?

Apollo_EE said:

I don't feel like it is a platform issue using older library files as this game does run in the Windows 10 environment, just not with an Nvidia Geforce attached. The game flow is a simple Login with a few bitmaps drawn, which has a bit of lag with Geforce, and then upon trying to enter the game world where there are large amounts of bitmap calls to render it fails almost entirely less a few bitmaps.

What do you mean 'it fails'?

I want you to feel welcome here, so please do come back and let us know of your progress on this issue. Like I said, it may be drivers, hardware, or allegro but we won't know until you test it with the most recent version of allegro.

Neil Roy
Member #2,229
April 2002
avatar

I came off pretty harsh. Let me rephrase everything.

In this case, you didn't come off as harsh at all. You were right on the money.

If you're using a version of the library which was built before the operating system you are on even existed, and you have problems, than it only makes sense to use the latest version, especially when you're looking at a five year span!

The good news is, the last version that came out is the easiest of all the versions of Allegro 5 to compile, so the original poster need not worry about getting it compiled. If I can do it, anyone can. ;)

As for Allegro 4 working, well why not use it? Because it is out of date and doesn't support all modern features a library should, and when you want those modern features, you need to have the most up to date version which patches any bugs. THEN if you have trouble, you can submit the bugs to be squashed. If Allegro 4 didn't work, would it make sense to complain?

Anyhow, in this case, I thought you were too hard on yourself Edgar, what you stated makes perfect sense. If the version of Allegro 5 doesn't work for you, than logically you move on to a newer version to see if any bugs were fixed before you complain. Otherwise by complaining about it, he is looking for a possible bug fix that may have already been fixed, which is pointless.

I would also like to see a small example program which replicates the problem so that we could run it and test it on our end or offer suggestions for improvement. ESP isn't something I have mastered yet. ;)

---
“I love you too.” - last words of Wanda Roy

Apollo_EE
Member #14,148
March 2012

I have been doing some work in between work and game building. I have tested my tilemap editor on the Win10/Nvidia machine with no problems using the same Allegro library. I have taken heart the advice to update to the latest build of Allegro. Followed the guide from the wiki titled "Building Allegro 5.1 (rev 15032) Windows 7. Having some errors with using CMake GUI to assemble OpenAL such as OSS and ASLA missing. Is there a preferred source for that or an updated guide for building 5.2.4. Sorry, it has obviously been a few years.

Neil Roy
Member #2,229
April 2002
avatar

There were dependencies supplied in the thread about the latest version (links to them). The latest version was honestly the first one I was able to compile. I downloaded the dependencies and the source and used CMAKE GUI and built all the different static and dll, debug, mammoth etc... versions, just to see if I could. :) So, there should be no need to build the dependencies yourself. I didn't have to.

I compiled mine with Code::Blocks + MinGW-W64 7.2.

---
“I love you too.” - last words of Wanda Roy

Chris Katko
Member #1,881
January 2002
avatar

Remember, you can get the newest version without having to compile it.

https://github.com/liballeg/allegro5/releases

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Apollo_EE
Member #14,148
March 2012

Still at a loss here. Would anyone be willing to build a TDM-GCC version. I am using 4.7.1 at the moment, but I could upgrade I suppose. Thanks in advance.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

That's a really old compiler. Chances are likely no one is going to search for your exact version, download it, and build allegro for you.

However, I will give you a step by step guide to installing latest Allegro with a more modern compiler freely available anywhere if you want.

Please don't use any instructions on building allegro that say 5.0 or 5.1 on it. That's way out of date.

The latest instructions can be found here though :

https://wiki.allegro.cc/index.php?title=Install_Allegro5_From_Git/Windows

They are pretty thorough, and mostly up to date. I will try to edit it with the latest instructions today if I can.

Advice - I recommend using cmake-gui instead of cmake. It makes everything immensely easier to configure, generate, and understand.

You want to checkout 5.2.4.1 or master. They're probably not far apart, but 5.2.4.1 had a couple important fixes if you're going to build from scratch.

git checkout 5.2.4

Also, TDM-GCC and vanilla MinGW are NOT a compiler I would recommend you use. You're much better off with MinGW-W64 as they are active and up to date. They have GCC 7.3 out already, with 8 on the way. The only way you can get GCC 8 is on linux.

Apollo_EE
Member #14,148
March 2012

Thanks, it seems like the build instructions for Allegro are probably the most well hidden gems on the internet. I have CMake-GUI and have been following the builds. Also, had a friend recommend not using TDM as well because that compiler is no longer up to date. Gonna try building again this weekend. Hopefully I can get a working build going soon.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

EDIT 05/28/2018

I spent a couple days putting together a new distribution of allegro built with mingw-w64 gcc 8.1 and Allegro 5.2.4.1. Get them here :

https://www.allegro.cc/forums/thread/617424

I also made a full compile guide for building allegro and all of its dependencies on Windows with MinGW-W64. See it here :

http://members.allegro.cc/EdgarReynaldo/BuildA5.html

Original post

Okay, a few more caveats :

You do want MSYS, preferably 1.0. In this case the old version is the good one.

You don't want vanilla MinGW, you want MinGW-W64 or comparable.

Or, you can use MSYS2 and the mingw-gcc that you install with it. Instructions for building with MSYS2 are here :

https://wiki.allegro.cc/index.php?title=Building_with_msys2

Although, since SiegeLord and I both host binaries, I would recommend them over building them yourself. The a5 source pack is out of date, and there are bugs in the dependency libraries contained within it. To truly build ALL of allegro 5 yourself, you need at least libpng, zlib, physfs, libogg, libvorbis, libtheora, freetype2, libturbo-jpeg (provides libjpeg), and various other libraries for the audio addons if you need obscure formats. Some of them you can build with cmake, some you have to build with msys in certain ways.

I put together a package of the latest dependencies (most anyway) source code so you don't have to search all over for it.

Up to date dependencies source code for building Allegro 5

keprast
Member #16,794
January 2018

How is the Reach star war. :P

Go to: