Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
FLARE

Windows 10 and Flare (Some bugs)

npaulo
Tuesday, February 5, 2019 - 09:09

Hi,

 

Well, tried today to compile and run flare on a Windows 10 machine (64 bits) and run into some problems:

 

- Aparrently mingw doesn't like 64 bits and you get a lot of trouble to actually make it link with the necessary and correct libs.

(What I've done was install the MSYS version from this website, recomended by SDL: http://mingw-w64.org)

 

- PlatformWin32.cpp is not really updated. It's missing some config inicialization and because of that, clicking in configuration and on new game (after character creation) leads to a Segmentation Fault cause it tries to access those vectors that have not being initialized. Fixing the constructor in PlatformWin32.cpp has fixed this problem.

- I wasn't able to use the --data-path to set a different location for the mod files. I had to copy that to the mod directory under the flare.exe directory. There's something wrong with paths on windows and I hadn't time to dig on this for now.

 

- BehaviorStandard.cpp, line 194 is also Segfaulting.

    pursue_pos = target_stats->pos;

   Aparrently target_stats might be NULL.

   I think that I was being killed while I killed an Skeleton at almost the same time.

   (not sure, but maybe a lock is needed on this case?)

Well,

So far is that. If I find any more problems and/or solutions, I'll post here.

Cheers and nice work!

  • Log in or register to post comments
dorkster
joined 9 years 10 months ago
Thursday, February 7, 2019 - 19:21
dorkster's picture

Thanks for the report.

  • Not sure how I missed vector init in the Win32 platform. I've push a fix for this.
  • As for the crash in BehaviorStandard, it happened whenever the player died because the AI couldn't find a valid target. This was due to a recent change, and I have pushed a fix for it as well.
  • I don't know what's causing the problem with data-path on Windows. I'll have to investigate.
  • I use the MinGW that's bundled with CodeBlocks, which I believe is 32-bit. Flare doesn't have a high memory requirement, so we went with 32-bit builds for compatibility. Linux 64-bit with GCC and Clang work fine.
  • Log in or register to post comments
dorkster
joined 9 years 10 months ago
Friday, February 8, 2019 - 09:04
dorkster's picture

Question about the data-path issue:

Did you receive any error messages when changing the data path? I just did a clean "Release" build on Windows 7 and was able to use the flag successfully.

I believe SDL handles populating argc/argv on Windows since Windows treats console and gui applications differently. Maybe this is broken on versions of Windows > 7?

  • Log in or register to post comments
npaulo
joined 3 years 3 months ago
Friday, February 8, 2019 - 17:44

Hi,

 

There's something strange. Look:

 

D:\WORK\GAMES\flare-engine-master>flare.exe --data-path="..\flare-game-master\mods"
ERROR: Invalid custom data path: ""..\flare-game-master\mods"/"
INFO: Flare 1.09.05 (Windows)

 

Windows uses "\" for path. What's this "/" being there?

 

Well, I saw a couple of places that there's use of "/" on code and that would be used on windows, which appears to be wrong.

main.cpp does that, PlatformWin32.cpp and also ModManager.cpp

 

I've tried to change some stuff, but then I gave up since I don't want to waste much time now on this, but it will take some work to make it right and generic for every OS.

 

I don't know how you can do this correct on Windows 7.

 

Regards

 

 

 

npaulo

  • Log in or register to post comments
dorkster
joined 9 years 10 months ago
Friday, February 8, 2019 - 21:35
dorkster's picture

Okay, I was wrong about data-path working for me. I just happened to have mods in the fallback directory, so I didn't notice it was failing.

After some testing, it turns out that Windows preferring backslashes for paths isn't the problem. We don't convert the forward slashes in mod data files, and they work just fine. The problem actually ended up being the trailing slash. The stat() function errors when given a path that ends in either a slash or a backslash.

I've created a fix for this on a separate branch. I still need to test it more throughly before moving it upstream.

  • Log in or register to post comments
dorkster
joined 9 years 10 months ago
Saturday, February 9, 2019 - 07:05
dorkster's picture

This data-path fix is now in the master branch. One thing to note: If you have a path with spaces, you need to put the double quotes around the flag as well, like so:

flare.exe "--data-path=..\path with spaces"

  • Log in or register to post comments