On 19-feb-07, at 21:11, [EMAIL PROTECTED] wrote:

> On Feb 19, 2007, at 17:59 UTC, Bart Pietercil wrote:
>
>> why would this code crash ?
>
> What do you mean by "crash"?  What do you actually see?  Also, what
> version of RB are you using, and on which platform?


Sorry

Mac OSX Macbook Pro RB2007/1

>
>> Sub Action(item As ToolItem)
>>    if CardIsDirty Then
>>      if SaveCard Then
>>
>>      Else
>>        Return
>>      end if
>>    end if
>
> This part shouldn't crash, but it's an awkward construction that took
> me a while to figure out.  Try this simpler version:
>
>   if CardIsDirty then
>     if not SaveCard then return
>   end if


Absolutely, had just shortened the relevant part

>
>>    Select Case item.Name
>>    case  "tbb_Clusters"
>>      App.MainBarHandler(Self,ClusterWindow)
>>      Self.Close
>
> Calling Self.Close in the Action event of a toolbar item just might be
> a way to make an app crash on some platforms.  It shouldn't, of  
> course,
> but similar bugs have been found in the framework before -- it takes a
> lot of bullet-proofing to keep users from destroying things out from
> under you (from the framework's point of view).
>
> So, see if you can reproduce this with a toolbar item whose only code
> is:
>
>   Self.Close
>
> If you can, then you have a nice simple bug to report.  The work- 
> around
> in that case is probably to activate a Timer with a very short period
> (e.g. 1) that calls Self.Close, since I'm sure any such problems in
> Timer events was fixed long ago.


Hmm, it is better however after 20 to 25 clicks on the different  
toolitems I get the
"Application unexpectedly quit"


This is part of the crash report:
(hoping this would mean more to you than it does to me )

Date/Time:      2007-02-19 21:30:21.246 +0100
OS Version:     10.4.8 (Build 8L2127)
Report Version: 4

Command: Profile Builder.debug
Path:    /Users/bartjan/Documents/ESF/develop/ProfileBuilder/Profile  
Builder.debug.app/Contents/MacOS/Profile Builder.debug
Parent:  WindowServer [56]

Version:  (0.5.0a0)

PID:    4050
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x0000000e

Thread 0 Crashed:
0   com.apple.HIToolbox         0x92dc9be2 HIObject::GetEventTarget() + 16
1   com.apple.HIToolbox         0x9306edf6  
HIToolbar::CopySelectableItemIdentifiers() + 248
2   com.apple.HIToolbox         0x93071c69  
_HIToolbarCopySelectableIdentifiers + 31
3   com.apple.HIToolbox         0x92e938ef HIToolbarItemView::ControlHitSelf 
(OpaqueControlRef*, short, unsigned long) + 103
4   com.apple.HIToolbox         0x92df2160 HIView::EventHandler 
(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 9142
5   com.apple.HIToolbox         0x92dcc7eb DispatchEventToHandlers 
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093
6   com.apple.HIToolbox         0x92dcbe90 SendEventToEventTargetInternal 
(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304
7   com.apple.HIToolbox         0x92dd30f0 SendEventToEventTarget + 56
8   com.apple.HIToolbox         0x92e86059 SendControlHit(HIView*, short,  
unsigned long) + 187
9   com.apple.HIToolbox         0x92e85f46 HIView::NotifyControlHit(short,  
unsigned long) + 34
10  com.apple.HIToolbox         0x92e8f707 HIView::ClickInternal(CGPoint  
const&, unsigned long, void (*)(OpaqueControlRef*, short),  
OpaqueEventRef*, bool) + 269
11  com.apple.HIToolbox         0x92e6abb3 HIView::ClickSelf 
(OpaqueEventRef*) + 371
12  com.apple.HIToolbox         0x92df06fc HIView::EventHandler 
(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 2386
13  com.apple.HIToolbox         0x92dcc7eb DispatchEventToHandlers 
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093
14  com.apple.HIToolbox         0x92dcbe90 SendEventToEventTargetInternal 
(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304
15  com.apple.HIToolbox         0x92dd30f0 SendEventToEventTarget + 56
16  com.apple.HIToolbox         0x92e6a8e7 HIView::Click(OpaqueEventRef*) + 329
17  com.apple.HIToolbox         0x92e6a723 HandleClickAsHIView + 145
18  com.apple.HIToolbox         0x92e02179 HandleWindowEvent + 2311
19  com.apple.HIToolbox         0x92e1236d StandardWindowEventHandler + 95
20  com.apple.HIToolbox         0x92dcc7eb DispatchEventToHandlers 
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093
21  com.apple.HIToolbox         0x92dcbe90 SendEventToEventTargetInternal 
(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304
22  com.apple.HIToolbox         0x92dd30f0 SendEventToEventTarget + 56
23  com.apple.HIToolbox         0x92ee4598 SendEventFromMouseDown + 166
24  com.apple.HIToolbox         0x92e6a0c4 HandleWindowClick + 534
25  com.apple.HIToolbox         0x92e69b5f HandleMouseEvent + 872
26  com.apple.HIToolbox         0x92e12364 StandardWindowEventHandler + 86
27  com.apple.HIToolbox         0x92dcc7eb DispatchEventToHandlers 
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093
28  com.apple.HIToolbox         0x92dcbe90 SendEventToEventTargetInternal 
(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304
29  com.apple.HIToolbox         0x92dd30f0 SendEventToEventTarget + 56
30  com.apple.HIToolbox         0x92dd3b12 ToolboxEventDispatcherHandler 
(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 2586
31  com.apple.HIToolbox         0x92dccba2 DispatchEventToHandlers 
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2044
32  com.apple.HIToolbox         0x92dcbe90 SendEventToEventTargetInternal 
(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304
33  com.apple.HIToolbox         0x92dd30f0 SendEventToEventTarget + 56
34  rbframework.dylib           0x003c7c59 SetFocusPane(SubPane*) + 493
35  rbframework.dylib           0x003c7f3d EventPump(unsigned char) + 435
36  rbframework.dylib           0x003c88bb UpdateMouseCursor() + 803
37  rbframework.dylib           0x003c830d CallFunctionWithExceptionHandling 
(void (*)()) + 9
38  rbframework.dylib           0x003c8559 mainloop() + 115
39  rbframework.dylib           0x003775f4 RuntimeRun + 40
40                              0x000cc50b REALbasic._RuntimeRun + 25
41                              0x000b7b4c _Main + 153
42                              0x00001484 % main + 36
43                              0x001638fe _start + 116
44                              0x00163854 start + 43

Thread 0 crashed with X86 Thread State (32-bit):
   eax: 0x00000006    ebx: 0x92dc9bdf ecx: 0xa080fd04 edx: 0xffffffff
   edi: 0x14dea370    esi: 0x00000006 ebp: 0xbfffe498 esp: 0xbfffe470
    ss: 0x0000001f    efl: 0x00010282 eip: 0x92dc9be2  cs: 0x00000017



Thanks for looking to this.

Bart Pietercil


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to