Visual Basic 6 Development Environment - Thread killed on compiling 
Author Message
 Visual Basic 6 Development Environment - Thread killed on compiling

Hello,

I've got a very curious problem and want to know if anybody else has seen
something like that before and might have a hint.
Most times I try to compile my VB 6 project into an exe-file the whole VB
environment breaks up and it's thread is killed by windows. As result the
obj-files of the linking-step remain in the destination path of the
compilation. No error is coming up or logged.
I already installed SP 5 before. It's also curious, that the same code is
compiled successfully sometimes...

Regards
Marc



Tue, 22 Mar 2005 05:26:03 GMT  
 Visual Basic 6 Development Environment - Thread killed on compiling
Is this the issue? ...
 PRB: Compiling a VB Project Generates "Fatal Error C1083"

Q193000

----------------------------------------------------------------------------
----
The information in this article applies to:

  a.. Microsoft Visual Basic Learning Edition for Windows, versions 5.0, 6.0
  b.. Microsoft Visual Basic Professional Edition for Windows, versions 5.0,
6.0
  c.. Microsoft Visual Basic Enterprise Edition for Windows, versions 5.0,
6.0

----------------------------------------------------------------------------
----

SYMPTOMS
Attempting to compile a Visual Basic project residing on a network that only
supports 8.3 filenames may generate the following error:

  "fatal error C1083: Cannot open compiler generated file:
  '[path to file]\[projectname]1.OBJ': No such file or directory."

CAUSE
If there are N modules in a project, Visual Basic will create N + 1 object
files; one for each module and one for the project as a whole. The names are
derived from either the module name or, for the project, the EXE name. The
name used is either "<basename>.obj" or "<basename><number>.obj." A number
is added if the base names of the N + 1 files have naming conflicts (such as
test.bas and test.frm).

Therefore, even if the project name may be fewer than 8 characters, the
Visual Basic compiler/linker generates object files with the name
<projectname>1.OBJ when a conflict is detected, resulting in 9-character
filenames.

In a network environment that does not support long filenames, such as a
Novell network, the above error will occur.

RESOLUTION
Create shorter names for your form, module, and project so that if a name
conflict occurs, the appended number will not violate the short filename
requirement of your network environment.

STATUS
This behavior is by design.

--

Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.


| Hello,
|
| I've got a very curious problem and want to know if anybody else has seen
| something like that before and might have a hint.
| Most times I try to compile my VB 6 project into an exe-file the whole VB
| environment breaks up and it's thread is killed by windows. As result the
| obj-files of the linking-step remain in the destination path of the
| compilation. No error is coming up or logged.
| I already installed SP 5 before. It's also curious, that the same code is
| compiled successfully sometimes...
|
| Regards
| Marc
|
|



Tue, 22 Mar 2005 09:34:26 GMT  
 Visual Basic 6 Development Environment - Thread killed on compiling
Are you tracking whether or not it's before or after
your second cup of coffee?

Make sure All modules (forms, classes, modules, usercontrols)
have OPTION EXPLICIT at the top.
Are you doing any subclassing/message handling?(might not matter)
How large are the individual code files, VB has a limit.
How many controls per form? VB has a limit.
Use any DLL's?  Addin's? (turn them off)

You can use #if to block out suspicious pieces

#Const RunThisCode = False
'#Const RunThisCode = True

Private Sub Form_Load()
  #If RunThisCode Then
    '...your codeblock here...
    MsgBox "Message Sent"
  #End If
End Sub

Then swap comments on the #CONST to try the compile
again (with the suspect code being back in), if it blows,
you've got your whale...  happy fishing!

D.

ale=ore;happy fishing=[fill in the blank]

Quote:
> Hello,

> I've got a very curious problem and want to know if anybody else has seen
> something like that before and might have a hint.
> Most times I try to compile my VB 6 project into an exe-file the whole VB
> environment breaks up and it's thread is killed by windows. As result the
> obj-files of the linking-step remain in the destination path of the
> compilation. No error is coming up or logged.
> I already installed SP 5 before. It's also curious, that the same code is
> compiled successfully sometimes...

> Regards
> Marc



Tue, 22 Mar 2005 09:43:07 GMT  
 Visual Basic 6 Development Environment - Thread killed on compiling
I've seen a very curious problem where I had an ActiveX control created in
VB that would only compile every few tries. It used subclassing, and the
problem only manifested itself when binary or project compatibility was
turned on. There were other oddities in the project: for example, there were
two controls in the project, and one was used in a form inside that project
(that control, and the form, were not subclassed). Anyway, I found that if I
changed the binary compatibility path to an absolute path each time I did a
build, it would work. However, after every successful build, VB would do one
of two things: it would break on a random line of code, and if you stepped
through the code, it would jump all over the place and soon crash, or, if
you pressed Stop, it would complete the build. The second thing it might do
was present a VB runtime error and ask if I wanted to Debug or Stop the
project. If I chose Debug, VB would crash, but if I chose Stop, the build
would complete successfully. However, once the control was built, it worked
flawlessly. This little abberation was created using VB 6 SP 5 on Win2K SP2.

I'm convinced that it wasn't setting the path to an absolute path that fixed
it: I'm fairly certain that just changing it caused it to work because if I
set it back to a relative path after switching it to an absolute path, it
still worked properly. In fact, IIRC, VB makes that change regardless.

Jason Bouzane


Quote:
> Hello,

> I've got a very curious problem and want to know if anybody else has seen
> something like that before and might have a hint.
> Most times I try to compile my VB 6 project into an exe-file the whole VB
> environment breaks up and it's thread is killed by windows. As result the
> obj-files of the linking-step remain in the destination path of the
> compilation. No error is coming up or logged.
> I already installed SP 5 before. It's also curious, that the same code is
> compiled successfully sometimes...

> Regards
> Marc



Tue, 22 Mar 2005 12:45:34 GMT  
 Visual Basic 6 Development Environment - Thread killed on compiling
Thanx for all your information. My project isn't that large and the forms
and modules are quiet simple. Most of your hints are going into the right
direction, but they don't give a reason for the circumstance, that the
compilation works sometime and sometimes does not. I'll keep on trying...

Regards
Marc



Tue, 22 Mar 2005 14:03:17 GMT  
 Visual Basic 6 Development Environment - Thread killed on compiling

Quote:
> Most of your hints are going into the right direction, but they don't
> give a reason for the circumstance, that the compilation works sometime
> and sometimes does not. I'll keep on trying...

The reason that they don't give reasons for the compilation not working is
because I don't have any reasons. The closest thing I've ever seen to an
explanation is Randy's articly, but that doesn't apply to my situation
because the files weren't on a Novell network, although they were long file
names. However, the project I was working on wasn't large. It was a small
control that was to be used in a much larger project. The control itself had
~3000 LOC, at a guess.

Jason Bouzane



Tue, 22 Mar 2005 22:26:35 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. How to kill a Thread in Visual Basic??

2. Visual Basic as a strategic development environment

3. i have visual studio 6 enterprise, i cant compile anything in visual basic

4. kill a process from visual basic

5. Visual Basic 5: Kill process

6. Start and kill an application behind Visual Basic

7. !HELP - Listing and Killing processes and programs in Visual Basic

8. Visual Basic 5 service pack...killed my VB5 enterprise

9. Atlanta, Georgia Visual Basic 3/4 Development

10. Visual Basic.NET Development Site

11. Visual Basic development against Oracle 8.1.7

12. Visual Basic, Java, C++, SQL, GUI Development

 

 
Powered by phpBB® Forum Software