Opened 9 years ago

Closed 9 years ago

#5746 closed defect (fixed)

setlocale crash

Reported by: vindoctor Owned by: warmerdam
Priority: normal Milestone: 1.9.3
Component: Algorithms Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

I built the latest trunk within the last 4 weeks with vs2012 and the released proj4.

I know gdal fixed issues already with the locale being called in multiple threads, but is seems issues still exists in places (or a component gdal uses). *Note, it is a background thread that crashed here.

ntdll.dll!7774e725() Unknown

[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!7774f659() Unknown msvcr110.dll!_unlock(int locknum) Line 366 C

msvcr110.dll!setlocale(int _category=4325376, const char * _locale=0x26eb2caf) Line 119 C

msvcr110.dll!malloc(unsigned int size=4325376) Line 91 C 00000001() Unknown msvcr110.dll!malloc(unsigned int size=265168674) Line 91 C gdal200.dll!_pj_malloc() C msvcr110.dll!_getptd_noexit() Line 312 C msvcr110.dll!_errno() Line 281 C gdal200.dll!CPLStrtodDelim(const char * nptr=0x00000002, char * * endptr=0x00000000, char point='ô') Line 307 C++ gdal200.dll!CPLAtof(const char * nptr=0x269a22f0) Line 147 C++

Change History (6)

comment:1 by vindoctor, 9 years ago

Version: unspecifiedsvn-trunk

comment:2 by Even Rouault, 9 years ago

Resolution: fixed
Status: newclosed

Please try with a more recent trunk: see http://lists.osgeo.org/pipermail/gdal-dev/2014-November/040435.html

There might still be issues with proj4, but then it is a proj4 bug.

comment:3 by vindoctor, 9 years ago

Component: GDAL_RasterAlgorithms
Milestone: 1.9.3

Thank you! Building now. just to note as its an easy work around.. this is not defined during the gdal build with visual studios so one has to manually add it to build.

#ifdef GDAL_COMPILATION #define wkb25DBitInternalUse 0x80000000 #endi

comment:4 by Even Rouault, 9 years ago

GDAL_COMPILATION is defined in the stock nmake.opt. I guess you've modified yours. The recommanded way of customizing nmake.opt is to left it untouched but create a nmake.local

CFLAGS	=	$(OPTFLAGS) $(WARNFLAGS) $(SSEFLAGS) $(INC) $(EXTRAFLAGS) $(OGR_FLAG) $(MSVC_VLD_FLAGS) -DGDAL_COMPILATION

comment:5 by vindoctor, 9 years ago

Priority: highestnormal
Resolution: fixed
Severity: blockernormal
Status: closedreopened

"GDAL_COMPILATION is defined in the stock nmake.opt. I guess you've modified yours."

Nope..

SVN revision 27996 does not have the change mentioned. Thanks BTW as its easy enough to fix.

https://svn.osgeo.org/gdal/trunk/gdal/nmake.opt

in reply to:  5 comment:6 by vindoctor, 9 years ago

Resolution: fixed
Status: reopenedclosed

Sorry.. it does indeed have this. When I merged in I missed it.

Note: See TracTickets for help on using tickets.