Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 8 9 [10] 11 12 ... 28

Author Topic: Dwarf Fortress 0.43.04 Released  (Read 199924 times)

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Dwarf Fortress 0.43.04 Released
« Reply #135 on: June 22, 2016, 07:01:42 pm »

I just did a bit of tracing through this crash-on-exit, and I've narrowed it down to the destructor for one of the globals - it appears to be calling a function through a pointer (where said pointer points into the data segment, causing the crash) and then closing 3 file handles, which are almost definitely STDIN, STDOUT, and STDERR.

enabler.cpp contains the following new code, which I can't help but suspect may be related to the crash:
Code: [Select]
#ifdef WIN32
//NOTE: TO FIX SDL LINKER ERROR THAT CAME UP WITH VISUAL STUDIO 2015
extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; }
#endif

[edit] Just did some more research, and I can 100% confirm that this is the cause of the crash - __iob_func is supposed to be a function which returns the array, not the array itself.

This should fix the problem:
Code: [Select]
#ifdef WIN32
FILE _iob[] = {*stdin, *stdout, *stderr};
extern "C" FILE * __cdecl __iob_func(void)
{
    return _iob;
}
#endif

The "proper" solution would be to recompile SDL using MSVC 2015.
« Last Edit: June 22, 2016, 07:06:17 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews
Re: Dwarf Fortress 0.43.04 Released
« Reply #136 on: June 22, 2016, 07:05:23 pm »

I just did a bit of tracing through this crash-on-exit, and I've narrowed it down to the destructor for one of the globals - it appears to be calling a function through a pointer (where said pointer points into the data segment, causing the crash) and then closing 3 file handles, which are almost definitely STDIN, STDOUT, and STDERR.

enabler.cpp contains the following new code, which I can't help but suspect may be related to the crash:
Code: [Select]
#ifdef WIN32
//NOTE: TO FIX SDL LINKER ERROR THAT CAME UP WITH VISUAL STUDIO 2015
extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; }
#endif

^- that linker error should be resolvable by rebuilding SDL and SDLmain static library with VS2015. __iob_func refers to symbols in the CRT that went away with VS2015. Reference: https://groups.google.com/forum/#!topic/dislin-users/kagVl9LVFJA

So I'm guessing remove the SDL linker line from enabler, rebuild SDL/SDLmain, rebuild DF?
Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Dwarf Fortress 0.43.04 Released
« Reply #137 on: June 22, 2016, 07:18:09 pm »

Quietust and NCommander wizarding it up.
Spoiler (click to show/hide)
Logged

Random_Dragon

  • Bay Watcher
  • Psycho Bored Dragon
    • View Profile
Re: Dwarf Fortress 0.43.04 Released
« Reply #138 on: June 22, 2016, 07:19:12 pm »

So, what's Toady's opinion on this "let's ditch 32-bit" idea? D:
Logged
On DF Wiki · On DFFD

"Hey idiots, someone hacked my account to call you all idiots! Wasn't me you idiots!" seems to stretch credulity a bit.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Dwarf Fortress 0.43.04 Released
« Reply #139 on: June 22, 2016, 07:21:07 pm »

Given that he provides the legacy version, probably less vehement than some of us, lord knows I'm an advocate for the "all 64 bit all the time everywhere" side, while he just wants to have it updated and get that ready for the future I think.
Logged

Random_Dragon

  • Bay Watcher
  • Psycho Bored Dragon
    • View Profile
Re: Dwarf Fortress 0.43.04 Released
« Reply #140 on: June 22, 2016, 07:24:54 pm »

Yay. Personally I wouldn't mind either version, just the issue of what my current systems have as a consequence of irritating circumstances. :V
Logged
On DF Wiki · On DFFD

"Hey idiots, someone hacked my account to call you all idiots! Wasn't me you idiots!" seems to stretch credulity a bit.

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Dwarf Fortress 0.43.04 Released
« Reply #141 on: June 22, 2016, 07:37:31 pm »

[edit] Just did some more research, and I can 100% confirm that this is the cause of the crash - __iob_func is supposed to be a function which returns the array, not the array itself.

Ha ha, yeah, I just used the first thing I found which made it compile and not obviously crash (I still have no visible crash symptoms).  I can switch it over with the next set of linker tests as I try to sort out this memory problem.  I could try rebuilding SDL instead, but I'll probably find a way to screw that up.
Logged
The Toad, a Natural Resource:  Preserve yours today!

Random_Dragon

  • Bay Watcher
  • Psycho Bored Dragon
    • View Profile
Re: Dwarf Fortress 0.43.04 Released
« Reply #142 on: June 22, 2016, 07:38:36 pm »

Ha ha, yeah, I just used the first thing I found which made it compile and not obviously crash (I still have no visible crash symptoms).  I can switch it over with the next set of linker tests as I try to sort out this memory problem.  I could try rebuilding SDL instead, but I'll probably find a way to screw that up.

