[Lazarus] UniqueInstance issue

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] UniqueInstance issue

Giuliano Colla
In an application I'm currently developing, meant to run under RHEL5, I
needed to ensure that no multiple instances were running, so I installed
the UniqueInstance component:
http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/

Under RHEL5, the only usable combination is:
Lazarus 9.26.2
FPC 2.2.2
i386-linux-gtk2

In this environment, using the TUniqueInstance component leads to this
situation: the first instance runs properly, the second terminates with
an EAccess error in Form Create, which isn't very nice.
If the Component is not enabled at design time, even the first instance
aborts the same way.
Is that something to be expected because of version too new/too old,
wrong fpc version, gtk2 vs gtk, etc.?

I'd like to understand if the matter is worth further investigation or
it's simpler to give up.

BTW UniqueInstanceRaw works perfectly, but I'd prefer a visual component
on the design form, to make life easier to maintainers, provided this
can be achieved with a reasonable effort.

Could someone point me in the right direction?

Thanks,

Giuliano


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] UniqueInstance issue

Luiz Americo Pereira Camara
On 2/4/2011 15:18, Giuliano Colla wrote:
> In an application I'm currently developing, meant to run under RHEL5, I
> needed to ensure that no multiple instances were running, so I installed
> the UniqueInstance component:
> http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ 
>

please publish a sample project and a stacktrace

Luiz

>
> Under RHEL5, the only usable combination is:
> Lazarus 9.26.2
> FPC 2.2.2
> i386-linux-gtk2
>
> In this environment, using the TUniqueInstance component leads to this
> situation: the first instance runs properly, the second terminates with
> an EAccess error in Form Create, which isn't very nice.
> If the Component is not enabled at design time, even the first instance
> aborts the same way.
> Is that something to be expected because of version too new/too old,
> wrong fpc version, gtk2 vs gtk, etc.?
>
> I'd like to understand if the matter is worth further investigation or
> it's simpler to give up.
>
> BTW UniqueInstanceRaw works perfectly, but I'd prefer a visual component
> on the design form, to make life easier to maintainers, provided this
> can be achieved with a reasonable effort.
>
> Could someone point me in the right direction?
>
> Thanks,
>
> Giuliano
>
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] UniqueInstance issue

Giuliano Colla
Luiz Americo Pereira Camara ha scritto:
> On 2/4/2011 15:18, Giuliano Colla wrote:
>> In an application I'm currently developing, meant to run under RHEL5, I
>> needed to ensure that no multiple instances were running, so I installed
>> the UniqueInstance component:
>> http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ 
>>
>
> please publish a sample project and a stacktrace
>
To avoid attachment length problems, my zipped sandbox folder is
available at:

http://www.copeca.it/colla/Sandbox.zip

where you can find project1 and project2, to help sort out the problems,
together with Trace1.txt and Trace2.txt, which are the stack traces for
project1 and project2.

Project1 is nothing but a form with only a TUniqueInstance component. If
the component is enabled at design time, it works perfectly. If the
component is not enabled at design time, see Trace1.txt. (stack trace of
the first and only instance running)

In Project2 I tried to put in one by one all the components of my real
application. Apparently the problem arises with the TMemo component,
whose presence, together with TUniqueInstance, triggers the access
violation (see Trace2.txt, which is the trace of the second instance
running). A TMemo issue or a TUiniqueInstance issue?

Kind regards,

Giuliano



--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] UniqueInstance issue

Giuliano Colla
Giuliano Colla ha scritto:

> Luiz Americo Pereira Camara ha scritto:
>> On 2/4/2011 15:18, Giuliano Colla wrote:
>>> In an application I'm currently developing, meant to run under RHEL5, I
>>> needed to ensure that no multiple instances were running, so I
>>> installed
>>> the UniqueInstance component:
>>> http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ 
>>>
>>
>> please publish a sample project and a stacktrace
>>
For sake of completeness, I tested with gtk1 in a different platform
(but with same Lazarus and fpc versions). No difference.

Giuliano


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] UniqueInstance issue

Luiz Americo Pereira Camara
In reply to this post by Giuliano Colla
On 3/4/2011 08:17, Giuliano Colla wrote:

> Luiz Americo Pereira Camara ha scritto:
>> On 2/4/2011 15:18, Giuliano Colla wrote:
>>> In an application I'm currently developing, meant to run under RHEL5, I
>>> needed to ensure that no multiple instances were running, so I
>>> installed
>>> the UniqueInstance component:
>>> http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ 
>>>
>>
>> please publish a sample project and a stacktrace
>>
> To avoid attachment length problems, my zipped sandbox folder is
> available at:
>
> http://www.copeca.it/colla/Sandbox.zip
>
> where you can find project1 and project2, to help sort out the
> problems, together with Trace1.txt and Trace2.txt, which are the stack
> traces for project1 and project2.
>
> Project1 is nothing but a form with only a TUniqueInstance component.
> If the component is enabled at design time, it works perfectly. If the
> component is not enabled at design time, see Trace1.txt. (stack trace
> of the first and only instance running)
>
> In Project2 I tried to put in one by one all the components of my real
> application. Apparently the problem arises with the TMemo component,
> whose presence, together with TUniqueInstance, triggers the access
> violation (see Trace2.txt, which is the trace of the second instance
> running). A TMemo issue or a TUiniqueInstance issue?

