VS2005: "Make single instance application"

G

Guest

1. Create a new Windows Application project.
2. Open the project properties and check "Make single instance application".
3. Build.
4. Go to the release folder and run the application.
5. Try to open a second instance of the application.

This will cause an unhandled exception and the "Send Error Report" box shows
up. Does this happen to anyone else, or is it just me?

Debug info: "Unhandled exception at 0x00e149fd in WindowsApplication1.exe:
0xC0000005: Access violation writing location 0x00000000."
 
K

Ken Tucker [MVP]

Hi,

When I open 2 instances of the application at the same time I get
that error.

Ken
 
S

Steven Cheng[MSFT]

Hi MrSpock,

Regarding on the VB.NET single instance winform application problem, I've
just performed some tests on my local side(win2k3server .net 2.0 vs2005),
seems I can not reproduce the
===========
Debug info: "Unhandled exception at 0x00e149fd in WindowsApplication1.exe:
0xC0000005: Access violation writing location 0x00000000."
===========

error by try launching the winform app(exe) multiple times. I'm not sure
whether there're any other particular steps when you reproduce this
behavor? My test winform is just a simple application with a empty form in
it. In addition, have you tried this on some other dev box to see whether
you also encounter this error?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: VS2005: "Make single instance application"
| thread-index: AcXzXIlUPQPXO1suQ3ObhHd9Fkc68w==
| X-WBNR-Posting-Host: 217.209.86.200
| From: "=?Utf-8?B?TXJTcG9jaw==?=" <[email protected]>
| Subject: VS2005: "Make single instance application"
| Date: Sun, 27 Nov 2005 06:12:01 -0800
| Lines: 11
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb:305923
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| 1. Create a new Windows Application project.
| 2. Open the project properties and check "Make single instance
application".
| 3. Build.
| 4. Go to the release folder and run the application.
| 5. Try to open a second instance of the application.
|
| This will cause an unhandled exception and the "Send Error Report" box
shows
| up. Does this happen to anyone else, or is it just me?
|
| Debug info: "Unhandled exception at 0x00e149fd in
WindowsApplication1.exe:
| 0xC0000005: Access violation writing location 0x00000000."
|
 
G

Guest

Thanks for your answer, Mr Cheng.

My first test was performed on WinXP SP2 with .NET 2.0.

Today I did a clean install of VS2005 on another dev box (WinXP SP2, .NET
2.0). I got the same error this time!

Later I copied the same executable to another box running Win2k3. No errors
this time!

I suppose the "single instance" option isn't fully functional on WinXP, right?

Best regards,

MrSpock
 
S

Steven Cheng[MSFT]

Thanks for your response MrSpock,

I don't think this will be a existing or by design behavior for XP
platform.. I'll try perform some further test in my local envionrment and
let you know my result soon.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: VS2005: "Make single instance application"
| thread-index: AcX1G0v+I+7Qc0qaQ6mAB5PuTwh/+Q==
| X-WBNR-Posting-Host: 217.209.86.200
| From: "=?Utf-8?B?TXJTcG9jaw==?=" <[email protected]>
| References: <[email protected]>
<eknofD#[email protected]>
| Subject: RE: VS2005: "Make single instance application"
| Date: Tue, 29 Nov 2005 11:30:03 -0800
| Lines: 39
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb:306337
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Thanks for your answer, Mr Cheng.
|
| My first test was performed on WinXP SP2 with .NET 2.0.
|
| Today I did a clean install of VS2005 on another dev box (WinXP SP2, .NET
| 2.0). I got the same error this time!
|
| Later I copied the same executable to another box running Win2k3. No
errors
| this time!
|
| I suppose the "single instance" option isn't fully functional on WinXP,
right?
|
| Best regards,
|
| MrSpock
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi MrSpock,
| >
| > Regarding on the VB.NET single instance winform application problem,
I've
| > just performed some tests on my local side(win2k3server .net 2.0
vs2005),
| > seems I can not reproduce the
| > ===========
| > Debug info: "Unhandled exception at 0x00e149fd in
WindowsApplication1.exe:
| > 0xC0000005: Access violation writing location 0x00000000."
| > ===========
| >
| > error by try launching the winform app(exe) multiple times. I'm not
sure
| > whether there're any other particular steps when you reproduce this
| > behavor? My test winform is just a simple application with a empty
form in
| > it. In addition, have you tried this on some other dev box to see
whether
| > you also encounter this error?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
|
 
S

Steven Cheng[MSFT]

Hi MrSpock,

