Read access violation error
-
Hello!
I have an application that contains a QGraphicsView. This QGraphicsView loads images and items on it. Suddenly, I don't know if it is when I draw more items or when I load the items, the app crashes with the Read access violation error. This causes qt also crash and shut down. I only can see that there is a problem with QTreeWidget::findItems... but I don't know what is it in my case.
So, my question is if there is a way to see a log of the application to see what is really going wrong?
Thank you very much!
-
@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.
-
@Christian-Ehrlicher I use it, but Qt doesn't show me the line that was wrong. Let me show you an image:
-
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.