Mac crashing / works on Windows

Xojo 2019r3.1 - I developed an app on Windows then ported it to a Macbook Pro for a 64 bit compile. The Windows app works as expected on database calls and updates but the same calls on the Mac crash. I have exception logic built in but it doesn’t get called. Can anyone help?

If you’re looking for help here on the forum you’ll need to share your code that’s not working or a project that shows the issue for folks to chime in. Or were you looking for private professional help?

Select Case allGroups
Case True
If Not YesNo(Main, “Assign Group Names?”,“This routine will assign group names to all Relative Ahnentafels in the database. Group name format is surname-surname. Continue?”,“This routine may run a very, very long time depending on the number of Relative ahnentafels found.”) Then Return
Else
If Not YesNo(Main, “Assign Group Names?”,“This routine will assign group names to all Unlocked Ahnentafels in the database. Group name format is surname-surname. Continue?”,“This routine may run a very, very long time depending on the number of Relative ahnentafels found.”) Then Return
End Select

App.MouseCursor = System.Cursors.Wait
Var data As RowSet = App.GetData(“Select * from Ahnentafel where Sequence = 1”)
If data = Nil Or data.AfterLastRow Then Return
Var rids(-1) As Integer
While Not data.AfterLastRow
rids.AddRow(data.column(“RelativeId”).IntegerValue)
data.MoveToNextRow
Wend
data.Close
data=Nil

For Each id As Integer In rids
Var r As RowSet = id.ToRelative
If r= Nil Or r.AfterLastRow Then Continue

If allGroups Or r.Column(“Ahnentafel_is_Locked”).BooleanValue = False Then
Main.RelativePage.AhnentafelPage.AssignGroupNames(id)
r.EditRow
r.Column(“Ahnentafel_is_Locked”).BooleanValue = True
r.SaveRow
End If
r.Close
r = Nil
Next

App.MouseCursor = System.Cursors.FingerPointer
ShowMsg(Main, “Finished”)

@Rebecca Walker — In order to help you, we need the crash report to know with instruction failed and where. You can find them in ~/Library/Logs/DiagnosticReports.

That doesn’t also really help because you didn’t say which exception or crash you get and where.

Rebecca, just a detail, but when you post code, can you please select it and hit the Code icon above the editor <[>] . That is a whole lot more legible:

[code]Select Case allGroups
Case True
If Not YesNo(Main, “Assign Group Names?”,“This routine will assign group names to all Relative Ahnentafels in the database. Group name format is surname-surname. Continue?”,“This routine may run a very, very long time depending on the number of Relative ahnentafels found.”) Then Return
Else
If Not YesNo(Main, “Assign Group Names?”,“This routine will assign group names to all Unlocked Ahnentafels in the database. Group name format is surname-surname. Continue?”,“This routine may run a very, very long time depending on the number of Relative ahnentafels found.”) Then Return
End Select

App.MouseCursor = System.Cursors.Wait
Var data As RowSet = App.GetData(“Select * from Ahnentafel where Sequence = 1”)
If data = Nil Or data.AfterLastRow Then Return
Var rids(-1) As Integer
While Not data.AfterLastRow
rids.AddRow(data.column(“RelativeId”).IntegerValue)
data.MoveToNextRow
Wend
data.Close
data=Nil

For Each id As Integer In rids
Var r As RowSet = id.ToRelative
If r= Nil Or r.AfterLastRow Then Continue

If allGroups Or r.Column(“Ahnentafel_is_Locked”).BooleanValue = False Then
Main.RelativePage.AhnentafelPage.AssignGroupNames(id)
r.EditRow
r.Column(“Ahnentafel_is_Locked”).BooleanValue = True
r.SaveRow
End If
r.Close
r = Nil
Next

App.MouseCursor = System.Cursors.FingerPointer
ShowMsg(Main, “Finished”)[/code]

