Unsolved Read access violation error
-
@ivanicy said in Read access violation error:
So, my question is if there is a way to see a log of the application to see what is really going wrong?
As always: use a debugger to see where it exactly crashes.
-
@ivanicy Like @Christian-Ehrlicher said. Also, you can use
qDebug()
to output parameters for findItems, so you can actually see on what parameter it crashed. -
@Christian-Ehrlicher I use it, but Qt doesn't show me the line that was wrong. Let me show you an image:
-
@artwaw The problem is that I am not using this function. I think that Qt use it in background when I load the items
-
Go up the stack until you see from where findItems() is called. Looks like an infinite loop.
-
@Christian-Ehrlicher I can't do that because Qt crashes and close.
-
@ivanicy I don't understand. Why can't you go up in the stack trace to see where it crashes? Does the debugger crash?
-
@Christian-Ehrlicher When I try to scroll for the entries Qt doesn't respond and then close itself
-
@ivanicy said in Read access violation error:
Qt doesn't respond
What do you mean with 'Qt' here? QtCreator? this is not Qt but an IDE...
I'm pretty sure you call findItems() somewhere in your code. -
@Christian-Ehrlicher Yes, I mean Qt Creator and no, I don't call findItems anywhere. I don't know if QGraphicsScene use it when I call to the addItem function or something like that but I don't call it explicitly.
-
You have no other chance to either reduce you code until it no longer crashes or write a minimal example to reproduce the problem. Also check if the stuff you pass to addItem() are valid.
-
@ivanicy You can also try to disable parts of your code until it stops crashing then you know roughly where it is. And if you use CVS like Git you can check the changes since last stable version.