Opened 11 years ago

Closed 11 years ago

Last modified 10 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 11 years ago.
patch_537.3.diff (1.6 KB) - added by giohappy 11 years ago.
patch_537.diff (1.4 KB) - added by jef 11 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 11 years ago by giohappy

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 Changed 11 years ago by 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 )

comment:3 in reply to:  2 Changed 11 years ago by jef

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 Changed 11 years ago by giohappy

Resolution: fixed
Status: newclosed

comment:5 Changed 11 years ago by neteler

Resolution: fixed
Status: closedreopened

giohappy: how was it fixed? In GRASS?

Markus

comment:6 Changed 11 years ago by giohappy

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!

Changed 11 years ago by giohappy

Attachment: patch_537.2.diff added

comment:7 Changed 11 years ago by giohappy

I attach the complete patch that solves the problems listed.

Changed 11 years ago by giohappy

Attachment: patch_537.3.diff added

Changed 11 years ago by jef

Attachment: patch_537.diff added

comment:8 Changed 11 years ago by pkelly

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 Changed 11 years ago by neteler

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

comment:10 Changed 11 years ago by giohappy

Resolution: fixed
Status: reopenedclosed

Perfect! Just tested.

comment:11 Changed 10 years ago by daudeoud

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.