Process: Genome Mate Pro.debug [697]
Path: /Users/USER/Documents/*/Genome Mate Pro.debug.app/Contents/MacOS/Genome Mate Pro.debug
Identifier: BeckinsLLC.GMP64
Version: 2020.1.0 (2020.1.0.3.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Genome Mate Pro.debug [697]
User ID: 501

Date/Time: 2020-02-25 06:29:06.555 -0600
OS Version: Mac OS X 10.15.3 (19D76)
Report Version: 12
Bridge OS Version: 4.2 (17P3050)
Anonymous UUID: DD2F2014-D70A-2722-BE60-816EC59CA921

Time Awake Since Boot: 380 seconds

System Integrity Protection: enabled

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

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [697]

Application Specific Information:
Refcount overflow in NSResponder or subclass. Too many unbalanced -retains!

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.AppKit 0x00007fff3767cffa -[NSResponder _tryRetain] + 92
1 libobjc.A.dylib 0x00007fff7081eded objc_loadWeakRetained + 351
2 com.apple.CoreFoundation 0x00007fff3a4caf47 _NSObjectLoadWeak + 24
3 com.apple.AppKit 0x00007fff377a1b45 -[NSLayoutGuide _updateInternalFrameIfNeeded] + 93
4 com.apple.AppKit 0x00007fff377a1ab5 -[NSLayoutGuide frame] + 29
5 com.apple.AppKit 0x00007fff3779f7e5 -[NSWindow contentLayoutRect] + 51
6 com.apple.AppKit 0x00007fff37893a76 -[NSWindow(NSCursorRects) _addCursorRect:cursor:forView:] + 501
7 com.apple.AppKit 0x00007fff37893424 -[NSView addCursorRect:cursor:] + 607
8 XojoFramework 0x000000010ed2af71 0x10ec36000 + 1003377
9 XojoFramework 0x000000010ed24b02 0x10ec36000 + 977666
10 com.apple.AppKit 0x00007fff37f3a8b5 -[NSView _resetCursorRects] + 80
11 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
12 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
13 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
14 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
15 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
16 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
17 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
18 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
19 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
20 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
21 com.apple.AppKit 0x00007fff37f3a999 -[NSView _resetCursorRects] + 308
22 com.apple.AppKit 0x00007fff37c6a178 -[NSWindow(NSCursorRects) resetCursorRects] + 128
23 XojoFramework 0x000000010ececa3a ResetCocoaMouseCursor() + 190
24 Genome Mate Pro.debug 0x000000010d83d8d9 Application.MouseCursor.Set%%oi4o + 57
25 Genome Mate Pro.debug 0x000000010db3404a AhnentafelContainer.AhnentafelContainer.AssignGroupNames%%o<AhnentafelContainer.AhnentafelContainer>i8 + 1354 (/AhnentafelContainer:584)
26 Genome Mate Pro.debug 0x000000010dc7e1d4 DatabaseCleanup.DatabaseCleanup.AssignAhnentafelGroupNames%%o<DatabaseCleanup.DatabaseCleanup>b + 6020 (/DatabaseCleanup:1325)
27 Genome Mate Pro.debug 0x000000010dc41286 DatabaseCleanup.DatabaseCleanup.DatabaseRoutines_DoubleClick%%o<DatabaseCleanup.DatabaseCleanup>o + 163366 (/DatabaseCleanup:596)
28 Genome Mate Pro.debug 0x000000010dae2184 Delegate.IM_Invoke%%o + 52
29 Genome Mate Pro.debug 0x000000010dc8d2d4 AddHandler.Stub.27%% + 52
30 XojoFramework 0x000000010ee05491 NuListbox::HandleClick(MouseEvent const&) + 1067
31 XojoFramework 0x000000010ed29f71 0x10ec36000 + 999281
32 XojoFramework 0x000000010ed25231 0x10ec36000 + 979505
33 com.apple.AppKit 0x00007fff378efb0d -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 4907
34 com.apple.AppKit 0x00007fff37859c5c -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2612
35 com.apple.AppKit 0x00007fff37859005 -[NSWindow(NSEventRouting) sendEvent:] + 349
36 XojoFramework 0x000000010ed263a1 0x10ec36000 + 983969
37 com.apple.AppKit 0x00007fff3785737c -[NSApplication(NSEvent) sendEvent:] + 352
38 XojoFramework 0x000000010ed15b7b 0x10ec36000 + 916347
39 Genome Mate Pro.debug 0x000000010d83c7d5 Application._CallFunctionWithExceptionHandling%%op + 181
40 XojoFramework 0x000000010eea1645 CallFunctionWithExceptionHandling(void (*)()) + 262
41 XojoFramework 0x000000010ed15af6 0x10ec36000 + 916214
42 com.apple.AppKit 0x00007fff376a30cf -[NSApplication run] + 707
43 XojoFramework 0x000000010ee9fa51 RuntimeRun + 42
44 Genome Mate Pro.debug 0x000000010d92ab23 REALbasic._RuntimeRun + 19
45 Genome Mate Pro.debug 0x000000010e86a02e _Main + 846 (/#main:244)
46 Genome Mate Pro.debug 0x000000010e868593 main + 19
47 libdyld.dylib 0x00007fff71b927fd start + 1

Thread 1:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff71cd325a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff71cd35d0 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff3a4eed0b __CFRunLoopServiceMachPort + 322
3 com.apple.CoreFoundation 0x00007fff3a4ed8e7 __CFRunLoopRun + 1695
4 com.apple.CoreFoundation 0x00007fff3a4ecbd3 CFRunLoopRunSpecific + 499
5 com.apple.AppKit 0x00007fff37855792 _NSEventThread + 132
6 libsystem_pthread.dylib 0x00007fff71d96e65 _pthread_start + 148
7 libsystem_pthread.dylib 0x00007fff71d9283b thread_start + 15

Thread 2:
0 libsystem_pthread.dylib 0x00007fff71d92818 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00006000024e6400 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x000000001f08000c rbp: 0x00007ffee244c960 rsp: 0x00007ffee244c950
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x00007fff7bc184b1 r13: 0x00007f9939f223f0 r14: 0x00007fff9b84bc00 r15: 0x00007fff9b84b080
rip: 0x00007fff3767cffa rfl: 0x0000000000010202 cr2: 0x000000011114b000

Logical CPU: 2
Error Code: 0x00000000
Trap Number: 6

It was caused by the App.MouseCursor = System.Cursors logic in the common called routine Main.RelativePage.AhnentafelPage.AssignGroupNames. Posted the crash report if it helps prevent further issues.