Crash in SuperEdit 4.8 when cutting card

Questions regarding the Developer Edition's SuperEdit? This is the place!

Crash in SuperEdit 4.8 when cutting card

Postby HairyHighlandCow » Mon Sep 12, 2016 8:42 am

I've had a one off crash with SuperEdit 4.8 b21 when selecting a card in a list in a window and then 'Edit > Cut' from the menu bar. I've tried to reproduce it again but so far haven't been able to, here is the first part of the crash report. Please let me know if you would like me to send you the whole report.

Code: Select all
Process:               SuperEdit 4.8 [2987]
Path:                  /Applications/SuperCard 4.8/SuperEdit 4.8.app/Contents/MacOS/SuperEdit 4.8
Identifier:            us.SuperCard.SuperEdit
Version:               Version 4.8.0b21 (???)
Code Type:             X86 (Native)
Parent Process:        ??? [1]
Responsible:           SuperEdit 4.8 [2987]
User ID:               501

Date/Time:             2016-09-11 13:22:30.639 +0100
OS Version:            Mac OS X 10.11.6 (15G1004)
Report Version:        11
Anonymous UUID:        6A31C461-F8C1-09AA-58DF-D2C8F1AB935B

Sleep/Wake UUID:       B05AA78D-0DF5-4FDA-904F-340194FFF4ED

Time Awake Since Boot: 48000 seconds
Time Since Wake:       160 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 0x000000000000001f
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x1f:
-->
    __TEXT                 0000000000001000-0000000000169000 [ 1440K] r-x/rwx SM=COW  /Applications/SuperCard 4.8/SuperEdit 4.8.app/Contents/MacOS/SuperEdit 4.8

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   us.SuperCard.SuperEdit           0x00006e1f cardcopy + 1583
1   us.SuperCard.SuperEdit           0x0000e187 doedit + 487
2   us.SuperCard.SuperEdit           0x0001190c runcard + 5228
3   us.SuperCard.SuperEdit           0x0007190c docommand + 2300
4   us.SuperCard.SuperEdit           0x0007b5f1 main + 3137
5   us.SuperCard.SuperEdit           0x00002799 _start + 208
6   us.SuperCard.SuperEdit           0x000026c8 start + 40

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib           0x9c4f97fa kevent_qos + 10
1   libdispatch.dylib                0x92def7ea _dispatch_mgr_invoke + 234
2   libdispatch.dylib                0x92def3be _dispatch_mgr_thread + 52

Thread 2:: jpegdecompress_MPLoop
0   libsystem_kernel.dylib           0x9c4f83ea __psynch_cvwait + 10
1   libsystem_pthread.dylib          0x9b5315a7 _pthread_cond_wait + 868
2   libsystem_pthread.dylib          0x9b53123e pthread_cond_wait + 48
3   com.apple.QuickTimeComponents.component   0x93ea9be3 0x93af9000 + 3869667
4   libsystem_pthread.dylib          0x9b530780 _pthread_body + 138
5   libsystem_pthread.dylib          0x9b5306f6 _pthread_start + 155
6   libsystem_pthread.dylib          0x9b52df7a thread_start + 34

Thread 3:: jpegdecompress_MPLoop
0   libsystem_kernel.dylib           0x9c4f83ea __psynch_cvwait + 10
1   libsystem_pthread.dylib          0x9b5315a7 _pthread_cond_wait + 868
2   libsystem_pthread.dylib          0x9b53123e pthread_cond_wait + 48
3   com.apple.QuickTimeComponents.component   0x93ea9be3 0x93af9000 + 3869667
4   libsystem_pthread.dylib          0x9b530780 _pthread_body + 138
5   libsystem_pthread.dylib          0x9b5306f6 _pthread_start + 155
6   libsystem_pthread.dylib          0x9b52df7a thread_start + 34

Thread 4:: jpegdecompress_MPLoop
0   libsystem_kernel.dylib           0x9c4f83ea __psynch_cvwait + 10
1   libsystem_pthread.dylib          0x9b5315a7 _pthread_cond_wait + 868
2   libsystem_pthread.dylib          0x9b53123e pthread_cond_wait + 48
3   com.apple.QuickTimeComponents.component   0x93ea9be3 0x93af9000 + 3869667
4   libsystem_pthread.dylib          0x9b530780 _pthread_body + 138
5   libsystem_pthread.dylib          0x9b5306f6 _pthread_start + 155
6   libsystem_pthread.dylib          0x9b52df7a thread_start + 34

Thread 5:: com.apple.CFSocket.private
0   libsystem_kernel.dylib           0x9c4f8726 __select + 10
1   com.apple.CoreFoundation         0x96c3e010 __CFSocketManager + 912
2   libsystem_pthread.dylib          0x9b530780 _pthread_body + 138
3   libsystem_pthread.dylib          0x9b5306f6 _pthread_start + 155
4   libsystem_pthread.dylib          0x9b52df7a thread_start + 34

