[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-finance-apps
Subject:    Re: GSoC '21 KMyMoney : I am stuck.
From:       Suraj Kumar Mahto <suraj.mahto49 () gmail ! com>
Date:       2021-06-22 19:57:59
Message-ID: CAEDvbQBXNCd-HhA5=PNUYLvvG-izSdHvXo_yJqW2ECA3a=vHTg () mail ! gmail ! com
[Download RAW message or body]

> Look at the local variables. What is the value of 'this'? Does that make
sense?
> It chokes inside the method AlkOnlineQuotesProfile::type() which gets
called
> from AlkOnlineQuoteSource ctor in line 230. Which object is pointed to
when
> calling type()? Which value does this pointer have? Where is it
initialized?

After days of bug hunting, I couldn't figure out that. The following things
I did for the same.
- I stepped in through functions in debugging and checked the stack.
- Tried to study the QMap related function defaultQuoteSources() and
checked its usage.
- 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.

Please direct me what thing I missed. Thanks.
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.

Regards
Suraj Kumar Mahto

On Wed, Jun 16, 2021 at 10:31 PM Thomas Baumgart <thb@net-bembel.de> wrote:

>
> On Mittwoch, 16. Juni 2021 18:32:42 CEST Suraj Kumar Mahto wrote:
>
> > > This may depend on what you are doing to get to the crash. I simply
> open
> > > the online quotes settings and press the New button at the top of that
> > > dialog and immediately get the crash. Doing so, I could trace back the
> > > problem to a nullptr assignment.
> > Hello,
> > I guess the problem starts with this line
> > main.cpp:351  const int rc = a.exec();
> > exec() is a qt function so that shouldn't be creating the problem and I
> am
> > unable to find which null pointer assignment is creating the segmentation
> > fault.
> >
> > > Not knowing your environment it is hard to comment on this. I do my
> > > debugging mainly in KDevelop and don't have problems with a freezing
> > > application.
> >
> > I am using KDevelop. I figured out that, it works fine now.
>
> Let the application run in KDevelop's Debug mode. At some point it will
> crash. This will let you inspect the state (variables, backtrace, etc.)
> of the application.
>
> Look at the local variables. What is the value of 'this'? Does that make
> sense?
> It chokes inside the method AlkOnlineQuotesProfile::type() which gets
> called
> from AlkOnlineQuoteSource ctor in line 230. Which object is pointed to when
> calling type()? Which value does this pointer have? Where is it
> initialized?
>
> These are the questions you want to answer and then walk the stack
> backwards.
>
>
> --
>
> Regards
>
> Thomas Baumgart
>
> https://www.signal.org/       Signal, the better WhatsApp
> -------------------------------------------------------------
> "The flame that burns twice as bright
> burns half as long." ― Lao Tzu, Te Tao Ching
> -------------------------------------------------------------
>

[Attachment #3 (text/html)]

<div dir="ltr"><div><div><div><div><div><div>&gt; Look at the local variables. What \
is the value of &#39;this&#39;? Does that make sense?<br> &gt; It chokes inside the \
method AlkOnlineQuotesProfile::type() which gets called<br> &gt; from \
AlkOnlineQuoteSource ctor in line 230. Which object is pointed to when<br> &gt; \
calling type()? Which value does this pointer have? Where is it \
initialized?<br><br></div>After days of bug hunting, I couldn&#39;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 &lt;<a href="mailto:thb@net-bembel.de">thb@net-bembel.de</a>&gt; \
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>
&gt; &gt; This may depend on what you are doing to get to the crash. I simply \
open<br> &gt; &gt; the online quotes settings and press the New button at the top of \
that<br> &gt; &gt; dialog and immediately get the crash. Doing so, I could trace back \
the<br> &gt; &gt; problem to a nullptr assignment.<br>
&gt; Hello,<br>
&gt; I guess the problem starts with this line<br>
&gt; main.cpp:351   const int rc = a.exec();<br>
&gt; exec() is a qt function so that shouldn&#39;t be creating the problem and I \
am<br> &gt; unable to find which null pointer assignment is creating the \
segmentation<br> &gt; fault.<br>
&gt; <br>
&gt; &gt; Not knowing your environment it is hard to comment on this. I do my<br>
&gt; &gt; debugging mainly in KDevelop and don&#39;t have problems with a \
freezing<br> &gt; &gt; application.<br>
&gt;<br>
&gt; I am using KDevelop. I figured out that, it works fine now.<br>
<br>
Let the application run in KDevelop&#39;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 &#39;this&#39;? 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>
&quot;The flame that burns twice as bright<br>
burns half as long.&quot; ― Lao Tzu, Te Tao Ching<br>
-------------------------------------------------------------<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic