Bug 407089

Summary: Ktars crashes with ZWO cameras since v.320
Product: [Applications] kstars Reporter: Jean-Claude <jcjesior>
Component: generalAssignee: Jasem Mutlaq <mutlaqja>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 3.2.2
Sentry Crash Report:
Attachments: crash log
attachment-17367-0.html

Description Jean-Claude 2019-04-30 12:19:19 UTC
SUMMARY
Ktars crashes with ZWO cameras since v. 320.
No problem with v.295 to v.311

STEPS TO REPRODUCE
1. Create a profile containing ONLY the image and guider cameras (in my case ZWO ASI1600MC and ASI120MC)
2. Run a job of 1sec x 100captures

OBSERVED RESULT
3. With v.320 KStars finish the job but crash on quitting the app
4. With v.321 KStars crashes after only a few captures
5. No problem with v.295 to v.311


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 10.14
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Jean-Claude 2019-04-30 12:26:13 UTC
NOTE : In all these KStars versions v.295-321) it is impossible to Enable the Debug Option in the INDI Control Panel
Comment 2 Jean-Claude 2019-04-30 13:00:49 UTC
Created attachment 119744 [details]
crash log
Comment 3 Jean-Claude 2019-04-30 15:29:54 UTC
(In reply to Jean-Claude from comment #1)
> NOTE : In all these KStars versions v.295-321) it is impossible to Enable
> the Debug Option in the INDI Control Panel