After some further tests on my local XP environment, I think this should be
a envionement specific problem since a typical VB.NET winform app with
single instance flag turned on can run correctly on XP box.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 194614964
| References: <[email protected]>
<eknofD#[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Wed, 30 Nov 2005 09:50:18 GMT
| Subject: RE: VS2005: "Make single instance application"
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vb
| Lines: 72
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb:306440
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Thanks for your response MrSpock,
|
| I don't think this will be a existing or by design behavior for XP
| platform.. I'll try perform some further test in my local envionrment
and
| let you know my result soon.
|
| Regards,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
| --------------------
| | Thread-Topic: VS2005: "Make single instance application"
| | thread-index: AcX1G0v+I+7Qc0qaQ6mAB5PuTwh/+Q==
| | X-WBNR-Posting-Host: 217.209.86.200
| | From: "=?Utf-8?B?TXJTcG9jaw==?=" <[email protected]>
| | References: <[email protected]>
| <eknofD#[email protected]>
| | Subject: RE: VS2005: "Make single instance application"
| | Date: Tue, 29 Nov 2005 11:30:03 -0800
| | Lines: 39
| | Message-ID: <[email protected]>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.public.dotnet.languages.vb
| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb:306337
| | X-Tomcat-NG: microsoft.public.dotnet.languages.vb
| |
| | Thanks for your answer, Mr Cheng.
| |
| | My first test was performed on WinXP SP2 with .NET 2.0.
| |
| | Today I did a clean install of VS2005 on another dev box (WinXP SP2,
..NET
| | 2.0). I got the same error this time!
| |
| | Later I copied the same executable to another box running Win2k3. No
| errors
| | this time!
| |
| | I suppose the "single instance" option isn't fully functional on WinXP,
| right?
| |
| | Best regards,
| |
| | MrSpock
| |
| |
| | "Steven Cheng[MSFT]" wrote:
| |
| | > Hi MrSpock,
| | >
| | > Regarding on the VB.NET single instance winform application problem,
| I've
| | > just performed some tests on my local side(win2k3server .net 2.0
| vs2005),
| | > seems I can not reproduce the
| | > ===========
| | > Debug info: "Unhandled exception at 0x00e149fd in
| WindowsApplication1.exe:
| | > 0xC0000005: Access violation writing location 0x00000000."
| | > ===========
| | >
| | > error by try launching the winform app(exe) multiple times. I'm not
| sure
| | > whether there're any other particular steps when you reproduce this
| | > behavor? My test winform is just a simple application with a empty
| form in
| | > it. In addition, have you tried this on some other dev box to see
| whether
| | > you also encounter this error?
| | >
| | > Thanks,
| | >
| | > Steven Cheng
| | > Microsoft Online Support
| |
|
|
 
G

Guest

Mr Cheng,

Thanks for your efforts! I will have to use some other solution for the
single instance feature in my applications, but it would be nice to know the
cause to this error though.

Best regards,

MrSpock
 
S

Steven Cheng[MSFT]

Thanks for your followup MrSpock,

So far I haven't any other ideas on this. If possible I'd suggest you
rebuild a clean XP environment for testing... Most likely such problem is
a environment specific issue...

regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| Thread-Topic: VS2005: "Make single instance application"
| thread-index: AcX2TK1NtbqTCUhnTquYEPksmEifVA==
| X-WBNR-Posting-Host: 62.181.97.149
| From: "=?Utf-8?B?TXJTcG9jaw==?=" <[email protected]>
| References: <[email protected]>
<eknofD#[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
| Subject: RE: VS2005: "Make single instance application"
| Date: Wed, 30 Nov 2005 23:56:03 -0800
| Lines: 86
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb:306689
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Mr Cheng,
|
| Thanks for your efforts! I will have to use some other solution for the
| single instance feature in my applications, but it would be nice to know
the
| cause to this error though.
|
| Best regards,
|
| MrSpock
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi MrSpock,
| >
| > After some further tests on my local XP environment, I think this
should be
| > a envionement specific problem since a typical VB.NET winform app with
| > single instance flag turned on can run correctly on XP box.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > |
| > | Thanks for your response MrSpock,
| > |
| > | I don't think this will be a existing or by design behavior for XP
| > | platform.. I'll try perform some further test in my local
envionrment
| > and
| > | let you know my result soon.
| > |
| > | Regards,
| > |
| > | Steven Cheng
| > | Microsoft Online Support
| > |
| > | |
| > | | Thanks for your answer, Mr Cheng.
| > | |
| > | | My first test was performed on WinXP SP2 with .NET 2.0.
| > | |
| > | | Today I did a clean install of VS2005 on another dev box (WinXP
SP2,
| > .NET
| > | | 2.0). I got the same error this time!
| > | |
| > | | Later I copied the same executable to another box running Win2k3.
No
| > | errors
| > | | this time!
| > | |
| > | | I suppose the "single instance" option isn't fully functional on
WinXP,
| > | right?
| > | |
| > | | Best regards,
| > | |
| > | | MrSpock
| > | |
| > | |
| > | | "Steven Cheng[MSFT]" wrote:
| > | |
| > | | > Hi MrSpock,
| > | | >
| > | | > Regarding on the VB.NET single instance winform application
problem,
| > | I've
| > | | > just performed some tests on my local side(win2k3server .net 2.0
| > | vs2005),
| > | | > seems I can not reproduce the
| > | | > ===========
| > | | > Debug info: "Unhandled exception at 0x00e149fd in
| > | WindowsApplication1.exe:
| > | | > 0xC0000005: Access violation writing location 0x00000000."
| > | | > ===========
| > | | >
| > | | > error by try launching the winform app(exe) multiple times. I'm
not
| > | sure
| > | | > whether there're any other particular steps when you reproduce
this
| > | | > behavor? My test winform is just a simple application with a
empty
| > | form in
| > | | > it. In addition, have you tried this on some other dev box to
see
| > | whether
| > | | > you also encounter this error?
| > | | >
| > | | > Thanks,
| > | | >
| > | | > Steven Cheng
| > | | > Microsoft Online Support
|
 
