Xojo Conferences
XDCMay2019MiamiUSA

[MBS] Odd crash with DelayMBS (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] [ANN] 18.2pr2
Next thread: [MBS] [ANN] 18.2pr1


[MBS] Duplicate Classes error   -   Garth Hjelte
  [MBS] Odd crash with DelayMBS   -   Tim Jones
   Re: [MBS] Odd crash with DelayMBS   -   Christian Schmitz
    Re: [MBS] Odd crash with DelayMBS   -   Tim Jones
     Re: [MBS] Odd crash with DelayMBS   -   Christian Schmitz
      Re: [MBS] Odd crash with DelayMBS   -   Tim Jones
       Re: [MBS] Odd crash with DelayMBS   -   Christian Schmitz
        Re: [MBS] Odd crash with DelayMBS   -   Tim Jones

[MBS] Odd crash with DelayMBS
Date: 10.04.18 18:33 (Tue, 10 Apr 2018 10:33:10 -0700)
From: Tim Jones
Hi Christian,

I'm running into an odd crash with DelayMBS from the 17.5 plugins in 2016r3. Here's the crash entry:

Thread 2 Crashed:
0 libobjc.A.dylib 0xa0cd6e68 objc::DenseMapBase<objc::DenseMap<DisguisedPtr<objc_object>, unsigned long, true, objc::DenseMapInfo<DisguisedPtr<objc_object> > >, DisguisedPtr<objc_object>, unsigned long, objc::DenseMapInfo<DisguisedPtr<objc_object> >, true>::moveFromOldBuckets(std::__1::pair<DisguisedPtr<objc_object>, unsigned long>*, std::__1::pair<DisguisedPtr<objc_object>, unsigned long>*) + 38
1 libobjc.A.dylib 0xa0cc452d objc::DenseMap<DisguisedPtr<objc_object>, unsigned long, true, objc::DenseMapInfo<DisguisedPtr<objc_object> > >::grow(unsigned int) + 131
2 libobjc.A.dylib 0xa0cd6dd6 objc::DenseMapBase<objc::DenseMap<DisguisedPtr<objc_object>, unsigned long, true, objc::DenseMapInfo<DisguisedPtr<objc_object> > >, DisguisedPtr<objc_object>, unsigned long, objc::DenseMapInfo<DisguisedPtr<objc_object> >, true>::InsertIntoBucketImpl(DisguisedPtr<objc_object> const&, std::__1::pair<DisguisedPtr<objc_object>, unsigned long>*) + 52
3 libobjc.A.dylib 0xa0cd6c97 objc::DenseMapBase<objc::DenseMap<DisguisedPtr<objc_object>, unsigned long, true, objc::DenseMapInfo<DisguisedPtr<objc_object> > >, DisguisedPtr<objc_object>, unsigned long, objc::DenseMapInfo<DisguisedPtr<objc_object> >, true>::FindAndConstruct(DisguisedPtr<objc_object> const&) + 51
4 libobjc.A.dylib 0xa0cc495d objc_object::sidetable_retain() + 109
5 com.apple.Foundation 0x95aa07df -[NSRunLoop(NSRunLoop) runUntilDate:] + 65
6 MBS_Util_Main_Plugin_19475.dylib 0x0afdbe46 RBDelay2(double, int) + 374
7 MBS_Util_Main_Plugin_19475.dylib 0x0afdc08d RBDelay(double) + 29
8 com.tolisgroup.bru-pe 0x002bce80 MainGlobalsMBS.DelayMBS%%f8 + 42
9 com.tolisgroup.bru-pe 0x0038ee1f Globals.DoEvents%%i4 + 348
10 com.tolisgroup.bru-pe 0x00c596bf ccBackupProgress.ccBackupProgress.HandleQuery%%o<ccBackupProgress.ccBackupProgress>s + 112527
11 com.tolisgroup.bru-pe 0x00c1af62 ccBackupProgress.ccBackupProgress.thProcessVerifyLines_Run%%o<ccBackupProgress.ccBackupProgress>o<Thread> + 17861
12 com.tolisgroup.bru-pe 0x0058b5cc Delegate.IM_Invoke%%o<Thread> + 83
13 com.tolisgroup.bru-pe 0x00159ee5 AddHandler.Stub.0%% + 51
14 com.xojo.XojoFramework 0x012a31c5 0x10e6000 + 1823173
15 com.xojo.XojoFramework 0x0117c136 0x10e6000 + 614710
16 libsystem_pthread.dylib 0xa174f047 _pthread_body + 184
17 libsystem_pthread.dylib 0xa174ef8f _pthread_start + 243
18 libsystem_pthread.dylib 0xa174e84a thread_start + 34

