Re: [fluxbox-users] QT applicacion dies on plain fluxbox, but not on fluxbox on top of LXDE
Javier Vasquez <[email protected]> Wed, 11 Nov 2015 17:46:21 -0600
| Newsgroups | gmane.comp.window-managers.fluxbox.user |
|---|---|
| Message-ID | <CALUrRGcQG7Wbe7mg797rbA7Kek+OMaOtHk6tsZ+TbUBcRKtejA@mail.gmail.com> |
On Wed, Nov 11, 2015 at 4:41 PM, Nable <[email protected]> wrote: > 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? First, thanks a lot for the help... I'm using the 64-bit deb package. And version 10.4.0.0168. I believe the binary is the same 32-bit though... Now to the strings when not using any DE, but just plain fluxbox, which cause hpmyroom to die: Temporary breakpoint 1, 0x0832e2df in ?? () (gdb) print (char*)$eax $1 = 0x960dde8 "DESKTOP_SESSION" (gdb) print (char*)$edi $2 = 0x960ddf8 "kde Of course, when using plain fluxbox, DESKTOP_SESSION environment variable is not defined: % echo $DESKTOP_SESSION % When using fluxbox on top of LXDE, that environment variable is defined: % echo $DESKTOP_SESSION LXDE % However hpmyroom stills prints "kde" on $edi: Temporary breakpoint 1, 0x0832e2df in ?? () (gdb) print (char*)$eax $1 = 0x960dde8 "DESKTOP_SESSION" (gdb) print (char*)$edi $2 = 0x960ddf8 "kde" Which surprises me. I was expecting LXDE there, but I was wrong. And with fluxbox on top of LXDE hpmyroom does not die... I tried then setting DESKTOP_SESSION to NONE, on a non DE plain fluxbox session: % echo $DESKTOP_SESSION NONE % And then hpmyroom still prints "kde" on $edi (as expected from the LXDE trial): Temporary breakpoint 1, 0x0832e2df in ?? () (gdb) print (char*)$eax $1 = 0x960dde8 "DESKTOP_SESSION" (gdb) print (char*)$edi $2 = 0x960ddf8 "kde" However now hpmyroom doesn't die. Or at least it doesn't die where it was before. What value would you suggest setting for DESKTOP_SESSION on a non DE plain fluxbox session? Is there actually a standard for that? What would be your suggestions be (besides providing the feedback about this weird dependency)? Specially to define a work around meanwhile (would NONE be OK?). Thanks, -- Javier ------------------------------------------------------------------------------