LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cvi compiler clang has stopped working

CVI2013 drives me crazy.

With CVI2012 I worked with my project without problems.

After installing CVI2013 I was not able to compile some files in debug configuration because Clang compiler crashed. When I enabled .obj option I was able to build exe but without debug possibility for these files.

 

Yesterday I installed CVI2013 f1Patch and now it is even worse than without patch.

I can now compile the files which caused CLang compiler crash without patch.

But now another file cannot be compiled neither in debug nor in nodebug mode - Clang always crashes when I try to compile it.

So - it is for me a step back - now I can't build the project in any configuration.

I'm tired with looking for solutions of Clang new crashes.

Also CVI2013 debugger does not work stable - I have very often crashes during debugging - without giving source code position - just unhandled exception in a thread which cannot be debugged.

This did not happen while using CVI2012 with the same source code.

In my opinion CVI2013 is still not a stable well-debugged product and should not be released.

I attached the file which cannot be now compiled ( Clang crashes)

0 Kudos
Message 1 of 5
(4,685 Views)

Hello StefanSM,

 

Thank you for sending us the project. We will investigate the issue and, probably, come up with a workaround soon. I opened a bug report (#

441043) that covers the Clang crash. We will get back at you after the investigation.

Regarding the debugger issue, could you please elaborate? A sample project and more details would be useful in determining the root cause of the instability you're experiencing.

 

Best regards,

=Nelu F. || National Instruments.

0 Kudos
Message 2 of 5
(4,673 Views)

Hello StefanSM,

 

I was able to find the root cause of the compiler crash in the project you have sent us. The issue lies in:

 

reformat_long (line 7186) on the following line:
*((unsigned long *)ptr)++ = x; (line 7198)

 

and in

 

reformat_short (line 7157) on the following line:
*((unsigned short *)ptr)++ = x; (line 7167)

 

One workaround would be to split each instruction in two, like so:

 

*((unsigned long *)ptr) = x;
*((unsigned long *)ptr)++;

 

and

 

*((unsigned short *)ptr) = x;
*((unsigned short *)ptr)++;

 

I was able to compile your code in all configurations after this change. I hope it will also work for you.

 

Best regards,

=Nelu F. || National Instruments.

0 Kudos
Message 3 of 5
(4,655 Views)

 

Hello StefanSM,

 

NeluF has already suggested a few workarounds, but I ran into another issue on line 3312 while fixing the CAR. So here are my suggestions for working around the compiler bugs.

 

3312:  strs = ZipSuffixes;
7167:  *(unsigned short *)ptr = x;
7168:  return(ptr+1);
7198:  *(unsigned long *)ptr = x;
7199:  return(ptr+1);

Sorry for the inconvenience,

 

Peter

0 Kudos
Message 4 of 5
(4,640 Views)

Thank you - Peter and NeluF

Now I am able to compile the file.

I hope the compiler will accept in future all ANSI C rules - I do not want to check thousands lines of my code to look for similiar cases.

Unfortunately it is not the end of my problems with Clang and  CVI2013 ( with f1 patch).

After building the project I encountered new crashes in debug mode ( not visible before installing f1 patch - of course with the same source code).

While it is not easy to extract the problem to simple project I need more time to prepare it for you.

0 Kudos
Message 5 of 5
(4,614 Views)