S

Smiley

Hi,
I'm encountering a similar problem. I have a VB6 app that launches a
single instance .NET exe [using the check box provided for this]. The
VB6 app attempts to launch the .net exe or if it finds it's already
launched [by checking the window title], it just brings it to the
foreground.

Doing this repetedly causes the .net app to raise an error, with the
'send bug report' dialog. Checking the event log on one occasion, gave
the details below. Any ideas what the problem is and what I can do.

This is on Win XP sp2 and .NET framework 2.0.

EventType clr20r3, P1 mydotnetapp.exe, P2 1.0.0.0, P3 43218038, P4
mscorlib, P5 2.0.0.0, P6 425749d8, P7 40a8, P8 27, P9
system.badimageformatexception, P10 NIL.


Regards,
Timothy.

Thanks for your followup MrSpock,

So far I haven't any other ideas on this. If possible I'd suggest you
rebuild a clean XP environment for testing... Most likely such problem is
a environment specific issue...

regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| Thread-Topic: VS2005: "Make single instance application"
| thread-index: AcX2TK1NtbqTCUhnTquYEPksmEifVA==
| X-WBNR-Posting-Host: 62.181.97.149
| From: "=?Utf-8?B?TXJTcG9jaw==?=" <[email protected]>
| References: <[email protected]>
<eknofD#[email protected]>
<[email protected]>
<#[email protected]>
<[email protected]>
| Subject: RE: VS2005: "Make single instance application"
| Date: Wed, 30 Nov 2005 23:56:03 -0800
| Lines: 86
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb:306689
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Mr Cheng,
|
| Thanks for your efforts! I will have to use some other solution for the
| single instance feature in my applications, but it would be nice to know
the
| cause to this error though.
|
| Best regards,
|
| MrSpock
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi MrSpock,
| >
| > After some further tests on my local XP environment, I think this
should be
| > a envionement specific problem since a typical VB.NET winform app with
| > single instance flag turned on can run correctly on XP box.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > |
| > | Thanks for your response MrSpock,
| > |
| > | I don't think this will be a existing or by design behavior for XP
| > | platform.. I'll try perform some further test in my local
envionrment
| > and
| > | let you know my result soon.
| > |
| > | Regards,
| > |
| > | Steven Cheng
| > | Microsoft Online Support
| > |
| > | |
| > | | Thanks for your answer, Mr Cheng.
| > | |
| > | | My first test was performed on WinXP SP2 with .NET 2.0.
| > | |
| > | | Today I did a clean install of VS2005 on another dev box (WinXP
SP2,
| > .NET
| > | | 2.0). I got the same error this time!
| > | |
| > | | Later I copied the same executable to another box running Win2k3.
No
| > | errors
| > | | this time!
| > | |
| > | | I suppose the "single instance" option isn't fully functional on
WinXP,
| > | right?
| > | |
| > | | Best regards,
| > | |
| > | | MrSpock
| > | |
| > | |
| > | | "Steven Cheng[MSFT]" wrote:
| > | |
| > | | > Hi MrSpock,
| > | | >
| > | | > Regarding on the VB.NET single instance winform application
problem,
| > | I've
| > | | > just performed some tests on my local side(win2k3server .net 2.0
| > | vs2005),
| > | | > seems I can not reproduce the
| > | | > ===========
| > | | > Debug info: "Unhandled exception at 0x00e149fd in
| > | WindowsApplication1.exe:
| > | | > 0xC0000005: Access violation writing location 0x00000000."
| > | | > ===========
| > | | >
| > | | > error by try launching the winform app(exe) multiple times. I'm
not
| > | sure
| > | | > whether there're any other particular steps when you reproduce
this
| > | | > behavor? My test winform is just a simple application with a
empty
| > | form in
| > | | > it. In addition, have you tried this on some other dev box to
see
| > | whether
| > | | > you also encounter this error?
| > | | >
| > | | > Thanks,
| > | | >
| > | | > Steven Cheng
| > | | > Microsoft Online Support
|
 
S

Smiley

I have just tried this again and checking the event log this time, I
have several entries like this one. The .net app is doing data access
using the DAAB and drawing some graphics.

EventType clr20r3, P1 mydotnetapp.exe, P2 2.0.2162.30026, P3 43905029,
P4 microsoft.visualbasic, P5 8.0.0.0, P6 4333d6d8, P7 5e, P8 1e1, P9
34ssps20bdj3nj0wmit5kamzhvglfzcc, P10 NIL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top