Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#537 closed defect (fixed)

g.proj.exe crashes on Windows Vista (osgeo4w)

Reported by: giohappy Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Default Version: 6.4.0 RCs
Keywords: osgeo4w g.proj gdal Cc:
CPU: x86-32 Platform: MSWindows Vista

Description

g.proj.exe crashes on Windows Vista. It can be reproduced simply launching g.prog -w

The crash seems to be related to system32/ntdll.dll, as I can see from the Windows error log. Maybe problems with gdal15.dll and ntdll.dll?

Recompiling grass-6.4.0RC3 from scratch, using gdal and all the dependencies built with MinGW, solves it so it seems a problem related to the actual OSGeo4W stack

Attachments (3)

patch_537.2.diff (1.5 KB ) - added by giohappy 15 years ago.
patch_537.3.diff (1.6 KB ) - added by giohappy 15 years ago.
patch_537.diff (1.4 KB ) - added by jef 15 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 by giohappy, 15 years ago

In many forums I see similar problems with ntdll.dll, for various apps. One interesting explanation could be the following:

ntdll is the user-mode entry into system services (that's "system calls" not process-based services). If a buggy app passes an invalid address to some ntdll entry point, the resulting exception will likely show an address in ntdll. you might see similar problems in many apps - there are many buggy apps out there.

comment:2 by giohappy, 15 years ago

I've run gdb to debug the crash (without -g on build). This is the traceback:

(gdb) run -w Starting program: c:\OSGeo4W\apps\grass\grass-6.5.svn\bin/g.proj.exe -w [New thread 2856.0x364]

Program received signal SIGTRAP, Trace/breakpoint trap. 0x77d47dff in ntdllDbgUiConvertStateChangeStructure ()

from C:\Windows\system32\ntdll.dll

(gdb) warning: Lowest section in C:\Windows\system32\odbcint.dll is .rsrc at 00401000 warning: Invalid parameter passed to C runtime function.

warning: HEAP[g.proj.exe]: warning: Invalid address specified to RtlFreeHeap( 01430000, 015E4700 )

in reply to:  2 comment:3 by jef, 15 years ago

Replying to giohappy:

I've run gdb to debug the crash (without -g on build). This is the traceback:

(gdb) run -w Starting program: c:\OSGeo4W\apps\grass\grass-6.5.svn\bin/g.proj.exe -w [New thread 2856.0x364]

Program received signal SIGTRAP, Trace/breakpoint trap. 0x77d47dff in ntdllDbgUiConvertStateChangeStructure ()

from C:\Windows\system32\ntdll.dll

(gdb) warning: Lowest section in C:\Windows\system32\odbcint.dll is .rsrc at 00401000 warning: Invalid parameter passed to C runtime function.

warning: HEAP[g.proj.exe]: warning: Invalid address specified to RtlFreeHeap( 01430000, 015E4700 )

Please try the attached patch.

comment:4 by giohappy, 15 years ago

Resolution: fixed
Status: newclosed

comment:5 by neteler, 15 years ago

Resolution: fixed
Status: closedreopened

giohappy: how was it fixed? In GRASS?

Markus

comment:6 by giohappy, 15 years ago

I'm sorry. I missed the explanation. It has been PARTLY solved with the attached patches my Jef. It's a problem with memory release. I would keep it open because other tests reveal a strange problem. While the creation of projections has been solved, the proj output as wkt still causes a crash for certain projections. It works fine if I use a loc, i.e., from epsg 3004, while it crashed with epsg 4326 or epsg 32632. I will investigate more.

I hope this kind of memory deallocation problems don't propagate to other parts of Grass!

by giohappy, 15 years ago

Attachment: patch_537.2.diff added

comment:7 by giohappy, 15 years ago

I attach the complete patch that solves the problems listed.

by giohappy, 15 years ago

Attachment: patch_537.3.diff added

by jef, 15 years ago

Attachment: patch_537.diff added

comment:8 by pkelly, 15 years ago

I've committed patches for this similar to Jef's in releasebranch_6_4, develbranch_6 and trunk. I had a look through the same source file and couldn't see any immediately obvious similar bugs. Thanks for the help tracking this down. The bugs were all originally introduced by me...

comment:9 by neteler, 15 years ago

For the record: r36484 (trunk), r36483 (6.5) and r36482 (6.4)

comment:10 by giohappy, 15 years ago

Resolution: fixed
Status: reopenedclosed

Perfect! Just tested.

comment:11 by daudeoud, 15 years ago

I find the same Vista g.proj crash problem on Grass 6.4.0, Qgis 1.0.2 and 1.3 with the OSGeo4W package. Is there a solution without recompiling the package ?

Note: See TracTickets for help on using tickets.