Xojo Conferences
XDCMay2019MiamiUSA

Locking - Unlocking a TabPanel Control causes a Crash in compiled apps (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: Stuffit Plugin using builtin libraries
Next thread: Re: Something (was: static con- and destructors)


static con- and destructors   -   Alfred Van Hoek
  Locking - Unlocking a TabPanel Control causes a Crash in compiled apps   -   Einhugur Software
   Re: Locking - Unlocking a TabPanel Control causes a Crash in compiled apps   -   Christian Schmitz
    Re: Locking - Unlocking a TabPanel Control causes a Crash in compiled apps   -   Einhugur Software

Locking - Unlocking a TabPanel Control causes a Crash in compiled apps
Date: 29.01.03 20:05 (Wed, 29 Jan 2003 19:05:00 +0000)
From: Einhugur Software
Hello

If a plugin Locks a TabPanel control and Unlocks it again then then a
Compiled App will crash on exit.

If we consider the following code:

me.AddControl(listBox1,true)
me.AddControl(tabPanel1,false)
me.AddControl(EditField1,false)

Then if line 2 will cause the app to crash when it exits.

All other controls other than TabPanel control are valid for this
operation.

What the Add function is doing is to let the plugin have a pointer to
the control, where its locked, then
on termination it gets Unlocked (which is what will crash on TabPanels
(in compiled apps) but not other controls)

This can be tested with the Einhugur WindowSplitter plugin.

This hapens in all versions of RB 4.5.x. Have not tried with the 5.0.

The thing is that when the WindowSplitter is calling REALUnLockObject
on the TabPanel then it seems as if the TabPanel has allready been
disposed, which seems very wrong because the WindowSplitter is allready
holding a valid reference to it.

Re: Locking - Unlocking a TabPanel Control causes a Crash in compiled apps
Date: 29.01.03 20:07 (Wed, 29 Jan 2003 20:07:14 +0100)
From: Christian Schmitz
> Hello
>
> If a plugin Locks a TabPanel control and Unlocks it again then then a
> Compiled App will crash on exit.

This should be reported as a bug.

> The thing is that when the WindowSplitter is calling REALUnLockObject
> on the TabPanel then it seems as if the TabPanel has allready been
> disposed, which seems very wrong because the WindowSplitter is allready
> holding a valid reference to it.

Maybe you should not lock the controls at all?

mfg
Christian

Re: Locking - Unlocking a TabPanel Control causes a Crash in compiled apps
Date: 29.01.03 20:16 (Wed, 29 Jan 2003 19:16:22 +0000)
From: Einhugur Software
I'm submitting it, just took a time to reset my password at the bugbase

Though I found this bugreport: rfiwbnpv

This was a memory leak (fixed back in 3.5) where TabPanels were not
destroyed at all, it seems that the fix was a brute force fix where it
always destroys regardless of reference count.

(Making it of course a huge bug)

On Wednesday, Jan 29, 2003, at 19:07 Etc/GMT, Christian Schmitz wrote:

>> Hello
>>
>> If a plugin Locks a TabPanel control and Unlocks it again then then a
>> Compiled App will crash on exit.
>
> This should be reported as a bug.
>
>> The thing is that when the WindowSplitter is calling REALUnLockObject
>> on the TabPanel then it seems as if the TabPanel has allready been
>> disposed, which seems very wrong because the WindowSplitter is
>> allready
>> holding a valid reference to it.
>
> Maybe you should not lock the controls at all?
>
> mfg
> Christian
>
> --
> Three thousand functions in one REALbasic plug-in. The MBS Plugin.
>
> <http://www.monkeybreadsoftware.de/realbasic/plugins.html>
> ---
> A searchable archive of this list is available at:
> <http://support.realsoftware.com/KBDB/search.php>
> Unsubscribe:
> <mailto:<email address removed>>
> Subscribe to the digest:
> <mailto:<email address removed>>

---
A searchable archive of this list is available at:
<http://support.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>