Sorry, I forgot to enable the debugging options.
Comment 4 Jean-Claude 2019-04-30 17:44:56 UTC
There is definitively a problem capturing series of images with KStars v.3.2.1
Here is the beginning of the Apple report:
Process:               kstars [2395]
Path:                  /Applications/kstars321.app/Contents/MacOS/kstars
Identifier:            ???
Version:               3.2.1 (3.2.1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           kstars [2395]
User ID:               501

Date/Time:             2019-04-30 19:42:20.737 +0200
OS Version:            Mac OS X 10.14.4 (18E226)
Report Version:        12
Anonymous UUID:        B4935D90-9291-6E7B-64F2-4BB9592F6D87


Time Awake Since Boot: 10000 seconds

System Integrity Protection: enabled

Crashed Thread:        11  Thread (pooled)

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000001404fe000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [2395]

VM Regions Near 0x1404fe000:
    MALLOC_LARGE           000000013e5d7000-00000001404fe000 [ 31.2M] rw-/rwx SM=PRV  
--> 
    MALLOC_LARGE           0000000140ff6000-000000014208c000 [ 16.6M] rw-/rwx SM=COW
Comment 5 Jasem Mutlaq 2019-05-01 08:28:33 UTC
Git commit 161d65aa7d10bd7f17b6a7006e8f3bde24f2227f by Jasem Mutlaq.
Committed on 01/05/2019 at 08:25.
Pushed by mutlaqja into branch 'master'.

If previous image is not done loading, wait until the future is completed.

This could fix:
Related: bug 406950, bug 407088, bug 407074

FIXED-IN:3.2.2

M  +2    -0    kstars/fitsviewer/fitsview.cpp

https://commits.kde.org/kstars/161d65aa7d10bd7f17b6a7006e8f3bde24f2227f
Comment 6 Jean-Claude 2019-05-01 09:01:17 UTC
--- Comment #5 from Jasem Mutlaq <mutlaqja@ikarustech.com> ---
Git commit 161d65aa7d10bd7f17b6a7006e8f3bde24f2227f by Jasem Mutlaq.
"Committed on 01/05/2019 at 08:25.
Pushed by mutlaqja into branch 'master'.

If previous image is not done loading, wait until the future is completed.

This could fix:
Related: bug 406950, bug 407088, bug 407074

FIXED-IN:3.2.2"

That might be effectively the cause of the problem because introducing a delay in the capture module postpone the crash.
Thank you
Comment 7 Jean-Claude 2019-05-02 09:52:44 UTC
Created attachment 119798 [details]
attachment-17367-0.html

Hi again,

I copy the first lines of the Apple Crash Report :

Process:               kstars [1329]
Path:                  /Applications/kstars322.app/Contents/MacOS/kstars
Identifier:            ???
Version:               3.2.2 (3.2.2)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           kstars [1329]
User ID:               501

Date/Time:             2019-05-02 11:28:36.755 +0200
OS Version:            Mac OS X 10.14.4 (18E226)
Report Version:        12
Anonymous UUID:        32234BB2-B34D-7736-A43B-A43980876E09

Sleep/Wake UUID:       858EF6AD-314E-41CC-B9DE-149BB44A8D78

Time Awake Since Boot: 5700 seconds
Time Since Wake:       1900 seconds

System Integrity Protection: enabled

Crashed Thread:        7  Thread (pooled)

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000136d4c000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [1329]

VM Regions Near 0x136d4c000:
    MALLOC_LARGE           0000000136770000-0000000136d4c000 [ 6000K] rw-/rwx SM=PRV  
--> 
    MALLOC_LARGE_REUSABLE  00000001372ac000-0000000138342000 [ 16.6M] rw-/rwx SM=COW  

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_platform.dylib      	0x00007fff5d16cd09 _platform_memmove$VARIANT$Haswell + 41
1   org.qt-project.QtGui          	0x0000000108ccdf4b QImage::copy(QRect const&) const + 1547
2   org.qt-project.QtGui          	0x0000000108cce2e7 QImage::detach() + 103
3   org.qt-project.QtGui          	0x0000000108eb83c4 QPainter::begin(QPaintDevice*) + 164
4   org.qt-project.QtGui          	0x0000000108eb8312 QPainter::QPainter(QPaintDevice*) + 242
5   libqcocoa.dylib               	0x000000010c1dd0f3 QRasterBackingStore::beginPaint(QRegion const&) + 387
6   org.qt-project.QtGui          	0x0000000108e0739a QBackingStore::beginPaint(QRegion const&) + 330
7   org.qt-project.QtWidgets      	0x00000001086a6524 0x108689000 + 120100
8   org.qt-project.QtWidgets      	0x00000001086d4b36 QWidget::event(QEvent*) + 1654
9   org.qt-project.QtWidgets      	0x0000000108698ebf QApplicationPrivate::notify_helper(QObject*, QEvent*) + 271
10  org.qt-project.QtWidgets      	0x000000010869a2dc QApplication::notify(QObject*, QEvent*) + 588
11  org.qt-project.QtCore         	0x00000001094958d4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212

Best regards,
__________
Jean-Claude





> On 1 May 2019, at 10:28, Jasem Mutlaq <bugzilla_noreply@kde.org> wrote:
> 
> https://bugs.kde.org/show_bug.cgi?id=407089
> 
> Jasem Mutlaq <mutlaqja@ikarustech.com> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Status|REPORTED                    |RESOLVED
>         Resolution|---                         |FIXED
>      Latest Commit|                            |https://commits.kde.org/kst
>                   |                            |ars/161d65aa7d10bd7f17b6a70
>                   |                            |06e8f3bde24f2227f
>   Version Fixed In|                            |3.2.2
> 
> --- Comment #5 from Jasem Mutlaq <mutlaqja@ikarustech.com> ---
> Git commit 161d65aa7d10bd7f17b6a7006e8f3bde24f2227f by Jasem Mutlaq.
> Committed on 01/05/2019 at 08:25.
> Pushed by mutlaqja into branch 'master'.
> 
> If previous image is not done loading, wait until the future is completed.
> 
> This could fix:
> Related: bug 406950, bug 407088, bug 407074
> 
> FIXED-IN:3.2.2
> 
> M  +2    -0    kstars/fitsviewer/fitsview.cpp
> 
> https://commits.kde.org/kstars/161d65aa7d10bd7f17b6a7006e8f3bde24f2227f
> 
> -- 
> You are receiving this mail because:
> You reported the bug.