Similar to How can I force SDL_Init() to fail?, I'd like to force glfwInit() to fail to ensure that my error logging code is working properly. How might I do this? I'm on Linux, so Linux-compatible answers are appreciated.
Related
I recently went about compiling libcurl for use with Vs2013, which turned out to fairly straight forward thanks to some very useful help here on stackoverflow. After some cajoling and more online help, I've even managed to get curl to play nice inside a unique_ptr.
Standard HTTP and HTTPS transactions using curl work fine with google.com. However, a particular site using https (www.slayradio.org) unfortunately results in an 'SSL connect error'.
I have no problem connecting to the domain via https using curl in PHP. But I need it to work in C++ as well.
It seems that CURLOPT_VERBOSE is just the ticket, but turning it on seems to have no effect what so ever. I see no additional output in either the console window, nor the internal IDE output window. I messed around with the CURLOPT_STDERR option trying to specific a concrete file it should output to for a while, until I finally discovered that via the curl FAQ that passing a FILE* pointer to the libcurl DLL (which I do) causes an access violation. I know the FAQ specifically refers to CURLOPT_WRITEDATA and CURLOPT_READDATA, not CURLOPT_STDERR, but I can't imagine the same isn't the case, here.
I've discovered the CURLOPT_ERRORBUFFER setting, which a yields a slightly more helpful output:
Unknown SSL protocol error in connection to www.slayradio.org:443
But I'm still at a loss at what's causing issues.
It'd much appreciate if anyone can tell me if I shouldn't actually be seeing more output by enabling CURLOPT_VERBOSE in the console window?
I'd also be curious to hear if someone can has run into something similar before.
If I can't get Curl to be more verbose, it seems like the only option is to make use of the CURLOPT_DEBUGFUNCTION.
Unfortunately this is only a half-answer.
First and foremost I did not, and have still not, gotten to the bottom of why turning on CURLOPT_VERBOSE seemingly does nothing. Setting CURLOPT_VERBOSE to 1L seems to change nothing.
However, I did manage to find the root of the problems I was experiencing. I isolated the newly compiled cUrl library to a new project, and realized that a different/older cUrl library from TwitCurl was still hanging around on my system along with some libraries for the SSL/TLS protocol. This ended up interfering with the newly compiled cUrl library, causing it to not be able to figure out which protocols were available to it.
So... I guess the best advice I can give is to further isolate the problem if possible (which I should have done from the start), and be wary of older libraries hanging about.
I have an issue I don't seem to find a solution for.
One of the transactions gives ABEND ASRA when used in debug mode.
When I compile the Cobol program without debug option and run the program, it works fine.
The error looks like this one (quite exactly like this), only I am using Cobol V4:
http://www-01.ibm.com/support/docview.wss?uid=swg1PM96501
Now the question would be: why is it abending in debugger and not without debugger?
I am using the CICS debugger (DTCN transaction), the program starts normally, I can do steps with F2 and all this, then at some location is abends.
Please note that it is extremely difficult to say where it abends as the program is really big.
This happens only to this program at the moment, others are running fine with debugger. I placed a breakpoint before my modifications, the abend occurs in some other area.
Another weird thing is that this Abend is not consistent, If I do a big portion of the code with small steps (F2 and small breakpoints), sometimes it executes without abend until the end.
Due to the nature of the issue, I can not post much information.
I was hoping you encountered similar issues and you can tell me where to look for.
Thank you!
The issue was solved by deleting my debug tool profile form the system and then login to the debugger (DTCN) again so it creates a new profile (the profile was 3 files: TOOLTEMP.PDTOOLS.{userid}.DBGTOOL.* ). After this the issue was gone. I asked the guys how this happened, they told me this was because I had modified the program between 2 debugging sessions without closing CICS. This was a disfunction that can be avoided by closing CICS while we compile programs used in it (not sure about why exactly.... neither are they).
Hope this helps if you face a similar issue with DTCN debugging.
I am wondering if is possible run xcode in mode debug as you can run Java. I am mean not only for debug your app is more, debug and write code in the same time without re-run the compiler again.
Now each time that I write something new I have to restart the compiler and I lost a lot of time.
as far as i know xcode does not provide a clean native way to do this kind of stuff.
you can try using this project :
http://injectionforxcode.com
I haven't used it intensively yet but it seemed to work pretty well and it is quite easy to set up.
If I understand your question correctly and remember it right, there used to be some “quickfix” mode in the early Xcode versions that could offer something like this. I’ve never used it, I don’t know how well it worked or why it was discontinued. Nowadays you have to do with the plain edit → compile → run cycle.
I've been attempting to debug some issues I'm having with calling a vendor specific TCL API. Needless to say, the API crashes at a certain point and the stderr output leaves something to be desired. Also, nothing of note in the standard /var/log/* areas either. Is there a good debugger for TCL that can perhaps give me more information on the issue? This is running on FC14, and I'm aware of the trace command provided by TCL, wanted to know if there were more options out there...
Lots of suggestions here http://wiki.tcl.tk/473. Unfortunately I can't really recommend anything as I've never found a need for a TCL debugger, but then again I havent' been in your position with a vendor API. Feel free to ask for further help!
I have a project where I am required to fix this program that has the tendency to crash very non-deterministically. This piece of software performs lots of calculations and database calls and can have a very high load, meaning lots of clients.
It is a very critical component and without it nothing works. It needs to perform and be able to run without user interaction for long times.
It is actually a native C++/ATL project with COM for communication between its two executables.
I have spent a lot of time now actually studying the code and looking for obvious code flaws, such as not locking of shared variables (those that are obvious), exception handlers that don't do anything with an exception, besides 'return false', even if this could be a critical exception.
But I wanted to know if anyone has some tips for in regards to tackling a project like this, where many people have actually attempted to fix the issue and failed, and now you've taken the challenge and don't want to fail.
I am prepared to go far to fix this, however I need some guidance as to how to go about it in a good way?
My idea is to first set up a test environment and hope to collect as much information as possible about crashes that do occur, and then find, through logging, stack traces, etc, the points of the crashes. This may or may not be a good way to debug such a project.
Any input is appreciated?
It may be obvious, but my roadmap for such bugfixing task is :
Collect as many information as possible on crash source (users, developpers, etc).
Inspect documentation and dependencies.
Inspect source code.
Build an isolated test env and try to reproduce.
If you still can't find the source of the bug, try to sanitize the source code and to add a more verbose logging system.
Regards
Log, log, log, log.