Thanks.

I fixed the issue on svn.

There's one issue pending that i'm working on it. See comments of
http://lazarusroad.blogspot.com/2006/12/only-one-instance.html

Luiz



--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] UniqueInstance issue

Giuliano Colla
Luiz Americo Pereira Camara ha scritto:

> On 3/4/2011 08:17, Giuliano Colla wrote:
>> Luiz Americo Pereira Camara ha scritto:
>>> On 2/4/2011 15:18, Giuliano Colla wrote:
>>>> In an application I'm currently developing, meant to run under RHEL5, I
>>>> needed to ensure that no multiple instances were running, so I
>>>> installed
>>>> the UniqueInstance component:
>>>> http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ 
>>>>
>>>
>>> please publish a sample project and a stacktrace
>>>
>> To avoid attachment length problems, my zipped sandbox folder is
>> available at:
>>
>> http://www.copeca.it/colla/Sandbox.zip
>>
>> where you can find project1 and project2, to help sort out the
>> problems, together with Trace1.txt and Trace2.txt, which are the stack
>> traces for project1 and project2.
>>
>> Project1 is nothing but a form with only a TUniqueInstance component.
>> If the component is enabled at design time, it works perfectly. If the
>> component is not enabled at design time, see Trace1.txt. (stack trace
>> of the first and only instance running)
>>
>> In Project2 I tried to put in one by one all the components of my real
>> application. Apparently the problem arises with the TMemo component,
>> whose presence, together with TUniqueInstance, triggers the access
>> violation (see Trace2.txt, which is the trace of the second instance
>> running). A TMemo issue or a TUiniqueInstance issue?
>
> Thanks.
>
> I fixed the issue on svn.
>
> There's one issue pending that i'm working on it. See comments of
> http://lazarusroad.blogspot.com/2006/12/only-one-instance.html
>

Thanks, I'll get the svn and try to backport the fix to my Lazarus version.
If I come out with a good idea, I'll submit it for the pending issue. If
not, I'll patiently wait for someone brighter than me to find the
solution...


--
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] UniqueInstance issue

Giuliano Colla
In reply to this post by Luiz Americo Pereira Camara
Luiz Americo Pereira Camara ha scritto:

> On 3/4/2011 08:17, Giuliano Colla wrote:
>> Luiz Americo Pereira Camara ha scritto:
>>> On 2/4/2011 15:18, Giuliano Colla wrote:
>>>> In an application I'm currently developing, meant to run under RHEL5, I
>>>> needed to ensure that no multiple instances were running, so I
>>>> installed
>>>> the UniqueInstance component:
>>>> http://sourceforge.net/projects/lazarus-ccr/files/Unique%20Instance/Unique%20Instance%200.2/ 
>>>>
>>>
>>> please publish a sample project and a stacktrace
>>>
>> To avoid attachment length problems, my zipped sandbox folder is
>> available at:
>>
>> http://www.copeca.it/colla/Sandbox.zip
>>
>> where you can find project1 and project2, to help sort out the
>> problems, together with Trace1.txt and Trace2.txt, which are the stack
>> traces for project1 and project2.
>>
>> Project1 is nothing but a form with only a TUniqueInstance component.
>> If the component is enabled at design time, it works perfectly. If the
>> component is not enabled at design time, see Trace1.txt. (stack trace
>> of the first and only instance running)
>>
>> In Project2 I tried to put in one by one all the components of my real
>> application. Apparently the problem arises with the TMemo component,
>> whose presence, together with TUniqueInstance, triggers the access
>> violation (see Trace2.txt, which is the trace of the second instance
>> running). A TMemo issue or a TUiniqueInstance issue?
>
> Thanks.
>
> I fixed the issue on svn.
>
> There's one issue pending that i'm working on it. See comments of
> http://lazarusroad.blogspot.com/2006/12/only-one-instance.html
>

For your information, the link to svn in the wiki page is broken. After
failing, I got the good one from blogspot. Now I'll test ASAP.


--
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] UniqueInstance issue

Luiz Americo Pereira Camara
In reply to this post by Giuliano Colla
On 11/4/2011 14:29, Giuliano Colla wrote:

> Luiz Americo Pereira Camara ha scritto:
>>
>> There's one issue pending that i'm working on it. See comments of
>> http://lazarusroad.blogspot.com/2006/12/only-one-instance.html
>>
>
> Thanks, I'll get the svn and try to backport the fix to my Lazarus
> version.
> If I come out with a good idea, I'll submit it for the pending issue. If
> not, I'll patiently wait for someone brighter than me to find the
> solution...

I already fixed the issue in svn. Now there's no know issue with it.

I'll fix the wiki after i do a release

Luiz


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus