By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,331 Members | 1,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,331 IT Pros & Developers. It's quick & easy.

fprintf.c error

P: 10
hey all,
I am a fairly new programmer fresh out of college and now Im working for a small company in my college town. the probl;em that Im having is I finsished writing a code that works on most of the computers in our officer , but for some reason there three computers that it will not work on. I thought that if it works on one computer it should work on all. Im trying to figure out if I did something wrong. the error that Im getting is called " Debug Assertion Failed!" expressioin: file!=null; the really wierd thing about this the problem is not consistant, it happens sometime but not every time. can any one help me with some advice?
Jun 6 '07 #1
Share this Question
Share on Google+
6 Replies


100+
P: 208
If you could show us the chunk of code where it's failing. Maybe provide us more details of when it fails and when it doesn't will be able to help. Also was this program written in C/C++?
Jun 6 '07 #2

100+
P: 256
If it works on most computers but not a few I'd start by looking at anything your program takes from its host computer. Do you use any shared libraries or dlls? Are the problem machines using a different OS? It could be a million other things depending on what your program is trying to do.
Jun 6 '07 #3

100+
P: 208
If it works on most computers but not a few I'd start by looking at anything your program takes from its host computer. Do you use any shared libraries or dlls? Are the problem machines using a different OS? It could be a million other things depending on what your program is trying to do.
Wow I didn't even think of shared libraries:P that was dumb of me.
Jun 6 '07 #4

P: 10
Thank you for the timely responses. I will try to be more specific about the problem. first, I would like to add one more twist to the problem, the problem only occurs when trying to print from a sever location, if all of the information that is needed to print the particular report is downloaded to a particular machine then the report prints fine. The problem only occurs when trying to print the report from a sever location, and like mentioned earlier, the problem is not consistant, it happens sometime but not every time, it happens on one account but after it crashes and we run the report again on the same account then it runs. The code is mainly written in c++ but it does have some c part to it. I would like to post a piece of the code to show, but the problem with that is, the address for which the error message is to a file and line number that is no where in the code. I think it may be something in the disassembly part of the code , but I'm not familiar with disassembly.
Jun 8 '07 #5

100+
P: 256
I'm still unsure about exactly what your doing with your program. You have it download a file and then print the contents of that file? Perhaps the file isn't being transferred or opened correctly - but thats just a guess.

If I were in your shoes I'd try to figure out what code is executing when the crash occurs then work backwards from there to discover the actual fault and then decide how to prevent/fix it. Maybe add some logging to your program to help you see whats going on. If you can get a core dump or stack trace when the thing crashes that would be really helpful too.
Jun 8 '07 #6

P: 10
I'm still unsure about exactly what your doing with your program. You have it download a file and then print the contents of that file? Perhaps the file isn't being transferred or opened correctly - but thats just a guess.

If I were in your shoes I'd try to figure out what code is executing when the crash occurs then work backwards from there to discover the actual fault and then decide how to prevent/fix it. Maybe add some logging to your program to help you see whats going on. If you can get a core dump or stack trace when the thing crashes that would be really helpful too.
thanks again for your timely response. We had our network administrator watch the network to see how much of the system resource's and network resources are being used. and so it may not even be a problem with the program itself, it may be a latency issues, and not a programing one. I'll be sure to let you know what the results of our test.
Jun 8 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.