You're reminding me far too much of any time I'd try to mess with the source code in CDDA. XP
Logged
On DF Wiki · On DFFD

"Hey idiots, someone hacked my account to call you all idiots! Wasn't me you idiots!" seems to stretch credulity a bit.

NCommander

  • Bay Watcher
  • Dwarven Military Master
    • View Profile
    • SoylentNews
Re: Dwarf Fortress 0.43.04 Released
« Reply #143 on: June 22, 2016, 07:46:25 pm »

[edit] Just did some more research, and I can 100% confirm that this is the cause of the crash - __iob_func is supposed to be a function which returns the array, not the array itself.

Ha ha, yeah, I just used the first thing I found which made it compile and not obviously crash (I still have no visible crash symptoms).  I can switch it over with the next set of linker tests as I try to sort out this memory problem.  I could try rebuilding SDL instead, but I'll probably find a way to screw that up.

Rebuilding SDL is straight-forward. Download the source, upgrade the project file in VisualC/, and bake one release build. I have a build environment sitting here ready to go, and if you'd like, I can rebuild all of DF's dependencies against 32-bit and 64-bit for a quick and easy to go dev environment if you like.
Logged
Quote from: TheFlame52
Fucking hell man, you aren't just getting the short end of the stick, you're being beaten with it.
Quote from: NRDL
Is your plan really to flush water into hell, and have the CARP marines fight them without threat of flame or disease?  If so, you are awesome, and one of the greatest DF military visionaries I've seen yet ( not that I've seen that many, or any, for that matter )

breadman

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 0.43.04 Released
« Reply #144 on: June 22, 2016, 09:13:59 pm »

On Windows 8.1, I saw errors for msvcp140.dll before downloading it, then vcruntime140.dll, and now api-ms-win-crt-runtime-l1-1-0.dll, so I'd guess they'll all need to be included unless we're expected to install something.
Also, on the topic of the runtime, here's what will probably fix it permamently: Go to "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86", copy and paste everything, and throw it into the DF folder. I can't test it easily, but that's all the files for the VC15 runtime. I'll post a zip in a moment.

EDIT: For anyone who wants to test or has runtime errors, grab http://dffd.bay12games.com/file.php?id=12184, and extract that zip into the same folder that you have DF 0.43.04 in.

EDIT 2: Here's the license from Microsoft on redistributing the DLLs in the runtime: http://go.microsoft.com/fwlink/?LinkId=524842
Yes, that set of libraries allows me to run DF.  I'm not seeing an error message on exit, but it does return exit code 5.
Logged
Quote from: Kevin Wayne, in r.g.r.n
Is a "diety" the being pictured by one of those extremely skinny aboriginal statues?

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Dwarf Fortress 0.43.04 Released
« Reply #145 on: June 23, 2016, 01:37:20 pm »

Rebuilt SDL and everything still works as far as I can tell over here.  Fell back to old FMOD, turned off the fast incremental link option and managed to get SDL 64 bit working as well!  Shared saves between SDL64 and legacy32 back and forth without a problem.

Current plan:
(1) get rid of several platform-independent warnings/issues
(2) bundle up some windows test zips for people to mess with in here, while:
(3) the linux journey
(4) the osx journey
Logged
The Toad, a Natural Resource:  Preserve yours today!

LordBaal

  • Bay Watcher
  • System Lord and Hanslanda lees evil twin.
    • View Profile
Re: Dwarf Fortress 0.43.04 Released
« Reply #146 on: June 23, 2016, 03:28:10 pm »

(5)Profit??

I for one, humbly volunteer to test it for Windows 10 Pro 64 bits.
Logged
I'm curious as to how a tank would evolve. Would it climb out of the primordial ooze wiggling it's track-nubs, feeding on smaller jeeps before crawling onto the shore having evolved proper treds?
My ship exploded midflight, but all the shrapnel totally landed on Alpha Centauri before anyone else did.  Bow before me world leaders!

cesarjunior233

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress 0.43.04 Released
« Reply #147 on: June 23, 2016, 05:28:18 pm »

I am getting the error : The program can't start because you not have api-ms-win-crt-runtime-l1-1-0.dll in your computer.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Dwarf Fortress 0.43.04 Released
« Reply #148 on: June 23, 2016, 05:40:19 pm »

I am getting the error : The program can't start because you not have api-ms-win-crt-runtime-l1-1-0.dll in your computer.

Install the Visual C++ Redistributable for Visual Studio 2015 for x86 (not x64).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Dwarf Fortress 0.43.04 Released
« Reply #149 on: June 23, 2016, 06:30:46 pm »

Here are the test zips for SDL Windows:

http://bay12games.com/dwarves/redist/df_sdl_32_wintest.zip
http://bay12games.com/dwarves/redist/df_sdl_64_wintest.zip

If you use the 64 bit one, it would probably be best to stay away from the bug tracker and just post strange problems in here.
Logged
The Toad, a Natural Resource:  Preserve yours today!
Pages: 1 ... 8 9 [10] 11 12 ... 28