symbol file not loaded in VS2017 only happens 10% of the time with JAGPDF - c++

I couldn't find a solution to this problem. I have a very simple program to generate a PDF using JAGPDF. If i am opening the program from visual studio (same input, same parameters) it runs to the end without errors 90% of the time, but sometimes it throws an exception telling me that symbols not loaded for jagpdf-1.4.dll
If I run the executable directly, 90% it creates the PDF correctly and 10% of the time created a corrupted pdf that I cannot open. How can I solve this problem?
EDIT: I put a screenshot of the error I'm getting, it is very dificult to reproduce because the program runs normally about 90% of the time, so I have to press build several times until it crashes...
EDIT 2: Since it seems the bug is from the library, (I already send them a message reporting it but doubt they'll do something about it because last release was years ago).
I sort of solved the problem by wrapping the function around a loop using try and catch where if the first time it fails then the exception is caught and the function is tried again until it passes. I put a limit of 10 times it can run the loop before terminating it.
The thinking was that, as the events seem to be statistically independent, the loop will reduce the chance of it failing from 0.1 to 0.1^n with n the number of loops.
So now the program is crashing with a probability of 0.0000001% instead of 10%.
With this fix I am happy to report no fails for this weeks data.
Thank you all for pointing me to the direction of the error.

It sounds as if you have found a bug in the PDF library you are using. You have to file a bug report with the PDF software provider. Hopefully they can provide you support.

Related

Eclipse Juno C++ build takes a long time

I want to start learning C++ but it becomes really irritating when you have to wait up to 3 minutes for a simple two line program to build and run. I've tried multiple things like completely disabling build logging, disabling generate scanner info command inside the discovery options and something else (sorry I cannot remember).
Another thing is that sometimes it's the build that takes a long time, and other times it's the actual opening of the [filename].exe It hits 70% on the progression bar then will just stop for a minute, sometimes I try pressing the run button again and it ends up executing the program twice.
It's not completely necessary that I get this fixed but it would be a big help. Please tell me anything I can do to fix this. No doubt most of you coding in C++ has encountered this at some point.

C++ program crash in batch processing only

For a project, I've created a c++ program that perform a greedy algorithm on a certain set of data. I have about 100 data set (stored in individual files). I've tested each one of these files manually and my program gave me a result each time.
Now, I wanted to "batch process" these 100 data set, because I may have more to do in a near future. So I've created another c++ application that basically loops and call my other program using the system( cmd ); command.
Now, that program works fine, but my other program, which was previously tested, now crashes during that "batch processing". Even weirder, it doesn't crash each time, or even with the same data set.
I've been at it for the past ~6 hours and I can't find what could be wrong. One of my friend suggested to me that maybe my computer calls (with system()) the other program too quickly and so it doesn't have time to free the proper memory space, but I find that hard to believe.
Thank!
EDIT:
I'm running on Windows 7 Professional using Visual Studio 2012

C++ / Unkillable process / Can't debug

I've created a small parser that generates an internal representation of an expression from a string. It does compile correctly, but i just can't debug it. When i try to run it, whether it's in debug mode or not, the console pops-up and immediatly closes. In my process list, the program still appears, using 0% cpu and 100 Ko memory, and there is just no way to kill it except by restarting my PC.
The first time i tred using code blocks with the mingw compiler, and the second time i tried using visual studio 2012, but in both case i got the same problem. When trying to run it with VS it showed an error message saying something like "abort has been called".
I can provide the source code if really needed. I'm not using anything extraordinary in it, just pure standard C++ language and iosream to display results and errors in a console.
What can this be due ?
Thanks for your help :)

Error while executing .exe result of my code but no when executing it in the debugger

I have a problem regarding the result of my program. I have a bi winforms application that makes a lot of things. One of them is visualizing a bunch of data I have stored in several .txt files in a given directory. It takes one, read it, close it and then visualize it before reading the next one.
My problem is that if I just execute the program, tell it the directory of the files and ask for visualizing, after reading 2 or 3 files it crashes because a memory access violation. But if I reproduce the exact steps while executing from the debugger of visual studio there is not any error nor warning nor nothing, it just works fine.
I know that the debugger is exactly that, a debugger, and thing execute differently in a debugger, but I dont have any idea why this happens.
Any idea why my program crashes? Or what should I do for avoiding a crash?
I know my question may be too ambiguous, but I don't have other method to show you my problem, unless you want me to post a 20.000 lines code :) .
Thanks in advance.
Attach the debugger after the crash (JIT debugging).
http://msdn.microsoft.com/en-us/library/5hs4b7a6(v=vs.80).aspx

Building large application on Solaris is hanging without any information

I am trying to compile a rather big application on Solaris. Compiling it on AIX caused a problem that the command line buffer was too small (ARG_MAX).
On Solaris it compiles most of application successfullym but then it just hangs and without any error hangs an do nothing for at least an hour.
I am running it on SunOS 5.10 Sparc 32 bit.
Any ideas on how to find out what's going on or what might be causing such behavior?
I can't tell if the compilation is hanging, or your app itself.
If the app is hanging just follow the usual debugging steps: Either run it in your debugger and watch when it dies, or add print statements.
If the compiler dies, does it always die on the same file? If you compile that file by itself does it still hang? If so, try trussing the compiler when you try to build the file that hangs. You may find that it's blocking on I/O waiting for some nonexistant file or something similar.
What you may have to do is:
Comment out or delete 99% of the code and compile that
Add around 5% of the code back in and compile that
if the last thing you added caused the hour hang then split it up
Back to step 2
Just for those who encounter this in future.
The problem was optimization flag causes it to take a REALLY long time to compile. I am talking 1+ hour for one cpp file.
This is big project.
In addition there was an issue with Sys Admin on SUN box not giving me enough CPU share.
Increasing that solved this problem, well made it quicker and within reasonable time bounds.
I hope this helps