Topic: crash and other editor error

I am using SimplyFortran 3.20 Build 3566 on Intel Mac Pro with Big Sur 11.6.

(1) When I add a fortran source file to a project and press any of the toolbar buttons SF just quits. Without a source code, pressing these buttons doesn't. Compiling & running with the Build Menu bar works fine.
(2) Copying & pasting external source codes does not work.

Re: crash and other editor error

I'll look into it immediately. That first bug sounds catastrophic.

On the second topic, how are you attempting pasting, out of curiousity?  Are you using Command+V or are you using the editor's popup menu?

Jeff Armstrong
Approximatrix, LLC

Re: crash and other editor error

About Copy&Paste:
It is interesting that Copy&Paste works for very short codes, but doesn't for longer ones. Checked both with Command+V and Paste popup menu with right click.

Re: crash and other editor error

I'm currently unable to replicate anything you've described on Big Sur. 

Can you describe the exact steps in your first issue in detail? 

Are you adding a new or existing file to a Fortran project?

What buttons cause Simply Fortran to crash?  Cut/Copy/Paste, Undo, Open, Build?

In regards to your described copy and paste issues, I'm not seeing a limit.  I'll have to investigate further.

Jeff Armstrong
Approximatrix, LLC

Re: crash and other editor error

OK. The crash seems to happen randomly. The following is the crash report generated by Mac OS. It is lengthy so I'll divide it a few replies:

Process:               simplyfortran [1119]
Path:                  /Applications/Simply Fortran.app/Contents/MacOS/simplyfortran
Identifier:            com.approximatrix.simplyfortran
Version:               3.20 (3.20.3566)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           simplyfortran [1119]
User ID:               501

Date/Time:             2021-09-30 17:12:56.965 +0900
OS Version:            macOS 11.6 (20G165)
Report Version:        12
Anonymous UUID:        AEC1F677-B546-5114-839E-413F919B2A17


Time Awake Since Boot: 1700 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

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

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

VM Regions Near 0x1:
-->
    Kernel Alloc Once             edfb000-edfd000      [    8K] rw-/rwx SM=COW 

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libgobject-2.0.0.dylib            0x00000001105f0593 g_signal_emit_valist + 1379
1   libgobject-2.0.0.dylib            0x00000001105f0ff2 g_signal_emit + 130
2   libgtk-3.0.dylib                  0x000000010fb5765e gtk_widget_draw_internal + 382
3   libgtk-3.0.dylib                  0x000000010f90f42b gtk_container_propagate_draw + 475
4   simplyfortran                     0x000000010ef7e0c7 0x10edeb000 + 1650887
5   simplyfortran                     0x000000010ef7e0fb 0x10edeb000 + 1650939
6   libgtk-3.0.dylib                  0x000000010fb57684 gtk_widget_draw_internal + 420
7   libgtk-3.0.dylib                  0x000000010f90f42b gtk_container_propagate_draw + 475
8   libgtk-3.0.dylib                  0x000000010fa27200 gtk_notebook_draw_stack + 64
9   libgtk-3.0.dylib                  0x000000010f916c55 gtk_css_custom_gadget_draw + 37
10  libgtk-3.0.dylib                  0x000000010f91c493 gtk_css_gadget_draw + 1411
11  libgtk-3.0.dylib                  0x000000010f8c1b6c gtk_box_gadget_draw + 108
12  libgtk-3.0.dylib                  0x000000010f91c493 gtk_css_gadget_draw + 1411
13  libgtk-3.0.dylib                  0x000000010fa216de gtk_notebook_draw + 46
14  libgtk-3.0.dylib                  0x000000010fb57684 gtk_widget_draw_internal + 420
15  libgtk-3.0.dylib                  0x000000010f90f42b gtk_container_propagate_draw + 475
16  libgtk-3.0.dylib                  0x000000010fa32263 gtk_paned_render + 275
17  libgtk-3.0.dylib                  0x000000010f916c55 gtk_css_custom_gadget_draw + 37
18  libgtk-3.0.dylib                  0x000000010f91c493 gtk_css_gadget_draw + 1411
19  libgtk-3.0.dylib                  0x000000010fa2fd91 gtk_paned_draw + 17
20  libgtk-3.0.dylib                  0x000000010fb57684 gtk_widget_draw_internal + 420
21  libgtk-3.0.dylib                  0x000000010f90f42b gtk_container_propagate_draw + 475
22  libgtk-3.0.dylib                  0x000000010f90fb03 gtk_container_draw + 211
23  libgtk-3.0.dylib                  0x000000010f8bea45 gtk_box_draw_contents + 37
24  libgtk-3.0.dylib                  0x000000010f916c55 gtk_css_custom_gadget_draw + 37
25  libgtk-3.0.dylib                  0x000000010f91c493 gtk_css_gadget_draw + 1411
26  libgtk-3.0.dylib                  0x000000010f8bdc41 gtk_box_draw + 17
27  libgtk-3.0.dylib                  0x000000010fb57684 gtk_widget_draw_internal + 420
28  libgtk-3.0.dylib                  0x000000010f90f42b gtk_container_propagate_draw + 475
29  libgtk-3.0.dylib                  0x000000010fa32315 gtk_paned_render + 453
30  libgtk-3.0.dylib                  0x000000010f916c55 gtk_css_custom_gadget_draw + 37
31  libgtk-3.0.dylib                  0x000000010f91c493 gtk_css_gadget_draw + 1411
32  libgtk-3.0.dylib                  0x000000010fa2fd91 gtk_paned_draw + 17
33  libgtk-3.0.dylib                  0x000000010fb57684 gtk_widget_draw_internal + 420
34  libgtk-3.0.dylib                  0x000000010f90f42b gtk_container_propagate_draw + 475
35  libgtk-3.0.dylib                  0x000000010f90fb03 gtk_container_draw + 211
36  libgtk-3.0.dylib                  0x000000010f8bea45 gtk_box_draw_contents + 37
37  libgtk-3.0.dylib                  0x000000010f916c55 gtk_css_custom_gadget_draw + 37
38  libgtk-3.0.dylib                  0x000000010f91c493 gtk_css_gadget_draw + 1411
39  libgtk-3.0.dylib                  0x000000010f8bdc41 gtk_box_draw + 17
40  libgtk-3.0.dylib                  0x000000010fb57684 gtk_widget_draw_internal + 420
41  libgtk-3.0.dylib                  0x000000010f90f42b gtk_container_propagate_draw + 475
42  libgtk-3.0.dylib                  0x000000010f90fb03 gtk_container_draw + 211
43  libgtk-3.0.dylib                  0x000000010fb79374 gtk_window_draw + 548
44  libgtk-3.0.dylib                  0x000000010fb57684 gtk_widget_draw_internal + 420
45  libgtk-3.0.dylib                  0x000000010fb5859d gtk_widget_render + 301
46  libgtk-3.0.dylib                  0x000000010f9f732b gtk_main_do_event + 1659
47  libgdk-3.0.dylib                  0x00000001100217a1 _gdk_event_emit + 49
48  libgdk-3.0.dylib                  0x0000000110033812 _gdk_window_process_updates_recurse_helper + 322
49  libgdk-3.0.dylib                  0x0000000110043e1f -[GdkQuartzView drawRect:] + 303
50  com.apple.AppKit                  0x00007fff22edd46b _NSViewDrawRect + 139
51  com.apple.AppKit                  0x00007fff2360f1ef -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 2115
52  com.apple.AppKit                  0x00007fff22edca85 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] + 967
53  com.apple.QuartzCore              0x00007fff26cf7271 CABackingStoreUpdate_ + 219
54  com.apple.QuartzCore              0x00007fff26d5e84d invocation function for block in CA::Layer::display_() + 53
55  com.apple.QuartzCore              0x00007fff26cf6787 -[CALayer _display] + 2247
56  com.apple.AppKit                  0x00007fff22edc5f5 -[_NSBackingLayer display] + 475
57  com.apple.AppKit                  0x00007fff22e476e2 -[_NSViewBackingLayer display] + 555
58  com.apple.QuartzCore              0x00007fff26cf56f3 CA::Layer::display_if_needed(CA::Transaction*) + 863
59  com.apple.QuartzCore              0x00007fff26e40bee CA::Context::commit_transaction(CA::Transaction*, double, double*) + 666
60  com.apple.QuartzCore              0x00007fff26cd6b6f CA::Transaction::commit() + 713
61  com.apple.AppKit                  0x00007fff22ef186c __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285
62  com.apple.AppKit                  0x00007fff23647332 ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
63  com.apple.CoreFoundation          0x00007fff20565671 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
64  com.apple.CoreFoundation          0x00007fff20565505 __CFRunLoopDoObservers + 543
65  com.apple.CoreFoundation          0x00007fff20564998 __CFRunLoopRun + 841
66  com.apple.CoreFoundation          0x00007fff20563f8c CFRunLoopRunSpecific + 563
67  com.apple.HIToolbox               0x00007fff287ac1f3 RunCurrentEventLoopInMode + 292
68  com.apple.HIToolbox               0x00007fff287abe26 ReceiveNextEventCommon + 284
69  com.apple.HIToolbox               0x00007fff287abcf3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
70  com.apple.AppKit                  0x00007fff22d6d172 _DPSNextEvent + 864
71  com.apple.AppKit                  0x00007fff22d6b945 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
72  libgdk-3.0.dylib                  0x000000011004c8fc poll_func + 172
73  libglib-2.0.0.dylib               0x000000011066cda1 g_main_context_iterate + 433
74  libglib-2.0.0.dylib               0x000000011066d12f g_main_loop_run + 239
75  libgtk-3.0.dylib                  0x000000010f9f6b3a gtk_main + 74
76  simplyfortran                     0x000000010ee11205 0x10edeb000 + 156165
77  libdyld.dylib                     0x00007fff20489f3d start + 1

Re: crash and other editor error

Thread 1:: pool-spawner
0   libsystem_kernel.dylib            0x00007fff2043bcde __psynch_cvwait + 10
1   libsystem_pthread.dylib           0x00007fff2046ee49 _pthread_cond_wait + 1298
2   libglib-2.0.0.dylib               0x00000001106c6c16 g_cond_wait + 38
3   libglib-2.0.0.dylib               0x000000011063741b g_async_queue_pop_intern_unlocked + 187
4   libglib-2.0.0.dylib               0x000000011069a018 g_thread_pool_spawn_thread + 72
5   libglib-2.0.0.dylib               0x0000000110699a12 g_thread_proxy + 66
6   libsystem_pthread.dylib           0x00007fff2046e8fc _pthread_start + 224
7   libsystem_pthread.dylib           0x00007fff2046a443 thread_start + 15

Thread 2:: gmain
0   libsystem_kernel.dylib            0x00007fff2043f9ca poll + 10
1   libglib-2.0.0.dylib               0x000000011066cda1 g_main_context_iterate + 433
2   libglib-2.0.0.dylib               0x000000011066cea6 g_main_context_iteration + 102
3   libglib-2.0.0.dylib               0x000000011066eec1 glib_worker_main + 33
4   libglib-2.0.0.dylib               0x0000000110699a12 g_thread_proxy + 66
5   libsystem_pthread.dylib           0x00007fff2046e8fc _pthread_start + 224
6   libsystem_pthread.dylib           0x00007fff2046a443 thread_start + 15

Thread 3:
0   libsystem_kernel.dylib            0x00007fff2043bcde __psynch_cvwait + 10
1   libsystem_pthread.dylib           0x00007fff2046ee49 _pthread_cond_wait + 1298
2   simplyfortran                     0x000000010ee13da6 0x10edeb000 + 167334
3   simplyfortran                     0x000000010ee57e8a 0x10edeb000 + 446090
4   simplyfortran                     0x000000010ee57fd7 0x10edeb000 + 446423
5   simplyfortran                     0x000000010ee582b7 0x10edeb000 + 447159
6   simplyfortran                     0x000000010ee6a5dc 0x10edeb000 + 521692
7   libsystem_pthread.dylib           0x00007fff2046e8fc _pthread_start + 224
8   libsystem_pthread.dylib           0x00007fff2046a443 thread_start + 15

Thread 4:
0   libsystem_kernel.dylib            0x00007fff2043bcde __psynch_cvwait + 10
1   libsystem_pthread.dylib           0x00007fff2046ee49 _pthread_cond_wait + 1298
2   simplyfortran                     0x000000010ee39f63 0x10edeb000 + 323427
3   simplyfortran                     0x000000010ee6a66d 0x10edeb000 + 521837
4   libsystem_pthread.dylib           0x00007fff2046e8fc _pthread_start + 224
5   libsystem_pthread.dylib           0x00007fff2046a443 thread_start + 15

Thread 5:
0   libsystem_kernel.dylib            0x00007fff2043bbb2 __semwait_signal + 10
1   libsystem_c.dylib                 0x00007fff203bbc1a nanosleep + 196
2   simplyfortran                     0x000000010ee21de6 0x10edeb000 + 224742
3   simplyfortran                     0x000000010ee6b074 0x10edeb000 + 524404
4   libsystem_pthread.dylib           0x00007fff2046e8fc _pthread_start + 224
5   libsystem_pthread.dylib           0x00007fff2046a443 thread_start + 15

Thread 6:: com.apple.NSEventThread
0   libsystem_kernel.dylib            0x00007fff204392ba mach_msg_trap + 10
1   libsystem_kernel.dylib            0x00007fff2043962c mach_msg + 60
2   com.apple.CoreFoundation          0x00007fff2056649f __CFRunLoopServiceMachPort + 316
3   com.apple.CoreFoundation          0x00007fff20564b7f __CFRunLoopRun + 1328
4   com.apple.CoreFoundation          0x00007fff20563f8c CFRunLoopRunSpecific + 563
5   com.apple.AppKit                  0x00007fff22ef323a _NSEventThread + 124
6   libsystem_pthread.dylib           0x00007fff2046e8fc _pthread_start + 224
7   libsystem_pthread.dylib           0x00007fff2046a443 thread_start + 15

Thread 7:
0   libsystem_kernel.dylib            0x00007fff2043bcde __psynch_cvwait + 10
1   libsystem_pthread.dylib           0x00007fff2046ee49 _pthread_cond_wait + 1298
2   libgdk-3.0.dylib                  0x000000011004d2f0 select_thread_func + 80
3   libsystem_pthread.dylib           0x00007fff2046e8fc _pthread_start + 224
4   libsystem_pthread.dylib           0x00007fff2046a443 thread_start + 15

Thread 8:
0   libsystem_pthread.dylib           0x00007fff2046a420 start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib           0x00007fff2046a420 start_wqthread + 0

Thread 10:
0   libsystem_pthread.dylib           0x00007fff2046a420 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000001  rbx: 0x0000000000000001  rcx: 0x0000000000000001  rdx: 0x00007f9f0f0ad900
  rdi: 0x00007f9f0d7083c0  rsi: 0x0000000000000000  rbp: 0x00007ffee0e0fca0  rsp: 0x00007ffee0e0fb70
   r8: 0x0000000000004a48   r9: 0xffffffff00000000  r10: 0x00007f9f0d7083d8  r11: 0x00000000011be700
  r12: 0x0000000000000014  r13: 0x00007f9f0ea4a210  r14: 0x00007ffee0e0fd60  r15: 0x00007ffee0e0fbb0
  rip: 0x00000001105f0593  rfl: 0x0000000000010283  cr2: 0x0000000000000001
 
Logical CPU:     2
Error Code:      0x00000004 (no mapping for user data read)
Trap Number:     14

Thread 0 instruction stream:
  b5 f0 fe ff ff 4c 8d ad-d0 fe ff ff 4c 89 ea ff  .....L......L...
  10 4c 89 ef e8 84 b6 00-00 48 8d 3d a5 00 02 00  .L.......H.=....
  e8 e2 01 01 00 48 c7 85-30 ff ff ff 04 00 00 00  .....H..0.......
  48 8b 05 be 00 02 00 48-85 c0 4c 8b ad 50 ff ff  H......H..L..P..
  ff 48 8b 95 58 ff ff ff-0f 84 be 08 00 00 4c 39  .H..X.........L9
  f8 74 2a 66 2e 0f 1f 84-00 00 00 00 00 48 89 c1  .t*f.........H..
[48]8b 00 48 85 c0 0f 84-a0 08 00 00 4c 39 f8 75  H..H........L9.u    <==
  ec 48 8b 85 10 ff ff ff-48 89 01 eb 0e 48 8b 85  .H......H....H..
  10 ff ff ff 48 89 05 6a-00 02 00 48 85 d2 74 0e  ....H..j...H..t.
  8b bd 78 ff ff ff 4c 89-ee e8 9f d6 ff ff 48 8d  ..x...L.......H.
  3d 20 00 02 00 e8 63 01-01 00 48 83 7d 88 00 74  = ....c...H.}..t
  0c 48 8d bd d0 fe ff ff-e8 70 b6 00 00 49 83 fc  .H.......p...I..
 
Thread 0 last branch register state not available.

Re: crash and other editor error

Binary Images:
         0xef88000 -          0xef97fff  libobjc-trampolines.dylib (824) <C1B6BD90-D6AA-388B-B692-D66D512630AA> /usr/lib/libobjc-trampolines.dylib
         0xefd3000 -          0xefd6fff +im-quartz.dylib (0) <66695F21-F71B-3DB0-A3B8-AC69B28A64B3> /Applications/Simply Fortran.app/Contents/MacOS/im-quartz.dylib
         0xefe7000 -          0xefeefff +libpixbufloader-svg.dylib (0) <7F7B8B72-C953-3BF4-9182-4755A23349B4> /Applications/Simply

................................
(too lengthy => omitted)
................................

/System/Library/Frameworks/AVFAudio.framework/Versions/A/AVFAudio
    0x7fff6f92b000 -     0x7fff6f93dfff  com.apple.CMImaging (1.0 - 82.6) <91AA282D-81A1-34C3-AFF4-887ABA89CCAA> /System/Library/PrivateFrameworks/CMImaging.framework/Versions/A/CMImaging
    0x7fff779ec000 -     0x7fff779f3fff  libRosetta.dylib (203.58) <F72C2D50-7279-3497-8A59-56908F9661F3> /usr/lib/libRosetta.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=851.9M resident=0K(0%) swapped_out_or_unallocated=851.9M(100%)
Writable regions: Total=163.1M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=163.1M(100%)

                                VIRTUAL   REGION
REGION TYPE                        SIZE    COUNT (non-coalesced)
===========                     =======  =======
Accelerate framework               384K        3
Activity Tracing                   256K        1
CG backing stores                 2880K        6
CG image                            36K        6
CG raster data                    22.3M       26
CoreAnimation                     19.6M       25
CoreGraphics                        12K        2
CoreUI image data                 1516K       11
Dispatch continuations            32.0M        1
Foundation                          16K        1
Kernel Alloc Once                    8K        1
MALLOC                            92.5M      347
MALLOC guard page                   32K        8
MALLOC_LARGE (reserved)            192K        3         reserved VM address space (unallocated)
STACK GUARD                       56.0M       11
Stack                             13.1M       11
VM_ALLOCATE                       2236K       31
__DATA                            18.5M      457
__DATA_CONST                      21.8M      297
__DATA_DIRTY                      1148K      154
__FONT_DATA                          4K        1
__LINKEDIT                       519.8M      100
__OBJC_RO                         70.3M        1
__OBJC_RW                         2496K        2
__TEXT                           332.3M      457
__UNICODE                          588K        1
mapped file                      235.0M       28
shared memory                      792K       19
===========                     =======  =======
TOTAL                              1.4G     2011
TOTAL, minus reserved VM space     1.4G     2011

Model: MacBookPro11,1, BootROM 431.140.6.0.0, 2 processors, Dual-Core Intel Core i5, 2.6 GHz, 8 GB, SMC 2.16f68
Graphics: kHW_IntelIrisItem, Intel Iris, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343531533641465238412D50422020
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343531533641465238412D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x112), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1680.8)
Bluetooth: Version 8.0.5d7, 3 services, 19 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0256F, 251 GB
USB Device: USB 3.0 Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 17.2

Re: crash and other editor error

The crash report shows Simply Fortran dying while drawing an editor for some reason.  It seems to be deep into the GTK toolkit libraries when the crash occurs, but an editor tab is the origin of the issue.  I'll see if I can force a crash on my system.

Jeff Armstrong
Approximatrix, LLC