Thread 6:
0   libsystem_kernel.dylib           0x9c4f8d5e __workq_kernreturn + 10
1   libsystem_pthread.dylib          0x9b53034b _pthread_wqthread + 1289
2   libsystem_pthread.dylib          0x9b52df56 start_wqthread + 34

Thread 7:
0   libsystem_kernel.dylib           0x9c4f8d5e __workq_kernreturn + 10
1   libsystem_pthread.dylib          0x9b53034b _pthread_wqthread + 1289
2   libsystem_pthread.dylib          0x9b52df56 start_wqthread + 34

Thread 8:
0   libsystem_kernel.dylib           0x9c4f8d5e __workq_kernreturn + 10
1   libsystem_pthread.dylib          0x9b53034b _pthread_wqthread + 1289
2   libsystem_pthread.dylib          0x9b52df56 start_wqthread + 34

Thread 9:
0   libsystem_kernel.dylib           0x9c4f8d5e __workq_kernreturn + 10
1   libsystem_pthread.dylib          0x9b53034b _pthread_wqthread + 1289
2   libsystem_pthread.dylib          0x9b52df56 start_wqthread + 34

Thread 10:

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0xffffffff  ebx: 0x0000000a  ecx: 0x00000000  edx: 0x0016d4e0
  edi: 0x00000007  esi: 0x0016d4e0  ebp: 0xbffff5b8  esp: 0xbffff4d0
   ss: 0x00000023  efl: 0x00010212  eip: 0x00006e1f   cs: 0x0000001b
   ds: 0x00000023   es: 0x00000023   fs: 0x00000000   gs: 0x0000000f
  cr2: 0x00000000
 
Logical CPU:     0
Error Code:      0x00000000
Trap Number:     0
Externals, projects and software made with SC:
www.hairyhighlandcow.net/software/SC-projects.html
User avatar
HairyHighlandCow
 
Posts: 256
Joined: Sun Jul 06, 2008 1:45 pm
Location: London, UK

Re: Crash in SuperEdit 4.8 when cutting card

Postby codegreen » Mon Sep 12, 2016 1:28 pm

I also need the first line of the next section (i.e., Binary Images)

Thanks,
-Mark
codegreen
 
Posts: 1540
Joined: Mon Jul 14, 2008 11:03 pm

Re: Crash in SuperEdit 4.8 when cutting card

Postby HairyHighlandCow » Mon Sep 12, 2016 1:57 pm

Here it is:

Code: Select all
Binary Images:
    0x1000 -   0x168ff7 +us.SuperCard.SuperEdit (Version 4.8.0b21 - ???) <80AD1450-24F9-8C39-3B0E-0C4C73482DCA> /Applications/SuperCard 4.8/SuperEdit 4.8.app/Contents/MacOS/SuperEdit 4.8


Alec
Externals, projects and software made with SC:
www.hairyhighlandcow.net/software/SC-projects.html
User avatar
HairyHighlandCow
 
Posts: 256
Joined: Sun Jul 06, 2008 1:45 pm
Location: London, UK

Re: Crash in SuperEdit 4.8 when cutting card

Postby codegreen » Mon Sep 12, 2016 4:24 pm

Thanks!

Okay so now I know WHERE and HOW the address exception happened, but alas not quite WHY...

The underlying issue is that SC and SE were designed back in the halcyon days when accessing memory that didn't belong to you was a victimless crime, and when I inherited it the code did this routinely. Nowadays of course that's a fatal error.

I've since found and fixed nearly all the (literally thousands of) places where this used to happen, but some causes are sufficiently subtle and convoluted that you have to catch 'em in the act to figure out what the heck's going on. So please let me know if you manage to come up with a recipe.

In the meantime I've added extra 'sniffing' code to this section to try to better detect accesses to freed Handles. If that doesn't work (because that's not where this invalid address is coming from) there's a generic but far more elaborate and gruesome workaround I devised for this problem in SuperCard that I could try. It will definitely stop the crash but NOT the underlying issue, so I'd much prefer instead to grok what's gang agley and fix it...

-Mark
codegreen
 
Posts: 1540
Joined: Mon Jul 14, 2008 11:03 pm

Re: Crash in SuperEdit 4.8 when cutting card

Postby HairyHighlandCow » Tue Sep 13, 2016 10:17 am

Thanks Mark, I will try and get it to happen again but so far it has been elusive– I've had no further issues cutting and pasting cards.
Externals, projects and software made with SC:
www.hairyhighlandcow.net/software/SC-projects.html
User avatar
HairyHighlandCow
 
Posts: 256
Joined: Sun Jul 06, 2008 1:45 pm
Location: London, UK


Return to SuperEditing

Who is online

Users browsing this forum: No registered users and 2 guests

cron