Re: [fluxbox-users] QT applicacion dies on plain fluxbox, but not on fluxbox on top of LXDE

Nable <[email protected]> Thu, 12 Nov 2015 01:41:10 +0300
Newsgroups gmane.comp.window-managers.fluxbox.user
Message-ID <CALxOYEY1DHPTvaokDZeam9xzAY5CcgtatabEdXFpMYPWe+tVDA@mail.gmail.com>
Ok, let the fun go.
What version of hpmyroom are you using?
Does this one look familiar?
$ wc -c hpmyroom_deb
46537605 hpmyroom_deb
$ md5sum hpmyroom_deb
4f2e520894f453a533f81d1163ddfa85  hpmyroom_deb

It was extracted from hpmyroom_v10.4.0.0168_i386.deb, thus the "_deb" suffix.
It's a 32-bit version without even -fomit-frame-pointer, so debugging
seems to be easy:

 832e2c6:       8d 83 e8 ad e7 fe       lea    eax,[ebx-0x1185218]
 832e2cc:       89 11                   mov    DWORD PTR [ecx],edx
 832e2ce:       c7 41 28 00 00 00 00    mov    DWORD PTR [ecx+0x28],0x0
 832e2d5:       c7 41 2c 00 00 00 00    mov    DWORD PTR [ecx+0x2c],0x0
 832e2dc:       89 04 24                mov    DWORD PTR [esp],eax
 832e2df:       e8 3c 87 d2 ff          call   8056a20 <getenv@plt>
 832e2e4:       b9 03 00 00 00          mov    ecx,0x3
 832e2e9:       89 c6                   mov    esi,eax
 832e2eb:       f3 a6                   repz cmpsb ; <<< here it fails
in your case

As you can see, this application tries to get the value of some
environment variable and then compare it with some string (i'm a bit
in a hurry now to find the exact values by myself). But if this
environment variable is missing, getenv returns NULL and application
fails in a bad way. Now you can find exact values of interesting
strings:
$ gdb hpmyroom
tb *0x832e2df
run
print (char*)$eax
print (char*)$edi

First print gives you the variable name, second one shows some string.
What are these strings?

------------------------------------------------------------------------------