Closed Vidrep closed 5 years ago
@jsteinaker
It's not crashing here. I've uploaded a new HaikuPorts recipe a few hours ago, which doesn't use the patchset anymore, since the changes that were there are already merged on the tree. It's not merged yet but you should be able to get it anyway. Starting with that recipe only I can sucessfully build StreamRadio, downloading the sources from GitHub, and it doesn't crash. I was thinking that maybe the patch (if you're using it) is breaking something...
Also, it seems the crash is coming from the Load method in Radio Settings class. I haven't changed anything there. Save() method now calls Rewind(), so it actually deletes a Station when asked, but that method shouldn't be called on startup anyway. Did you try deleting your "Stations" folder?
Thanks for reporting!
EDIT: same exact hrev and arch here. Waaaaaay less memory, inside VirtualBox.
Did you test on 64 bit? I also built from the new recipe, and it also crashes (same as above). I tried deleting the "stations" folder too. Same. Previously installed version works OK.
Yes, I'm on x64. It would be great if more people could try building the new version to see what happens.
c983b6e3ed5c5ef9b3f53ef8a6204d1cd5e0cdd8 works on 32bit (hrev53209).
c983b6e crashes on 64bit (hrev53233)
Just downloaded last 64bit nightly (hrev53237) to start the build absolutely from scratch. Works fine here.
Maybe a stupid idea but... how much memory do you guys have? Real hardware or VM? The main difference between your setup and mine that I can think of it's this one, I'm on a VM with only 2-3gb of RAM...
Try using the guarded heap, it's possible some slight difference is triggering memory corruption which the guarded heap should catch.
Do you mean this? https://www.haiku-os.org/blog/mmlr/2010-02-08_using_malloc_debug_find_memory_related_bugs/
Also, what about the while condition check line in the Load() method in RadioSettings.cpp? I'm taking about operator precedence, I guess that might be wrong but I can't check now
Built on real hardware. x86_64 Core i7-3770, 16GB memory
Yes, you'll want the guarded heap though, so in addition to the LD_PRELOAD, add MALLOC_DEBUG=g
also.
Running the following: LD_PRELOAD=libroot_debug.so MALLOC_DEBUG=g StreamRadio
`` Debug information for team /boot/system/apps/StreamRadio (920): CPU(s): 8x Intel Core™ i7-3770 Memory: 15.88 GiB total, 624.45 MiB used Haiku revision: hrev53233 Jul 5 2019 17:08:51 (x86_64)
Active Threads: thread 923: team 920 debug task thread 920: StreamRadio (main) state: Call (abort() called)
Frame IP Function Name
-----------------------------------------------
00000000 0x2095f3a9e7f _kern_debugger + 0x7
Disassembly:
_kern_debugger:
0x000002095f3a9e78: 48c7c0e1000000 mov $0xe1, %rax
0x000002095f3a9e7f: 0f05 syscall <--
0x7feee7ffa770 0x2095f3a1cc3 abort + 0x4a
0x7feee7ffa9b0 0x1326f918773 __absvdi2(DItype) + 0x73 (/sources/gcc-8.3.0/libgcc/libgcc2.c:-1)
0x7feee7ffaa50 0x1d8ba1f4146 _ZN12StationsList4SaveEv.cold.8 + 0
0x7feee7ffaba0 0x1d8ba1f805a RadioSettings::Load() + 0xca
0x7feee7ffabd0 0x1d8ba1f80bf RadioSettings::RadioSettings() + 0x3f
0x7feee7ffabf0 0x1d8ba1f778b RadioApp::RadioApp() + 0x2b
0x7feee7ffac10 0x1d8ba1f4e71 main + 0x21
0x7feee7ffac40 0x1d8ba1f51c9 _start + 0x39
0x7feee7ffac70 0x99501c3573 runtime_loader + 0x103
00000000 0x7fff3d81d260 commpage_thread_exit + 0
``
I'just built 26f3bbda29da165c849d246038af98e17270249c and it crashes with the same back trace.
Also built current version from haikuports (after commenting out PATCHES) and it has the same problem.
Thank you all for the feedback.
I ran StreamRadio using malloc_debug=g. It did not crash on startup. BUT, it crashed when doing a search, so I've just fixed that on my repo.
However, if you double-click on an empty space on the stations list on the main window, it crashes (with or without malloc_debug=g). It might be related to https://github.com/fishpond-haiku/Haiku-Radio/issues/4 and I guess it might be related to the crash you're experiencing as well.
I'll keep further investigating this.
Still crashes with your fix applied.
MALLOC_DEBUG=g StreamRadio
Well, that was... ¿expected? The crash I fixed was apparently a different one.
I've just fixed the one happening when double-clicking the main window. Not that should fix the crash you're experiencing on startup, since I can't reproduce that one, even with MALLOC_DEBUG=g (and MALLOC_DEBUG it's working, cause I wasn't seeing the first crash I've fixed before enabling the flag). I'll keep looking around the code in your screenshot.
Again, thanks for the feedback, it's much appreciated.
A couple of lines before the line marked in your screenshot, when casting to (BGroupLayout), there's a space that shouldn't be there between BGroupLayout and the character... could be this? I've tried it and it compiles and works OK, but I wasn't experiencing the crash in first place so I can't tell...
With your new fix and with space removed it still crashes as before. In release mode as in description and in debug mode in MainWindow.cpp. Have you tried make clean
and rebuilding again?
How about a real time discussion on IRC at #haiku-3rdparty
Just did it, same result, works fine here (I even started with a fresh virtual machine and different hrev at some point)
@Vidrep I'm leaving now, but I'm up for that at a different moment.
What gcc version do you use? Note, that by default it is still gcc7 now.
Huh? No, we are using GCC8?
anyboot images still have gcc7 by default I believe.
Will check later, but definitely whatever is on latest x64 nightly anyboot by default
gcc 7.3.0 here
So, can you try with gcc8?
Updated to gcc-8.3.0, make clean, recompiled. Aaaaaand we have a crash on startup, finally. Also, A LOT more warnings during compilation (it was only throwing a small one with gcc7).
I guess I should start reading them, but that's a different story. Any pointers in the right direction are very welcome. If anyone wants to try the changes in StreamRadio in the meantime, gcc7 is the answer.
Ok, the warnings and runtime errors were related and fortunately the fixes were easy. Can you please try them? I've already made a pull request, I'll make another for the haikuports tree as soon as this one is approved.
Thanks! It release version doesn't crash anymore in 9d387c7de01c1e0a33d09b3848fdcf290e7878c9.
However, it still crashes when compiled with DEBUGGER := TRUE
.
Great. I'll keep investigating the matter. Should we close this? (Or maybe change the subject to reflect the crash was about the transition to gcc8, and not about the changes made). Thanks!
StreamRadio now launching without a crash when built with gcc8.3. Closing as fixed. Thank you for looking into this issue!
hrev53233 x86_64 Built Haiku-Radio from source. The app crashes on launch. The version I already had installed does not. Debugger report below: