Recent

Author Topic: User reports application freezes when in background for a while  (Read 1267 times)

MISV

  • Hero Member
  • *****
  • Posts: 792
I have just received a very an odd report that my application sometimes freezes on shutdown, resize and when iddling in background. I have not had other reports of this, but I trust this user (and I do not have many Mac users)

1) I don't do background/threading tasks in my software (unless specifically started) so I can probably rule that out.
2) I have experience a problem when running in debugger with an excepting occuring when closing my app - that started after switching to Cocoa https://forum.lazarus.freepascal.org/index.php/topic,45837.0.html "EXC_BAD_ACCESS in WidgetSet.DeleteObject(GDIObject)"
3) I have *in* past experience some "draw" problems when resizing controls, but they have almost all been solved by virtual treeview updates, LCL-Cocoa updates and me simplifying GUI some places (removing splitters for one)
4) I have a pretty complex UI

So as you can see - I have no idea about what causes the issue reported by the user except that I *suspect* it could be some kind of "message" (Windows terminology) that requests the app to update its GUI or similar? Is there anything I can try "hook" into to gain a better understanding if maybe this could be the case?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: User reports application freezes when in background for a while
« Reply #1 on: June 23, 2019, 02:33:14 pm »
You should be able to get a crash report from the user...  (they're stored in the system) Though it might not be useful enough, because the user doesn't have a debugging info, and the only thing you'd see would be addresses.

Are you using trunk? If yes, then it's a sort of an issue, just because it's changing...

If there's a crash on resizing, I'd think this one should be researched first. As they're a supposedly the easiest to replicate

I'd suggest to provide the user the application with debugging info file. OR at least keep the debugging info file separately (.dSYM file, that's created if you check "generate external debugging info"). Once you get the crash report from the user, the debugging info file can help to decypther it.
« Last Edit: June 23, 2019, 02:39:38 pm by skalogryz »

MISV

  • Hero Member
  • *****
  • Posts: 792
Re: User reports application freezes when in background for a while
« Reply #2 on: June 24, 2019, 02:12:21 am »
I just tried let my app do nothing for half an hour and then resize a control containing a virtual treeview (normally works fine)

I now got this error ... (!)

starts here (so beginning first then last at end)
lclmessageglue.pas - 205 - LCLSENDKILLFOCUSMSG(0x0000000102a0bdd0)
lclmessageglue.pas - 143 -SENDSIMPLEMESSAGE(0x0000000102a0bdd0, 8)
lclmessageglue.pas - 112 -DELIVERMESSAGE(0x0000000102a0bdd0, <unavailable>)

... then enter my own form front_form.pas WNDPROC ... But the only thing that does is calling inherited ...

and call stack then continues here
:100015A24 - FPC_STACKCHECK
:100016121 - FPC_HANDLEERROR
:1000160C6 - SYSTEM_$$_HANDLEERRORADDFRAMEIND$LONGINT$POINTER$POINTER
:100016023 - FPC_BREAK_ERROR
:100047E62 - SYSUTILS_$$_RUNERRORTOEXCEPT$LONGINT$POINTER$POINTER
:100016023 - FPC_RAISEEXCEPTION



skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: User reports application freezes when in background for a while
« Reply #3 on: June 24, 2019, 03:33:11 am »
that's a focus switch loop. It's fixed in trunk... presumably

MISV

  • Hero Member
  • *****
  • Posts: 792
Re: User reports application freezes when in background for a while
« Reply #4 on: June 24, 2019, 10:34:35 am »
I will update to latest and report back if fixed on my computer (and later report back if user can confirm as well)

 

TinyPortal © 2005-2018