-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StreamRadio crashes on launch when built with GCC 8.3 #8
Comments
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. |
Yes, I'm on x64. It would be great if more people could try building the new version to see what happens. |
c983b6e 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? 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 |
Running the following: LD_PRELOAD=libroot_debug.so MALLOC_DEBUG=g StreamRadio `` Active Threads:
`` |
I'just built 26f3bbd 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 fishpond-haiku/Haiku-Radio#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. |
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 |
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. 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 9d387c7. |
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:
The text was updated successfully, but these errors were encountered: