ldc compiled binaries seg faults

Alexandr Druzhinin drug2004 at bk.ru
Mon Oct 7 08:35:08 PDT 2013


07.10.2013 20:30, David Nadlinger пишет:
>
> The basic idea is to launch the executable in a debugger (gdb myprogram,
> then 'r') and see where it crashes. Without knowing what kind of problem
> this is, it's hard to get more specific.
>
> I tried to have a look at the issue myself, but the program wouldn't
> build (fresh Git clone, dub build):
>
> ---
> Checking dependencies in '/home/aule/Build/Source/geoviewer'
> Package gl3n (configuration "library") defines no import paths, use
> {"importPaths": [...]} or the default package directory structure to fix
> this.
> Package derelict (configuration "library") defines no import paths, use
> {"importPaths": [...]} or the default package directory structure to fix
> this.
> Package glamour (configuration "Derelict3-gl3n-SDLImage") defines no
> import paths, use {"importPaths": [...]} or the default package
> directory structure to fix this.
> Building configuration "application", build type debug
> Running /home/aule/Build/Work/ldc2-llvm3.3-release-multilib/bin/ldmd2...
> /home/aule/.dub/packages/arsd-master/arsd/netman.d(535): Warning: else
> is dangling, add { } after condition at
> /home/aule/.dub/packages/arsd-master/arsd/netman.d(532)
> /home/aule/.dub/packages/arsd-master/arsd/netman.d(505): Error: module
> date is in file 'std/date.d' which cannot be read
> ---
>
> std.date hasn't been around since 2012…
>
> David
Thanks for reply!
Yes, compilation failed because there are outdated files in Adam D. 
Ruppe dub package I use - I removed it manually (if it matters I use 
only two files - characterencodings.d and dom.d).
I tried to use gdb, I've used it just several times, so let me ask some 
question if you don't mind:

(gdb) r bin/osm-no-label.xml
Starting program: /home/drug/workspace/geoviewer/bin/geoviewer 
bin/osm-no-label.xml
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000422a66 in frontend.FrontEnd.__ctor() (this=<optimized out>,
     width=<optimized out>, height=<optimized out>) at frontend.d:45
45			DerelictSDL2.load();

Does it means that the program crashes while derelict loader tries to 
load SDL2 lib? Can I do to investigate it more detaily? I set a 
breakpoint on this line but if I do step the application crashes 
immediatly so I can't to step in DerelictSDL2.load() function (perhaps I 
have code for it)
Sorry for dumb questions.



More information about the digitalmars-d-ldc mailing list