Segmentation fault while open a text file
-
What is your idea?
I already suggested to use the non-native dialog. Additionally your crash is probably related to you holding a
QObjectin aQSharedPointer, get us the whole stack trace so we can investigate further. I advise against usingQSharedPointerwithQObjects exactly for this very same reason - object lifetime is uncontrollable. -
I already suggested to use the non-native dialog. Additionally your crash is probably related to you holding a
QObjectin aQSharedPointer, get us the whole stack trace so we can investigate further. I advise against usingQSharedPointerwithQObjects exactly for this very same reason - object lifetime is uncontrollable.He has the same effect with one of the Qt examples.
However, you are certainly right about non-native dialog.
-
He has the same effect with one of the Qt examples.
However, you are certainly right about non-native dialog.
@koahnig said in Segmentation fault while open a text file:
However, you are certainly right about non-native dialog.
Perhaps, but my prime culprit is the shared pointer (notice line 11 in the call stack from his screenshot).
-
So, have you an open file example with non native dialog?
-
So, have you an open file example with non native dialog?
@HenrikSt. said in Segmentation fault while open a text file:
So, have you an open file example with non native dialog?
Again, I ask you post the stack trace before digging into that. I don't think your segafault is related to the actual dialog at all, especially since you said you get it with a class from the examples. And I will raise the point again, do you use
QSharedPointerand if yes how? -
I don't think so that I used that
-
I will reset my PC. I think that the error is there. After that I will inform you!
-
I will get this error. And i removed the line @jsulm .
Here's a picture:
https://1drv.ms/i/s!AqaeHLtTIsoIhOofMu8aGwHVDcerHA@HenrikSt. said in Segmentation fault while open a text file:
Here's a picture:
https://1drv.ms/i/s!AqaeHLtTIsoIhOofMu8aGwHVDcerHA@HenrikSt. @kshegunov is referring to the QSharedPointer referenced in the stack trace (line 11) you posted further above.
Within the debugger you can go back to a place where the mess actually started with the line in your code.
@kshegunov it is not conclusive at the moment that @HenrikSt is actually using QSharedPointer himself. It is probably somewhere deeper in other code. The next lines of the trace would be important to see.
-
@HenrikSt. said in Segmentation fault while open a text file:
Here's a picture:
https://1drv.ms/i/s!AqaeHLtTIsoIhOofMu8aGwHVDcerHA@HenrikSt. @kshegunov is referring to the QSharedPointer referenced in the stack trace (line 11) you posted further above.
Within the debugger you can go back to a place where the mess actually started with the line in your code.
@kshegunov it is not conclusive at the moment that @HenrikSt is actually using QSharedPointer himself. It is probably somewhere deeper in other code. The next lines of the trace would be important to see.
@koahnig said in Segmentation fault while open a text file:
it is not conclusive at the moment
It is not, I agree, that's why I insisted on the stack trace.
The next lines of the trace would be important to see.
I couldn't agree more, but I'm almost ready to bet my head it's a double deletion because of a
QSharedPointerinstance. ;) -
It works now!
I reinstalled Windows 10 clean. So i think there was a problem with Qt and Windows 10 Insider Version.
Thanks a lot to all!
THis topic is now solved