Find Jobs
Hire Freelancers

Debugging a C program

$10-30 USD

Completed
Posted over 7 years ago

$10-30 USD

Paid on delivery
I have some simple program written in C (for Linux, xorg desktop). What it does is when it runs, it saves content of root window image (currently active background wallpaper) to a file. This program runs just fine, it is 132 lines of code. I need to include this functionality to my other software, so I copied the functions, include declarations, etc, and it works just fine in my own application. But only if I run it 5 times or 6 times, then it stops working and reports some error (bad Drawable). Once this error happens, it fails to run until I quit the graphical X11 desktop. When I startx again and run my compiled program again, it works just fine about 6x and then there is again the error. I am amateur C programmer so I do not know how to debug the code to find out whats wrong. I need you to debug my conde and attempt to fix my issue, or at least identify root cause for it. Source files attached. Instructions: getbg.c: if I compile and run only this, it works 100 times, no problem launcher.c: if I compile and run this, it works only about 6 times, then error, and getbg.c stops working too, after the error is encountered in launcher.c In order for the launcher to work properly, you will need a config file, which is generated from your desktop applications list. genconf script is attached, run it as this: ./genconf > ./conf
Project ID: 12305786

About the project

1 proposal
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CZECH REPUBLIC
Sumperk, Czech Republic
5.0
67
Payment method verified
Member since Apr 5, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.