Jump to content

"Merge VIs" with identical filenames crashes LabVIEW


Recommended Posts

I recognized a crash of LV8.5 when merging different versions of a VI. Here my original report:

The new VI merge feature in LV8.5 allows to merge VIs which were changed by different developers. But it doesn't work if the files have the same name.

If you are working on a big project it could happen that different developers add new features or solve bugs for the same VI at the same time. If you want to checkin your changes - after another one already checked-in his changes - it won't work. You have to merge both new versions based on a base VI first. All these files will have the same filename because of project properties and calling conventions. If you try to merge the base VI, theirs VI, and yours VI, the merging process will stop without a warning or error. If you close LV afterwards it will crash and show following different stack frames on the next start:

c:\builds\penguin\labview\branches\Jupiter\dev\source\diagram\matxlist.cpp(1005)

: DWarn: bad col index

c:\builds\penguin\labview\branches\Jupiter\dev\source\editor\dfgraph.cpp(335)

: DWarn: trying to insert duplicate item

Due to LV cannot handle different VIs with the same name, all modified VIs have to be renamed first. That's what the help pages also say. It's a small circumstance but it won't hopefully happen as often.

Therefor the bugfix for this CAR will be to prevent the crash while closing LabVIEW after trying to merge VIs with the same filename.

Henrik

Link to comment

Source code control I'm using, namely Tortoise SVN renames conflicting version of VIs when conflict occurs. Then conflicts can be solved with LVMerge and the merged VI saved with the original name. Conflict resolved. What source code control system are you using and how does it handle the conflicts in the same item? Or are you actually not using a source code control at all?

Link to comment

Thanks for your reply Tomi. It helped me a lot. Currently I'm the only one who is working with SVN. So I never came into the situation to have conflicts. When searching the web I found your weblog and the tutorial how to use lvmerge.exe with TortoiseSVN. Now it's working perfectly. This tool really produces different files which can be handled by lvmerge. It solves my remaining questions.

But two things which handles the content for following post on your blog are left:

http://expressionflow.com/2007/08/28/using...th-tortoisesvn/

1. The command line you give to TortoiseSVN for merging .vi files contains the path to LabVIEW. That doesn't work for me. I have to delete this part. After that the merging process runs smoothly. Do you really use it in that way?

2. After the merging is completed I run "Resolve..." and got an error like: "Unknown error while accessing file D:\test\test.vi". The final status is still ok, means the issue is resolved but why I got the error? Do you see the same error message?

Henrik

Link to comment

QUOTE(hskupin @ Oct 29 2007, 03:39 AM)

1. The command line you give to TortoiseSVN for merging .vi files contains the path to LabVIEW. That doesn't work for me. I have to delete this part. After that the merging process runs smoothly. Do you really use it in that way?

2. After the merging is completed I run "Resolve..." and got an error like: "Unknown error while accessing file D:\test\test.vi". The final status is still ok, means the issue is resolved but why I got the error? Do you see the same error message?

Henrik

Henrik,

1. I found the same issues with the command line - here's what worked for me after much trial and error: (the position of the quotes seems to be important)

C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe "C:\Program Files\National Instruments\LabVIEW 8.5\LabVIEW.exe" %base %theirs %mine %merged

2. I've actually never used the "Resolve..." command. Just deleting or moving the files you don't want, and making sure the one you do want is named properly will "resolve" the conflict as far as SVN is concerned.

Jaegen

Link to comment

QUOTE(hskupin @ Oct 29 2007, 01:39 PM)

But two things which handles the content for following post on your blog are left:

http://expressionflow.com/2007/08/28/using...th-tortoisesvn/

1. The command line you give to TortoiseSVN for merging .vi files contains the path to LabVIEW. That doesn't work for me. I have to delete this part. After that the merging process runs smoothly. Do you really use it in that way?

"C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe" "C:\Program Files\National Instruments\LabVIEW 8.5\LabVIEW.exe" %base %theirs %mine %merged

The above line works for me. I guess the blog editor has changed the double quotes I used into some unicode characters that are not actually ascii versions of the double quotes.

Link to comment

ZITAT(Tomi Maila @ Oct 29 2007, 08:43 PM)

"C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe" "C:\Program Files\National Instruments\LabVIEW 8.5\LabVIEW.exe" %base %theirs %mine %merged

The above line works for me. I guess the blog editor has changed the double quotes I used into some unicode characters that are not actually ascii versions of the double quotes.

That doesn't apply for my case. I didn't copy your text into the command line field of TortoiseSVN. Instead I manually edit this line and it doesn't work. After removing the path to LabVIEW.exe all is fine. Perhaps an environment issue? Applications are located under "C:\Programme\" on my PC.

As of interest why you still need the path to LV? It works perfectly without this parameter. One thing I could imagine is that you could specify the LV version you want to use for merging. Otherwise the LabVIEW version registered for .vi files is used?

Henrik

Link to comment

QUOTE(hskupin @ Oct 30 2007, 10:57 AM)

As of interest why you still need the path to LV? It works perfectly without this parameter. One thing I could imagine is that you could specify the LV version you want to use for merging. Otherwise the LabVIEW version registered for .vi files is used?

You're right. I especially want to specify the LabVIEW version as the registered version keeps changing depending on which verision I've used previously. It's annoying.

Tomi

Link to comment

ZITAT(Tomi Maila @ Oct 30 2007, 09:24 AM)

You're right. I especially want to specify the LabVIEW version as the registered version keeps changing depending on which verision I've used previously. It's annoying.

While thinking about that issue I'm sure you could step into troubles when working on projects in parallel which are built on different versions of LabVIEW, e.g. LV8.2.1 and LV8.5. Files saved for LV8.2.1 will be converted to LV8.5 and you can fail to recognize it if you don't pay attention. Changing the second parameter for the merge command line in TortoiseSVN each time you switch the project can be painful. I know why I don't really like binary data inside my repository but now it's even freakier.

Henrik

Link to comment

Actually I've been thinking that I should write a wrapper for LVMerge that would always open the correct LabVIEW version for each project. But I've not had time. The functionality could be something like following.

  • Find out VI version of all three VIs to be merged, see this discussion for details.
  • Automatically choose the newest LabVIEW version of the three used
  • Call LVMerge with the chosen LabVIEW version as parameter

Would anyone be interested in coding such an application...? ;)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.