Page 1 of 1

CreateToolBar Bug on macOS

Posted: Fri Nov 17, 2017 4:01 pm
by mk-soft
I don't know is a PB-Bug or a Bug on my macOS High Sierra

Code: Select all

If OpenWindow(0, 0, 0, 150, 25, "ToolBar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    CreateImage(0,16,16)
    StartDrawing(ImageOutput(0))
      Box(0,0,16,16,RGB(255,255,255))
      Box(4,4,8,8,RGB(255,0,0))
    StopDrawing()
    CreateImage(1,16,16)
    StartDrawing(ImageOutput(1))
      Box(0,0,16,16,RGB(255,0,0))
      Box(4,4,8,8,RGB(255,255,255))
    StopDrawing()
    If CreateToolBar(0, WindowID(0))
      ToolBarImageButton(0,ImageID(0))
      ToolBarImageButton(1,ImageID(1))
    EndIf
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow 
  EndIf
PB v5.45, v5.46, v5.60, v5.61
Xcode v9.0 and v9.1

If this is a bug in Purebasic, then we have a problem with quality assurance.
Had little to do with writing new applications with Purebasic lately.
Should we perhaps write codes to test all basic functions automatically, with the creation of a protocol

Re: CreateToolBar Bug on macOS

Posted: Fri Nov 17, 2017 11:32 pm
by USCode
Seems to compile and run OK on my Mini running High Sierra 10.13.1. What's the bug?

Re: CreateToolBar Bug on macOS

Posted: Fri Nov 17, 2017 11:46 pm
by mk-soft
[23:45:02] Warte auf den Start des Executable...
[23:45:02] Executable-Typ: MacOSX - x64 (64bit, Unicode)
[23:45:02] Executable gestartet.
[23:45:03] [ERROR] Zeile: 12
[23:45:03] [ERROR] Customizable toolbars require unique toolbarIdentifiers. Please use initWithIdentifier: with a unique identifier.
Without Debugger
System Integrity Protection: enabled

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

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Customizable toolbars require unique toolbarIdentifiers. Please use initWithIdentifier: with a unique identifier.'
abort() called
terminating with uncaught exception of type NSException

Re: CreateToolBar Bug on macOS

Posted: Sat Nov 18, 2017 12:55 am
by mk-soft
My Xcode is crashed... Why?

With a copy of Xcode 8 is working...

Now wait for Update to Xcode 9. Very, Very slow internet by me

I hope is not a problem with AFS

Re: CreateToolBar Bug on macOS

Posted: Sun Nov 19, 2017 11:18 am
by mk-soft