Recent

Author Topic: BGRABITMAP & Cocoa?  (Read 4358 times)

Josh

  • Hero Member
  • *****
  • Posts: 1271
BGRABITMAP & Cocoa?
« on: September 30, 2016, 01:25:40 pm »
Hi
Just installed laz 1.6.1 fpc 3.0.1 and cross x64 fixes n El Capitan.

If I create a new applicaton and place a tpanel on the form
it runs using carbon or coca

when I place a tcbutton on it; it runs fine in carbon. but cocoa generates the info below and does not run.

Any ideas?
bgrabtmap version 9.1
bgracontrol vers 4.1
Code: [Select]
Last login: Fri Sep 30 12:16:04 on ttys001
Ians-Mac-mini:~ josh$ /Users/josh/tmp/project1 ; exit;
TCocoaWidgetSet.RawImage_CreateBitmaps TODO Depth=32 alphaprec=8 byteorder=0 alpha=24 red=16 green=8 blue=0
TApplication.HandleException Failed to create bitmap handle
  Stack trace:
  $0000000100298ED3
  $000000010029D699
  $00000001000129A3
  $00000001001C81C6
  $00000001001BBF2F
  $00000001001BBD19
  $00000001001BFBF3
  $00000001001D2CFE
  $00000001000129A3
  $00000001001BD0AC
  $000000010002B3C6
  $00000001001A9B18
  $00000001001AA411
  $00000001002634F6
  $000000010019509C
  $00007FFF9A0EDCD2
  $00007FFF9A145CAD
2016-09-30 12:22:14.846 project1[11342:38110] -[NSAlert runModal] may not be invoked inside of transaction commit (usually this means it was invoked inside of a view's -drawRect: method.) The modal dialog has been suppressed to avoid deadlock. (
0   AppKit                              0x00007fff9a276c5b -[NSAlert runModal] + 202
1   project1                            0x00000001001901e4 COCOAINT$_$TCOCOAWIDGETSET_$__$$_PROMPTUSER$crc484A2DB2 + 892
2   project1                            0x000000010012ffbd LCLINTF_$$_PROMPTUSER$crc484A2DB2 + 93
3   project1                            0x0000000100272ab8 DIALOGS_$$_MESSAGEDLG$crc70D68288 + 200
4   project1                            0x0000000100269caf DIALOGS_$$_DEFAULTMESSAGEBOX$PCHAR$PCHAR$LONGINT$$LONGINT + 503
5   project1                            0x0000000100033e63 FORMS$_$TAPPLICATION_$__$$_MESSAGEBOX$PCHAR$PCHAR$LONGINT$$LONGINT + 139
6   project1                            0x0000000100037843 FORMS$_$TAPPLICATION_$__$$_SHOWEXCEPTION$EXCEPTION + 739
7   project1                            0x00000001000369bb FORMS$_$TAPPLICATION_$__$$_HANDLEEXCEPTION$TOBJECT + 979
8   project1                            0x00000001001a9b8f LCLMESSAGEGLUE_$$_DELIVERMESSAGE$TOBJECT$formal$$INT64 + 343
9   project1                            0x00000001001aa411 LCLMESSAGEGLUE_$$_LCLSENDPAINTMSG$TCONTROL$HDC$PPAINTSTRUCT$$INT64 + 81
10  project1                            0x00000001002634f6 COCOAWSCOMMON$_$TLCLCOMMONCALLBACK_$__$$_DRAW$NSGRAPHICSCONTEXT$CGRECT$CGRECT + 526
11  project1                            0x000000010019509c -[TCocoaCustomControl drawRect:] + 324
12  AppKit                              0x00007fff9a0edcd2 -[NSView _drawRect:clip:] + 3626
13  AppKit                              0x00007fff9a145cad -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1873
14  AppKit                              0x00007fff9a14608a -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2862
15  AppKit                              0x00007fff9a0eb3fb -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 838
16  AppKit                              0x00007fff9a0eabe0 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334
17  AppKit                              0x00007fff9a0e8feb -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2449
18  AppKit                              0x00007fff9a0e43f5 -[NSView displayIfNeeded] + 1950
19  AppKit                              0x00007fff9a0e3c3c -[NSWindow displayIfNeeded] + 232
20  AppKit                              0x00007fff9a76841b ___NSWindowGetDisplayCycleObserver_block_invoke6365 + 476
21  AppKit                              0x00007fff9a0e35d6 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 941
22  QuartzCore                          0x00007fff8a94df71 _ZN2CA11Transaction19run_commit_handlersE18CATransactionPhase + 85
23  QuartzCore                          0x00007fff8a94d42c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 160
24  QuartzCore                          0x00007fff8a94d0ec _ZN2CA11Transaction6commitEv + 508
25  QuartzCore                          0x00007fff8a958977 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 71
26  CoreFoundation                      0x00007fff90057067 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
27  CoreFoundation                      0x00007fff90056fd7 __CFRunLoopDoObservers + 391
28  CoreFoundation                      0x00007fff90035ef8 CFRunLoopRunSpecific + 328
29  HIToolbox                           0x00007fff9bfca935 RunCurrentEventLoopInMode + 235
30  HIToolbox                           0x00007fff9bfca677 ReceiveNextEventCommon + 184
31  HIToolbox                           0x00007fff9bfca5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
32  AppKit                              0x00007fff99f8bdf6 _DPSNextEvent + 1067
33  AppKit                              0x00007fff99f8b226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
34  project1                            0x0000000100187c64 COCOAINT$_$TCOCOAWIDGETSET_$__$$_APPPROCESSMESSAGES + 108
35  project1                            0x0000000100036a5d FORMS$_$TAPPLICATION_$__$$_HANDLEMESSAGE + 45
36  project1                            0x0000000100036f7c FORMS$_$TAPPLICATION_$__$$_RUNLOOP + 76
37  project1                            0x0000000100187bf2 COCOAINT$_$TCOCOAWIDGETSET_$__$$_APPRUN$TAPPLICATIONMAINLOOP + 58
38  project1                            0x0000000100036f28 FORMS$_$TAPPLICATION_$__$$_RUN + 96
39  project1                            0x0000000100001db4 PASCALMAIN + 92
40  project1                            0x0000000100021799 FPC_SYSTEMMAIN + 41
)
TApplication.HandleException: there was another exception during showing the first exception
  Stack trace:
  $0000000100272AC2
  $0000000100269CAF
  $0000000100033E63
  $0000000100037843
  $00000001000369BB
  $00000001001A9B8F
  $00000001001AA411
  $00000001002634F6
  $000000010019509C
  $00007FFF9A0EDCD2
  $00007FFF9A145CAD
  $00007FFF9A14608A
  $00007FFF9A0EB3FB
  $00007FFF9A0EABE0
  $00007FFF9A0E8FEB
  $00007FFF9A0E43F5
  $00007FFF9A0E3C3C
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4193
    • Personal webpage
