<div dir="ltr"><div><div><div><div><div><div>> Look at the local variables. What is the value of 'this'? Does that make sense?<br>
> It chokes inside the method AlkOnlineQuotesProfile::type() which gets called<br>
> from AlkOnlineQuoteSource ctor in line 230. Which object is pointed to when<br>
> calling type()? Which value does this pointer have? Where is it initialized?<br><br></div>After days of bug hunting, I couldn't figure out that. The following things I did for the same.<br>- I stepped in through functions in debugging and checked the stack. <br>- Tried to study the QMap related function defaultQuoteSources() and checked its usage. <br></div>- While experimenting with the alkimia lib I found that after executing the onlinequoteseditor5 binary separately(in build/bin/) the widget works fine and there is no crash while interacting with the UI like buttons and fields as opposed to what I saw in the kmymoney.<br><br></div>Please direct me what thing I missed. Thanks.<br></div>Sorry for the delay in the blog post. I planned for week 1-2 blog by Monday only. I thought that I will post that after solving this bug. <br><br></div>Regards<br></div>Suraj Kumar Mahto<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 16, 2021 at 10:31 PM Thomas Baumgart <<a href="mailto:thb@net-bembel.de">thb@net-bembel.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On Mittwoch, 16. Juni 2021 18:32:42 CEST Suraj Kumar Mahto wrote:<br>
<br>
> > This may depend on what you are doing to get to the crash. I simply open<br>
> > the online quotes settings and press the New button at the top of that<br>
> > dialog and immediately get the crash. Doing so, I could trace back the<br>
> > problem to a nullptr assignment.<br>
> Hello,<br>
> I guess the problem starts with this line<br>
> main.cpp:351  const int rc = a.exec();<br>
> exec() is a qt function so that shouldn't be creating the problem and I am<br>
> unable to find which null pointer assignment is creating the segmentation<br>
> fault.<br>
> <br>
> > Not knowing your environment it is hard to comment on this. I do my<br>
> > debugging mainly in KDevelop and don't have problems with a freezing<br>
> > application.<br>
><br>
> I am using KDevelop. I figured out that, it works fine now.<br>
<br>
Let the application run in KDevelop's Debug mode. At some point it will<br>
crash. This will let you inspect the state (variables, backtrace, etc.)<br>
of the application.<br>
<br>
Look at the local variables. What is the value of 'this'? Does that make sense?<br>
It chokes inside the method AlkOnlineQuotesProfile::type() which gets called<br>
from AlkOnlineQuoteSource ctor in line 230. Which object is pointed to when<br>
calling type()? Which value does this pointer have? Where is it initialized?<br>
<br>
These are the questions you want to answer and then walk the stack backwards.<br>
<br>
<br>
-- <br>
<br>
Regards<br>
<br>
Thomas Baumgart<br>
<br>
<a href="https://www.signal.org/" rel="noreferrer" target="_blank">https://www.signal.org/</a>       Signal, the better WhatsApp<br>
-------------------------------------------------------------<br>
"The flame that burns twice as bright<br>
burns half as long." ― Lao Tzu, Te Tao Ching<br>
-------------------------------------------------------------<br>
</blockquote></div>