Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "segfault"
-
😤😤😤 People need to stop believing these sheets in fortune cookies, they are printed using a Linux binary!10
-
How my C programs may as well be written:
#include<stdio.h>
int main() {
printf("Segmentation fault\n");
return 0;
}6 -
Does anyone else have that one guy or gal you work with that's ALWAYS the one to find the weirdest, inexplicable bugs possible? Yup. That's me. Here's some fun examples.
*Unplugs monitor from laptop, causing kernel panic*
*Mouse moves in reverse when inside canvas*
*Program fails to compile, yet compiler blames a syntax error that doesn't exist*
*malloc on the first line of a program causes a segfault*
And for how the conversation usually goes
Me: "[coworker], mind taking a look at this?"
Coworker: "Sure.This better not be another one of 'your bugs'. ... ... ... Well, if you need me I'll be at my desk."
Me: "So you know what's causing it?"
Coworker: "Nope. I've accepted that you're cursed and you should do the same."8 -
Guy: *hands me sheet of paper* What does this code do?
Me: *looks through code written on the paper* Well, most likely segfault.
*awkward silence*7 -
Solved a SEGFAULT in a conventionally undebuggable 800k lines C++ project after 10 hours of investigating 🙌14
-
I have a friend that is a girl that loves to snapchat everything she does, the problem is that she now works (in apprenticeship) at a huge company and she snapchats her desktop who has a lots of post-it notes and her screen which is showing excel spreadsheets with customers data and stuff...
And she does this on a regular basis btw
Who can be possibly that dumb...5 -
Good morning, mornin wood.
Good morning, chirping birds outside the window.
Good morning, handsome guy in the mirror.
Good morning, beautiful machine of mine.
Now where were we last night.
Hmpph
😒😒😒 morning segfault3 -
So apparently due to an extremely talkative x input driver and an error in a certain app, I've been running an emergent keylogger on my computer for half a year. On every keypress event, the driver would call the app, the app would segfault, the driver would log the incident including the event to /var/log and then crash, and the app would restart the worker. I noticed this when I started wondering why /var/log is over 100GB in size.13
-
I love Linux, but its community can be so full of incompetent assholes..
Just now I asked in Freenode ##linux how to get the process ID of my current running process in bash. I got my answer - it's a shell built-in called "$$".
Then people start to nitpick some more - why do you need it? How is that different from an exit? - to which my response was.. well I know the whole idea behind exit codes, and I'd use it whenever possible, in all defined behavior that allows my program to terminate itself whenever it can. This pidfile however would be used to exit itself and provide diagnostic information whenever the program enters undefined behavior - a segfault in C language. Scenarios in which I don't have full control over the script's behavior anymore, such as the system entering an unworkable state where the system stalled, still got some binaries in RAM but the rootfs got unwritable, such as now - very helpfully, thanks HP! - when my laptop likely overheated and shat itself. I issued sudo reboot into it, but even that wouldn't issue properly anymore due to the /sbin/poweroff binary becoming inaccessible too. I had to issue a hard power cycle.. one of the few times in which I'm thankful to HP for actually causing shit like this, lol.
Point is, that undefined behavior is what I'm trying to mitigate against. I certainly can't let any files other than diagnostics remain in nonvolatile storage like that, especially when their state should be predictable in order to ensure good operation (like files expressing whether the script is already running or not, i.e. lock files).
Back to that IRC chat. Aside from the answer, I got ridicule from people who probably don't even know how to properly compile a kernel. Ubuntu users, overconfident scum. Sometimes I feel like I should ask questions in channels like #archlinux only, where such incompetency is ridiculed on its own.13 -
If ever your code breaks, just utter these words and it will magically fix itself:
"Wtf. Hey [coworker name], Can you sanity check this code? I don't know why this segfaults! It looks fine but you just run it and it bre- oh wait... I swear it didn't work a minute ago."6 -
Just started developing a to-do list that interacts with Calendar in swift.
Having done a lot of frontend development with js frameworks, xcode + swift + CoreData makes me want to blow my brains out.
I thought Java was verbose, but swift takes verbosity to a new level. Why does unwrapping variables make my program better?
I have already permanently broken my project twice by changing class names and changing the CoreData datamodel in xcode.
I had to create new projects, copy and paste the exact code from the old project into the new project and the code ran fine.
As soon as you need to do anything custom with a view, you have to pray to god someone has posted an example using very similar data.
Otherwise you have to read the apple documentation which is about as helpful as xcode's segfault dumps, unless you already know the names of the objects and methods that you need.2 -
I've been writing a complex mutation engine that dynamically modifies compiled C++ code. Now there's alot of assembly involved, but I got it to work. I finished off writing the last unit test before it was time to port it all to windows. I switched into a release build, ready to bask in the glory of it all. FUCKING GCC OPTIMIZATIONS BROKE EVERYTHING. I had been doing all my dev in debug mode and now some obscure optimization GCC does in release mode is causing a segfault...somewhere. Just when I thought I was done 😅5
-
My Sunday Morning until afternoon. FML. So I was experiencing nightly reboots of my home server for three days now. Always at 3:12am strange thing. Sunday morning (10am ca) I thought I'd investigate because the reboots affected my backups as well. All the logs and the security mails said was that some processes received signal 11. Strange. Checked the periodics tasks and executed every task manually. Nothing special. Strange. Checked smart status for all disks. Two disks where having CRC errors. Not many but a couple. Oh well. Changing sata cables again 🙄. But those CRC errors cannot be the reason for the reboots at precisely the same time each night. I noticed that all my zpools got scrubbed except my root-pool which hasn't been scrubbed since the error first occured. Well, let's do it by hand: zpool scrub zroot....Freeze. dafuq. Walked over to the server and resetted. Waited 10 minutes. System not up yet. Fuuu...that was when I first guessed that Sunday won't be that sunny after all. Connected monitor. Reset. Black screen?!?! Disconnected all disks aso. Reset. Black screen. Oh c'moooon! CMOS reset. Black screen. Sigh. CMOS reset with a 5 minute battery removal. And new sata cable just in cable. Yes, boots again. Mood lightened... Now the system segfaults when importing zroot. Good damnit. Pulled out the FreeBSD bootstick. zpool import -R /tmp zroot...segfault. reboot. Read-only zroot import. Manually triggering checksum test with the zdb command. "Invalid blckptr type". Deep breath now. Destroyed pool, recreated it. Zfs send/recv from backup. Some more config. Reboot. Boots yeah ... Doesn't find files??? Reboot. Other error? Undefined symbols???? Now I need another coffee. Maybe I did something wrong during recovery? Not very likely but let's do it again...recover-recover. different but same horrible errors. What in the name...? Pulled out a really old disk. Put it in, boots fine. So it must be the disks. Walked around the house and searched for some new disks for a new 2 disk zfs root mirror to replace the obviously broken disks. Found some new ones even. Recovery boot, minimal FreeBSD Install for bootloader aso. Deleted and recreated zroot, zfs send/recv from backup. Set bootfs attribute, reboot........
It works again. Fuckit, now it is 6pm, I still haven't showered. Put both disks through extensive tests and checked every single block. These disks aren't faulty. But for some reason they froze my system in a way so that I had to reset my BIOS and they had really low level data errors....? I Wonder if those disks have a firmware problem? So that was most of my Sunday. Nice, isn't it? But hey: calm sea won't make a good sailor, right?3 -
Well there were quite some teamwork fails concerning Git and build environments. I covered a few in my previous rants.
Basically I become a tiny bit of FUCKING ANGRY when I have to work with lobotomized pricks who get a segfault at address 0x00000000 in their brain_x68.exe when it comes to handle Git in the simplest ways possible.
Horrible commit messages, unfinished/buggy stuff pushed to master, force-push with fucking 6 months old code +1 change, pushing "resolved" mergeconflicts without resolving, 1 year old issues which are not closed or marked in any commit message, copying repofiles into a backup folder and committing it, not commiting files and change it directly on the FTP...
I HAVE SEEN IT ALL.
If I was not a calm and thoughtful guy I have had exploded and quit a long time ago!
I only help them so they can improve their dev style and workflows.1 -
tl;dr:
The Debian 10 live disc and installer say: Heavens me, just look at the time! I’m late for my <segmentation fault
—————
tl:
The Debian 10 live cd and its new “calamares” installer are both complete crap. I’ve never had any issues with installing Debian prior to this, save with getting WiFi to work (as expected). But this version? Ugh. Here are the things I’ve run into:
Unknown root password; easy enough to get around as there is no user password; still annoying after the 10th time.
Also, the login screen doesn’t work off-disc because it won’t accept a blank password, so don’t idle or you’ll get locked out.
The lock screen is overzealous and hard-locks the computer after awhile; not even the magic kernel keys work!
The live disc doesn’t have many standard utilities, or a graphical partition editor. Thankfully I’m comfortable with fdisk.
The graphical installer (calamares) randomly segfaults, even from innocuous things like clicking [change partition] when you don’t have a partition selected. Derp.
It also randomly segfaults while writing partitions to disk — usually on the second partition.
It strangely seems less likely to segfault if the partitions are already there, even if it needs to “reformat” (recreate) them.
It also defaults to using MBR instead of GPT for the partition table, despite the tooltip telling you that MBR is deprecated and limited, and that GPT is recommended for new systems. You cannot change this without doing the partitions manually.
If you do the partitions manually and it can’t figure out where to install things, it just crashes. This is great because you can’t tell it where to install things, and specifying mount points like /boot, /, and /home don’t seem to be enough.
It also tries installing 32bit grub instead of 64bit, causing the grub installer to fail.
If you tell it to install grub on /boot, it complains when that partition isn’t encrypted — fair — but if you tell it to encrypt /boot like it wants you to, it then tries installing grub on the encrypted partition it just created, apparently without decrypting it, so that obviously fails — specific error: cannot read file system.
On the rare chance that everything else goes correctly, the install process can still segfault.
The log does include entries for errors, but doesn’t include an error message. Literally: “ERROR: Installation failed:” and the log ends. Helpful!
If the installer doesn’t segfault and the install process manages to complete, the resulting install might not even boot, even when installed without any drive encryption. Why? My guess is it never bothered to install Grub, or put it in the wrong place, or didn’t mark it as bootable, or who knows what.
Even when using the live disc that includes non-free firmware (including Ath9k) it still cannot detect my wlan card (that uses Ath9k).
I’ve attempted to install thirty plus times now, and only managed to get a working install once — where I neglected to include the Ath9k firmware.
I’m now trying the cli-only installer option instead of the live session; it seems to behave at least. I’m just terrified that the resulting install will be just as unstable as the live session.
All of this to copy the contents of my encrypted disks over so I can use them on a different system. =/
I haven’t decided which I’m going with next, but likely Arch, Void, or Gentoo. I’d go with Qubes if I had more time to experiment.
But in all seriousness, the Debian devs need some serious help. I would be embarrassed if I released this quality of hot garbage.
(This same system ran both Debian 8 and 9 flawlessly for years)15 -
If you are programming in C++ please always return a type from a function as the function prototype return type.
I had to debug some old code that failed to return a boolean on one of its flow paths. It would work on linux in release and debug, would work on windows in debug, and fail on windows in release.
The failure was NOT straightforward at ALL. It would return exit code 3. Then if I added a debug print to the function it would segfault.
Why the hell would popping something extra off the return/call stack not crash more readily? Wth is the point of debug compile if it won't catch shit like this?8 -
Yeaaahhh that moment when the program flawlessly crunches through ten thousands of files, only limited by the slowish HDD! :-)
In full multi-threading, tons of dynamic buffer resizing, pointer shit left and right, also two star programming, and everything written in raw C!14 -
3 hours...
3 damn hours for 200 lines of bash code.
Exorcism, Magic I don't care.... But please make a special person never touching bash programming again.
I ripped my hairs out. Really.
Till I realized someone wrote functions with _logical_ return true codes as numbers.
0 - as logical false, for failure
1 - as logical true, for success
Leading my brain into a severe segfault fun.
Why... Oh why.
Second fun part as I corrected that...
Someone wasn't fond of exit codes at all.
Script is now 86 % rewritten....
God damn it, if you don't like a languages fine.
But inverting core logic should give a free trip to the electrical chair.1 -
So i was working on ruby gem that wraps the libarchive C library which can be used to read and write archives of many different formats.
I was stuck for few days with a segfault and for the life of me, i couldn't find the problem.
So, i took a break and went to visit my grandparent, grandpa saw me so zoned out. So he was like, whats happening? I was like, "Frakinn program, keeps crashing".
He looked at me and said, "Garbage in Garbage out, Computers don't make mistakes" and went back to finish his game.
Then it him me the FRAKINN Ruby Garbage collector is freeing in-use objects and suddenly everything make sense.
Thank you grandpa :D3 -
I had to migrate ~100+ svn repos to git that were "useful" according to the client but found out that there were a lot of projects (+6yrs old) with only one commit message "--no-commit-message" and i'm not even joking...
And then I had to explain to these "devs" how to use fucking git with eclipse (+they all use light theme...) cos' terminal or gui client is too complicated
And then I saw their "Java libs" with ~3k line of spaghetti
Do you even dev bro?2 -
I can’t say it’s the most painful but it’s one of my recent painful lessons.
So I’m learning C and in my project I was trying to make a copy of a 2D array and I kept getting seg faults up the ass every time I tried to allocate one of the inner arrays and after a long day of debugging I realized that I was trying to allocate memory within an array that doesn’t exist so I had to create the first array then allocate memory for each inner array after.4 -
Core Thread[20741]: segfault at 0 ip 0000000000000000 sp 00007faacbff7e98 error 14 in spotify
Dude, please handle being not able to open an audio output... :(1 -
>compiling a toolchain for my phone
>compiling gcc
>segfault
wtf, i have like 8GB RAM and 32GB Swap on an SSD
>rerun make w/o clean
>continues, no segfault
ok?
>segfault a few minutes later
FUCK
rinse and repeat like 30 times
why10 -
C++ developer: alright, this should finally fix it. Please just compile so I can go to sleep
GCC: I'm sorry Dave. I can't let you do that.
THEN THERES THE USUAL SEGFAULT WITH NO STACKTRACE AND I SPEND THE REST OF MY NIGHT VALGRINDING2 -
I invested in a brand new 27" curved monitor to work more efficiently with my laptop but now
HDMI isn't recognized by my linux distro on dual boot where it works perfectly with fucking windows and it used to work nice before the latest update
Tried to install official nvidia drivers to try to fix that
🙃 Guess who has a fucked up X configuration now 🙋🏾♂️3 -
I don't know who was the fucking moron who decided how much detail should go in the classic "Segmentation fault (core dumped)" message, but they should be kidnapped and tortured. And no one should tell them why they're getting kidnapped and tortured. Just let the fucker guess.3
-
What is it with people asking if learning X is good for development of Y? Did your common sense module not fucking load?
Learning a new thing isn't gonna SegFault your brain. If you have the luxury of asking If, just fucking do it, you lazy wobble tit!7 -
I wanted to update my previous rant in the comment but what happened is such a fucking nonsense I think it deserves its own.
For those who don't want to look what it is, just another C++ noob (aka me) complaining about how the language was a bitch to him by throwing a random SEGFAULT on release while it didn't show up on debug. Welp.
Half an hour and a ton of std::cout later (thought I would try to read a disassembly ? Think again) I figured out what was the problematic section of code. And guess what ? It was a section I didn't even modify and I never had problems with. Something completely unrelated to what I was rightly imagining causing the issue.
To identify which exact subsection was throwing the error to my face I added more tag code.
Rubbing my hands and ready to fix the fuck out of this damn shit, I built it, launched it…
And all of a sudden the code worked.
All I did. Was to add more cout to know which line fucked up. And now it works.
So. Serious question now: is it a clear sign from heaven I should stop working with such languages and should go back in my shitty high level languages kindergarten ?10 -
Rant portion:
Fuck me, there's not a ton of great resources for Lua. I have the book, and it's actually fucking incredible, but as soon as I have a question which I would usually Google, either it's a SO question that almost hits the mark (but absolutely does not answer my initial question) or a mailing list that DOES answer my question but holy FUCK it's difficult to read!
I 100% recommend the Lua book, though. It's remarkably helpful and covers just about every little detail of the language and it's corresponding c API, and even some of how Lua works behind the scenes.
Non-rant portion:
Finished up the first version of my library and now I'm binding it to Lua and this time around I'm using all the best practices including setting and checking metatables so that Lua can't segfault. It's going great, I properly learned about the Lua stack, and I feel good. Cross-platform double-buffered command line via a scripting language... What a way to enter 2020. Everything went so smooth that I got to 3am before I realized what even happened.1 -
My top 3 open source projects are :
KDE ❤️❤️❤️❤️
Libinput gestures (allows you to do custom actions with your touchpad)
Strapi (Wich is a nodejs headless cms that gets the job done very quickly I haven't tested it in prod tho)1 -
Other peoples' code... (in C++)
I am finding what some people consider good code is not as described. I found a class that provides strings. Great it gives me paths and stuff. I incorporated it in a new project.
segfaults
Hmmm, it must have an init function... It does, but not in the class. It has a friended init function:
friend init_function(). If this function is not created and called external to the class then the class will segfault...
okay...
I implement this. I use code from another project that implements this correctly. The friend class allows the private constructor to be called to create the main instance of the class. So its a fucking cryptic ass singleton. I look at this class. It uses a macro to decide what to function call in the class. The class already has function names for each call it needs to make. The class is literally a string lookup table. I vow to redo this shitty code, someday...
I start to wonder what other fragile code I will find. Not long later I keep getting errors on malloc. Like any malloc that is called results in a segfault. The malloc is not at fault though. I run valgrind and find a websocket library is returning an object a different size than the header file describes.
WTF...
Somebody has left an old ass highly modified definition of the websocket header in a location in that I include headers (partly my fault). I eliminate that from my include path. All is well, everything behaves. I will be making sure this fucking header is not used and it is going to die. Wasted a bunch of time.
Lessons learned: some code is just fucked and don't leave old ass shit you tried laying around.5 -
TL;DR: Fuck fucking Arch fucking Linux. Gentoo. Yay or nay?
So over the last few days my arch install has gone to hell. A small install of a package brings up some other update as it needs an updated version, then shit starts to segfault. I've been compiling anything and everything from sources rather than using pacman, and it works great. My DE has an issue with animations and does a FULL FUCKING KERNEL PANIC when I as simple as change what virtual desktop I focus. I'm genuinely so fucking done with Arch and I wish to change. I'm not touching Ubuntu with a 10 foot pole, nor any other Debian shit, so I'm wondering whether Gentoo might be it. Anyone got experience with it? Worth a shot for an experienced linux user?6 -
It's one of those days where I have absolutely zero fucks left to give.
Was up all night wrestling with a segfault stemming from compiler internals (assembly, no less - zero debugging symbols). Now I just power-cleaned the apartment and need a bowl. -
Ranted earlier about how my debugger was fucking up. Jokes on me, it's now the only thing that works well.
The fucking C++ code behaves normally in debug build, but when in release build throws a SEGFAULT out of nowhere. Bet it's tellg() or my unsigned to signed conversion that fuck things up (while they work perfectly in debug, I repeat). But I can't tell, since the only way I have to trace back the issue is the disassembly ¯\_(ツ)_/¯7 -
I just learned the hard way not to recklessly daemonize stuff; I ran into a case where my Python script crashes Python itself.
The issue was that one of the query that “requests” package makes for OS was not fork safe, thus causing a segfault. Since Python drops dead as soon as it receives SIGSEGV, all I had was macOS crash log (which is oftentimes hard to decipher). I spent like good one hour before I found “faulthandler” package which enabled me to log the stack trace to stderr and see what the f*<k was going on.
I mean, I’ve seen quite a lot of occurrences of thread safety issues, but now it’s fork safety!?
Maybe I should be sticking to Docker or something unless the situation *really* requires me to daemonize something lol2 -
Yesterday I tried to install virtualbox to be able to run gitlab-runner with a Docker executor locally. I completely fucked up. After a reboot, I'm not able to run GDM/gnome/cinnamon(segfault), so I have to run Xorg as root without any window manager, and it sucks. I have to work all day with this shitty config.
Fuck myself, Fuck Arch, I'm switching to manjaro7 -
>compiling Linux 3DS' zImage overnight
>start compiler at 4PM
>11:54PM -- compiling clang: <file>: conpiler: *internal compiler error*: segmentation fault
okay, well, maybe if we continue make from there it'll fix itself? Might've run out of RAM...
>make
>5 seconds later, segfault again
FUCK1 -
So I plan to ditch my 17" heavy gaming laptop to chose something more suitable for school for a (13/14") ultrabook (I plan to run Debian on it) that has a decent battery life
Anyway, I looked at those chinese ultrabook on AliExpress/gearbest but I'm a bit skeptical about some factors.
Anyone has recommendations about a model or some advices?9 -
Cause when you die or exit from process it doesn’t matter how it happened, was it kill -9, sigkill or sigterm. As long as you go to hell / heaven / you name it and not to /dev/null you can still try to segfault the universe. Just give me the code !!!
And it aligns well with depression, alcoholism and lack of sleep. -
Hope everyone had a chill and relaxed day. I know I did. Sun was nice. People at work were so easy going. Didn't have a segfault all day.
Was to be expected. It was 4/20 all day.11 -
Q: You know it's Monday when...
A: (typing)... (buffer overflow)
Because you had a bad.. *Segfault*.
Well fyck, spilled me coffee now tho.. -
> looking for a ZX81 emulator
> the most accurate one is SDL for Mac
> snap for Linux
> alright fine i'll use stupid fucking gay-ass snap
> after fixing snap's fuckups twice it's finally running
> all my ROMs and BIOSes are on my 4TB HDD mounted at /big and symlinked at ~/big
> SDL CAN'T FUCKING SEE EITHER
> "well it supports drag and drop we'll use that" segfault
> "fine i'll put the bios or w/e it wants in ~" not valid, apparently
fucking goddAMMIT8 -
Compiled Otter finally in a PowerPC Virtual Machine but it throws a segfault when it trys to load any javascript on https sites1
-
What would you want to tell to your past you ?
Like, the advice that could have helped you a lot if you heard it at the right time4 -
Just spent 3 hours on a segfault bug that could have been prevented had I been diligently putting const where it should be. Shame on me. Never be too lazy for const-correctness ever ever ever...1
-
When you're about to get a 20/20 and a little hidden segmentation fault comes and you get 1,5 because of this.
-
Hey guys I have a NUC and a spare monitor are there "fancy screensavers" that I could modify if needed ? Or should I do one myself haha5