Command failed due to signal: Illegal instruction: 4

I'm trying to compile some code that interacts with FFmpeg and for the
most part have been making progress. Until I added some AVFilter code.
Now it is failing to compile with the error: "Command failed due to
signal: Illegal instruction: 4".

The log Xcode provided of the build error is attached. All of the source
code that was used to trigger the error can be found here
(https://git.lovelett.me/castable/live\) on a branch called "swift".

Should I file a bug for this or am I doing something wrong?

swift.log (14.1 KB)

I'm trying to compile some code that interacts with FFmpeg and for the
most part have been making progress. Until I added some AVFilter code.
Now it is failing to compile with the error: "Command failed due to
signal: Illegal instruction: 4".

The log Xcode provided of the build error is attached. All of the source
code that was used to trigger the error can be found here
(https://git.lovelett.me/castable/live\) on a branch called "swift".

Should I file a bug for this or am I doing something wrong?

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users
Email had 1 attachment:
+ swift.log
  19k (application/octet-stream)

ยทยทยท

On Fri, Feb 26, 2016, at 10:17 PM, Ryan Lovelett via swift-users wrote:

(Sorry for the blank email spam)

I'm trying to compile some code that interacts with FFmpeg and for the
most part have been making progress. Until I added some AVFilter code.
Now it is failing to compile with the error: "Command failed due to
signal: Illegal instruction: 4".

The log Xcode provided of the build error is attached. All of the source
code that was used to trigger the error can be found here
(https://git.lovelett.me/castable/live\) on a branch called "swift".

I've gotten an even more succinct example of this failure.

class Test {
    let thing: UnsafeMutablePointer<AVFilterGraph>

    init() {
        self.thing = avfilter_graph_alloc()
    }
}

I'm trying to debug this. I have downloaded the debugging symbols is
that what I would use to determine a root cause for this? If so could
anyone give me a short introduction into how I'd use them?

ยทยทยท

On Fri, Feb 26, 2016, at 10:17 PM, Ryan Lovelett via swift-users wrote:

Should I file a bug for this or am I doing something wrong?

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users
Email had 1 attachment:
+ swift.log
  19k (application/octet-stream)

I'm trying to compile some code that interacts with FFmpeg and for the
most part have been making progress. Until I added some AVFilter code.
Now it is failing to compile with the error: "Command failed due to
signal: Illegal instruction: 4".

The compiler crashing is always a bug. Please file a bug if you have time.
Thanks!

-Joe

ยทยทยท

Ryan Lovelett via swift-users <swift-users@swift.org> wrote:

The log Xcode provided of the build error is attached. All of the source
code that was used to trigger the error can be found here
(https://git.lovelett.me/castable/live\) on a branch called "swift".

Should I file a bug for this or am I doing something wrong?

> I'm trying to compile some code that interacts with FFmpeg and for the
> most part have been making progress. Until I added some AVFilter code.
> Now it is failing to compile with the error: "Command failed due to
> signal: Illegal instruction: 4".
>

The compiler crashing is always a bug. Please file a bug if you have
time.
Thanks!

-Joe

Joe, thank you confirming my hunch. I've gone ahead and done that.

As you might imagine this is now a blocking bug for my project. I'd
really like to fix this as soon as humanly possible.

I also realize that, while a priority for me, it is may not be for
anyone else. With that in mind, my assumption is that if its going to be
fixed "soon" I probably need to fix it myself. Unfortunately, I have
little experience with this and would not know where to begin. Is there
anything I can read that might explain how to begin debugging the
compiler?

ยทยทยท

On Sun, Feb 28, 2016, at 01:19 PM, Joe Groff via swift-users wrote:

Ryan Lovelett via swift-users <swift-users@swift.org> wrote:

> The log Xcode provided of the build error is attached. All of the source
> code that was used to trigger the error can be found here
> (https://git.lovelett.me/castable/live\) on a branch called "swift".
>
> Should I file a bug for this or am I doing something wrong?
>
>
>
>

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

1 Like

You can debug the swift front-end in Xcode.
I haven't found the correct solution to generate the xcode Debug project
that builds and runs straight away, but managed to do it with little work
arounds to have the swift code debug running in Xcode. It mightn't be the
correct solution, but I got what I am looking for i.e debugging swift
front-end in xcode.

ยทยทยท

On Mon, Feb 29, 2016 at 2:59 AM, Ryan Lovelett via swift-users < swift-users@swift.org> wrote:

On Sun, Feb 28, 2016, at 01:19 PM, Joe Groff via swift-users wrote:
> Ryan Lovelett via swift-users <swift-users@swift.org> wrote:
> > I'm trying to compile some code that interacts with FFmpeg and for the
> > most part have been making progress. Until I added some AVFilter code.
> > Now it is failing to compile with the error: "Command failed due to
> > signal: Illegal instruction: 4".
> >
>
> The compiler crashing is always a bug. Please file a bug if you have
> time.
> Thanks!
>
> -Joe

Joe, thank you confirming my hunch. I've gone ahead and done that.
[SR-846] GenStruct.cpp:673: Assertion `offset >= NextOffset && "adding fields out of order"' ยท Issue #43458 ยท apple/swift ยท GitHub

As you might imagine this is now a blocking bug for my project. I'd
really like to fix this as soon as humanly possible.

I also realize that, while a priority for me, it is may not be for
anyone else. With that in mind, my assumption is that if its going to be
fixed "soon" I probably need to fix it myself. Unfortunately, I have
little experience with this and would not know where to begin. Is there
anything I can read that might explain how to begin debugging the
compiler?

>
> > The log Xcode provided of the build error is attached. All of the
source
> > code that was used to trigger the error can be found here
> > (https://git.lovelett.me/castable/live\) on a branch called "swift".
> >
> > Should I file a bug for this or am I doing something wrong?
> >
> >
> >
> >
>
>
>
>
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users