Re: BGRABITMAP & Cocoa?
« Reply #1 on: September 30, 2016, 02:16:19 pm »
Does it help to change the RGB order using directive -dBGRABITMAP_BGRAPIXEL or -dBGRABITMAP_RGBAPIXEL ?
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: BGRABITMAP & Cocoa?
« Reply #2 on: September 30, 2016, 06:50:56 pm »
Hi

I have tried placing this in project options defines; but still not workng.

A  Placing BGRABITMAP_BGRAPIXEL etc in the wrong place ?

Josh
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: BGRABITMAP & Cocoa?
« Reply #3 on: October 01, 2016, 02:34:18 pm »
Hi

I have just done a complete re-install of osx and laz and fpc with cross x64 using trunk; so now have laz 1.7 and fpc 3.1.1.

If I create a form, place some lcl and bgracontols on form, I can compile using carbon and all is well.
Switching to cocoa and x64; then none of the bgra stuff works, screen shots to show.

Hope it helps

1st Form
2nd Cocoa i386x64
3rd Carbon i386
« Last Edit: October 01, 2016, 02:37:36 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4193
    • Personal webpage
Re: BGRABITMAP & Cocoa?
« Reply #4 on: October 01, 2016, 05:51:28 pm »
Given the error message you had in the first place, I suspect some cases are not implemented in CreateBitmap
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: BGRABITMAP & Cocoa?
« Reply #5 on: October 01, 2016, 06:15:57 pm »
H Circular,

The original was 1.6 and fpc 3.0.1 ( both using the fixes ).

SO I thought ok, maybe a screwed up mac, so total clean install of osx; installed ggdb codesigned etc; installed laz and fc using trunk to get latest (not ideal)

So reading your email I created a timage and placed on form, ok with carbon
Displayed nothing with COCOA

So looks like cocoa is totally broken on trunk and 1.6 fixes

Is there a COCOA dev section somewhere?

Thanks for your help btw.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

circular

  • Hero Member
  • *****
  • Posts: 4193
    • Personal webpage
Re: BGRABITMAP & Cocoa?
« Reply #6 on: October 01, 2016, 08:46:36 pm »
I did not find the error you're talking about on the bugtracker. So I would suggest to report the bug using the link "Report Issue".

http://bugs.freepascal.org/bug_report_page.php
Conscience is the debugger of the mind

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: BGRABITMAP & Cocoa?
« Reply #7 on: October 01, 2016, 10:13:25 pm »
Hi Circular,

Thanks I have posted on bugtracker, hopefully I got everything ok for someone to duplicate.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

 

TinyPortal © 2005-2018