bah.datetime

BlitzMax Modules Forums/Brucey's Modules/bah.datetime

Hi,

when trying the samples of the datetime module I get an error message. It's not a BlitzMax error but an error from Microsoft Visual C++ Runtime:
Title: Microsoft Visual C++ Runtime Library

Runtime Error!

Program: ...mod\bah.mod\datetime.mod\examples\ttimeduration_hour.exe


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

[OK]


BlitzMax-Output is:
Linking:ttimeduration_hour.exe
Executing:ttimeduration_hour.exe
signal!:22
Received Signal
Process complete


My system is WindowsXP Professional SP2 with BlitzMax 1.28

That's exciting, as I always thought it used gcc to build the mod!!

I get this :
Building ttimeduration_hour
Executing:ttimeduration_hour.debug.exe
10:00:00

Process complete

Also on XP Pro SP2.

Perhaps you can rebuild the boost and datetime modules?

Otherwise, I'm not sure where your error originates!

Just rebuilded both modules with bmk makemods -a bah.modulname but the error occurs again.

Ok, when I run it in debug mode the following happens:

I get a notify with
Title: Runtime Error

Unhandled Exception: Received Signal

[OK]


The console output (I've now switched from gui to console build too) is the following:
Executing:ttimeduration_subtract.debug.exe
signal!:22
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


The highlighted line is no 2814:
		this.localePtr = bmx_locale_new(this.facetPtr, locale)

It's the function Function CreateForLocale:TDateFacet(locale:String) in Type TDateFacet Extends TLocaleFacet

Thanks.. yep.. think I've found a problem with that function too.

If you want to try a fix, search for bmx_locale_new in glue.cpp

and change the line inside the catch(...) block from :
		return new std::locale(std::locale(""), d);

to
		return new std::locale(std::locale(), d);

(note the removal of the quotes.)

Yeah, it works great.