Any ideas?

Re: [MBS] Odd crash with DelayMBS
Date: 10.04.18 18:35 (Tue, 10 Apr 2018 19:35:44 +0200)
From: Christian Schmitz

> Am 10.04.2018 um 19:33 schrieb Tim Jones <tolistim@me.com>:
>
> Hi Christian,
>
> I'm running into an odd crash with DelayMBS from the 17.5 plugins in 2016r3. Here's the crash entry:
> 4 libobjc.A.dylib 0xa0cc495d objc_object::sidetable_retain() + 109
> 5 com.apple.Foundation 0x95aa07df -[NSRunLoop(NSRunLoop) runUntilDate:] + 65

Somewhere deep in memory management...

Why do you do this?

Probably an autorelease pool is cleared and the objects are needed later.

Sincerely
Christian

Re: [MBS] Odd crash with DelayMBS
Date: 10.04.18 20:38 (Tue, 10 Apr 2018 12:38:18 -0700)
From: Tim Jones
On Apr 10, 2018, at 10:35 AM, Christian Schmitz <<email address removed>> wrote:
>
>> Am 10.04.2018 um 19:33 schrieb Tim Jones <tolistim@me.com>:
>>
>> Hi Christian,
>>
>> I'm running into an odd crash with DelayMBS from the 17.5 plugins in 2016r3. Here's the crash entry:
>> 4 libobjc.A.dylib 0xa0cc495d objc_object::sidetable_retain() + 109
>> 5 com.apple.Foundation 0x95aa07df -[NSRunLoop(NSRunLoop) runUntilDate:] + 65
>
> Somewhere deep in memory management...
>
> Why do you do this?

Not something I'm doing. I have situations where I need to allow hardware to stabilize in a shell, so I send the command data block, and then use DelayMBS(period / 100) in a For x = 0 to 99 loop.

> Probably an autorelease pool is cleared and the objects are needed later.

So most likely down in Apple's code?

Re: [MBS] Odd crash with DelayMBS
Date: 10.04.18 21:25 (Tue, 10 Apr 2018 22:25:04 +0200)
From: Christian Schmitz

>>
>> Why do you do this?
>
> Not something I'm doing. I have situations where I need to allow hardware to stabilize in a shell, so I send the command data block, and then use DelayMBS(period / 100) in a For x = 0 to 99 loop.

You can pass 32 as flags to not do the runloop.

>> Probably an autorelease pool is cleared and the objects are needed later.
>
> So most likely down in Apple's code?

Could be.

Sincerely
Christian

Re: [MBS] Odd crash with DelayMBS
Date: 11.04.18 16:28 (Wed, 11 Apr 2018 08:28:13 -0700)
From: Tim Jones
On Apr 10, 2018, at 1:25 PM, Christian Schmitz <<email address removed>> wrote:
>
>>>
>>> Why do you do this?
>>
>> Not something I'm doing. I have situations where I need to allow hardware to stabilize in a shell, so I send the command data block, and then use DelayMBS(period / 100) in a For x = 0 to 99 loop.
>
> You can pass 32 as flags to not do the runloop.

In working with the various mode values, what combination of modes would allow DelayMBS to provide a similar result to the App.DoEvents API? I need to be able to pause processing for known periods without interfering with the main run loop.

Tim

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Odd crash with DelayMBS
Date: 11.04.18 16:31 (Wed, 11 Apr 2018 17:31:21 +0200)
From: Christian Schmitz
> In working with the various mode values, what combination of modes would allow DelayMBS to provide a similar result to the App.DoEvents API? I need to be able to pause processing for known periods without interfering with the main run loop.
>

I don't know what app.DoEvents does. But I bet it processes event.
And that is what you can disable with flag value 32.

Sincerely
Christian

Re: [MBS] Odd crash with DelayMBS
Date: 11.04.18 17:24 (Wed, 11 Apr 2018 09:24:44 -0700)
From: Tim Jones
On Apr 11, 2018, at 8:31 AM, Christian Schmitz <<email address removed>> wrote:
>
>> In working with the various mode values, what combination of modes would allow DelayMBS to provide a similar result to the App.DoEvents API? I need to be able to pause processing for known periods without interfering with the main run loop.
>>
> I don't know what app.DoEvents does. But I bet it processes event.
> And that is what you can disable with flag value 32.

If I set the mode to 32, I still get the Busy Wait Cursor and my app stops updating. 20 sort-of gets me there, but I still get the color pizza ...