-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segmentation fault. #31
Comments
Oh, that's interesting... It's the compiler that sigsegvd... Any more
details?
…On Sat, 16 Mar 2019, 21:29 James Gohl, ***@***.***> wrote:
When I use flag "2" I get the following error:
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino:
In function '_GLOBAL__sub_I_led':
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino:300:1:
internal compiler error: Segmentation fault
}
^
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#31>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AD2sEIKbKosQVPx6UZRQl8YPxJzoA2WKks5vXVQvgaJpZM4b4A5P>
.
|
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino: In function '_GLOBAL__sub_I_led': C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino:295:1: internal compiler error: Segmentation fault } ^ Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. lto-wrapper.exe: fatal error: C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc returned 1 exit status compilation terminated. c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed collect2.exe: error: ld returned 1 exit status exit status 1 |
Can you tell me what's in that line? I don't have sources now.
…On Sat, 16 Mar 2019, 21:32 James Gohl, ***@***.***> wrote:
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino:
In function '_GLOBAL__sub_I_led':
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino:295:1:
internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
lto-wrapper.exe: fatal error: C:\Program Files
(x86)\Arduino\hardware\tools\avr/bin/avr-gcc returned 1 exit status
compilation terminated.
c:/program files
(x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe:
error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD2sEHKh2jw36H2dyKlv24AObu4vWeP6ks5vXVTNgaJpZM4b4A5P>
.
|
I can't find '_GLOBAL__sub_I_led' anywhere.
295:1 ... } is the last brace in my example.ino file.
Here is the last function:
void writeNext()
{
byte asc = text[textIndex] - 32;
// We need to handle space character since ignoring whitespace.
if (asc == 0)
{
scrollWhitespace = SPACE_WIDTH;
// Force change to next character in text[].
if (textIndex++ == textLen - 1)
{
textIndex = 0;
scrollWhitespace = LEDMATRIX_WIDTH;
}
return;
}
// Not set for this character, so find start column.
if (colLower == -1)
{
for (int c = 0; c < CHAR_WIDTH; c++)
{
if (font[asc][c] != 0)
{
colLower = c;
colIndex = c;
break;
}
}
}
// Not set for this character, so find finish column.
if (colUpper == CHAR_WIDTH)
{
for (int c = CHAR_WIDTH - 1; c > -1; c--)
{
if (font[asc][c] != 0)
{
colUpper = c;
break;
}
}
}
// Write the column to the right of the display.
led.setColumn(LEDMATRIX_WIDTH - 1, font[asc][colIndex]);
// Check if end of current character.
if (colIndex++ == colUpper)
{
// Reset column start and finsh.
colLower = -1; colUpper = CHAR_WIDTH;
// Add whitespace.
scrollWhitespace = CHAR_SPACING;
// Check if end of text string.
if (textIndex++ == textLen - 1)
{
textIndex = 0;
scrollWhitespace = LEDMATRIX_WIDTH;
}
}
}
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
On Sat, 16 Mar 2019 at 20:47, Bartosz Bielawski <notifications@github.com>
wrote:
… Can you tell me what's in that line? I don't have sources now.
On Sat, 16 Mar 2019, 21:32 James Gohl, ***@***.***> wrote:
>
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino:
> In function '_GLOBAL__sub_I_led':
>
>
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino:295:1:
> internal compiler error: Segmentation fault
>
> }
>
> ^
>
> Please submit a full bug report,
>
> with preprocessed source if appropriate.
>
> See http://gcc.gnu.org/bugs.html for instructions.
>
> lto-wrapper.exe: fatal error: C:\Program Files
> (x86)\Arduino\hardware\tools\avr/bin/avr-gcc returned 1 exit status
>
> compilation terminated.
>
> c:/program files
>
(x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe:
> error: lto-wrapper failed
>
> collect2.exe: error: ld returned 1 exit status
>
> exit status 1
> Error compiling for board Arduino/Genuino Uno.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <
#31 (comment)
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AD2sEHKh2jw36H2dyKlv24AObu4vWeP6ks5vXVTNgaJpZM4b4A5P
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtJb3LfDyObdb_2y31sDS4RhYr6niwSks5vXVh2gaJpZM4b4A5P>
.
|
The problem with this "bug" is that it doesn't actually happen in the library. Can you try to run the set pixel example? This may tell us if the problem is in your code or in the library itself. |
I have removed the line that calls setColumn and it doesn't crash the
compiler... if that helps.
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
…On Sat, 16 Mar 2019 at 22:06, Bartosz Bielawski ***@***.***> wrote:
The problem with this "bug" is that it doesn't actually happen in the
library.
It's your compiler that critically fails (that is - crashes).
Can you try to run the set pixel example? This may tell us if the problem
is in your code or in the library itself.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtJb1PLOs4DgEQuuNGUwo7UwSChkUYzks5vXWrtgaJpZM4b4A5P>
.
|
Okay, let me look at setColumn.
I just made your example work. For ESP8266 it doesn't crash compiler.
1. Learn about forward declarations. (writeNext() is called from loop()
that is before writeNext()),
2. LEDMatrixDriver led(LEDMATRIX_SEGMENTS, LEDMATRIX_CS_PIN, 7);
This was my reason for class enums... You can write it like this but why
not:
flags = LEDMatrixDriver::INVERT_Y | ....? Then you don't need to explain
what does 7 mean.
BB
|
calling setPixel is working fine.
Within setColumn... something is wrong in the "value" part of this code
perhaps...?
setPixel(x, y, value & 1);
value >>= 1;
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
…On Sat, 16 Mar 2019 at 22:24, James Gohl ***@***.***> wrote:
I have removed the line that calls setColumn and it doesn't crash the
compiler... if that helps.
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
On Sat, 16 Mar 2019 at 22:06, Bartosz Bielawski ***@***.***>
wrote:
> The problem with this "bug" is that it doesn't actually happen in the
> library.
> It's your compiler that critically fails (that is - crashes).
>
> Can you try to run the set pixel example? This may tell us if the problem
> is in your code or in the library itself.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#31 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABtJb1PLOs4DgEQuuNGUwo7UwSChkUYzks5vXWrtgaJpZM4b4A5P>
> .
>
|
okay so nothing has changed in setColumn since the last working version
which is really odd
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
…On Sat, 16 Mar 2019 at 22:30, James Gohl ***@***.***> wrote:
calling setPixel is working fine.
Within setColumn... something is wrong in the "value" part of this code
perhaps...?
setPixel(x, y, value & 1);
value >>= 1;
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
On Sat, 16 Mar 2019 at 22:24, James Gohl ***@***.***> wrote:
> I have removed the line that calls setColumn and it doesn't crash the
> compiler... if that helps.
>
> Regards,
>
> James Gohl
>
> *Are you cyber streetwise?*https://www.cyberaware.gov.uk/
>
>
> On Sat, 16 Mar 2019 at 22:06, Bartosz Bielawski ***@***.***>
> wrote:
>
>> The problem with this "bug" is that it doesn't actually happen in the
>> library.
>> It's your compiler that critically fails (that is - crashes).
>>
>> Can you try to run the set pixel example? This may tell us if the
>> problem is in your code or in the library itself.
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#31 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/ABtJb1PLOs4DgEQuuNGUwo7UwSChkUYzks5vXWrtgaJpZM4b4A5P>
>> .
>>
>
|
So before you didn't use this method?
But as you have noticed yourself - there was no change. |
Ok also noticed something odd, the compiler crash is intermittent. Out of
10 compile and uploads, 5 of them failed with the crash, and they occur in
no particular pattern. Perhaps my Uno is faulty, unfortunately I only have
uno Uno ;)
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
…On Sat, 16 Mar 2019 at 22:37, Bartosz Bielawski ***@***.***> wrote:
So before you didn't use this method?
You can try to replace it with:
setPixel(x, y, value & 1 ? true: false);
value >>= 1;
But as you have noticed yourself - there was no change.
We can write it directly in the framebuffer but it shouldn't change
anything.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtJbzX1H562KQTuSzGwNFqyCzTxROymks5vXXIygaJpZM4b4A5P>
.
|
.... but then again, this is compiled on my machine first.
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
…On Sat, 16 Mar 2019 at 22:43, James Gohl ***@***.***> wrote:
Ok also noticed something odd, the compiler crash is intermittent. Out of
10 compile and uploads, 5 of them failed with the crash, and they occur in
no particular pattern. Perhaps my Uno is faulty, unfortunately I only have
uno Uno ;)
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
On Sat, 16 Mar 2019 at 22:37, Bartosz Bielawski ***@***.***>
wrote:
> So before you didn't use this method?
> You can try to replace it with:
>
> setPixel(x, y, value & 1 ? true: false);
> value >>= 1;
>
> But as you have noticed yourself - there was no change.
> We can write it directly in the framebuffer but it shouldn't change
> anything.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#31 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABtJbzX1H562KQTuSzGwNFqyCzTxROymks5vXXIygaJpZM4b4A5P>
> .
>
|
Maybe there was an update of the Arduino IDE? You can always try to compile
it online using this Arduino Create.
Or some other editor - VSC + PlatformIO or something...
|
Updated arduino ide, didn't seem to update gcc though and made no
difference in the crash results.
I reverted back to my version of the driver which *was* working fine for
every compile and now I'm getting the same crash results. How very odd.
I am going to guess the problem is at my end, why would I get intermitted
compiler results unless my ram is somehow corrupt?
Regards,
James Gohl
*Are you cyber streetwise?*https://www.cyberaware.gov.uk/
…On Sat, 16 Mar 2019 at 22:54, Bartosz Bielawski ***@***.***> wrote:
Maybe there was an update of the Arduino IDE? You can always try to compile
it online using this Arduino Create.
Or some other editor - VSC + PlatformIO or something...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtJb3CO-Lmif8Yaw2oQd_uvWtjIvumiks5vXXYzgaJpZM4b4A5P>
.
|
I can't reproduce the crash after retarting my machine. |
I know about forward declarations, yes anything that is called needs to be declared before, but gcc doesn't seem to care for the loop func. |
I'm pretty sure it's the Arduino editor that hides it from you. My compiler
(gcc for Tensilica Xtensa) certainly cares.
BB
niedz., 17 mar 2019 o 00:34 James Gohl <notifications@github.com>
napisał(a):
…
1. Learn about forward declarations. (writeNext() is called from
loop() that is before writeNext()),
I know about forward declarations, yes anything that is called needs to be
declared before, but gcc doesn't seem to care.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AD2sEJnr9fG6ACngUQzEMTtFjeUxGAt2ks5vXX-bgaJpZM4b4A5P>
.
|
In the Rotation branch... when I use flag "2" I get the following error:
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino: In function '_GLOBAL__sub_I_led':
C:\Users\Jam\Documents\Work\Arduino\MyProjects\MarqueeTextFast\MarqueeTextFast.ino:300:1: internal compiler error: Segmentation fault
}
^
The text was updated successfully, but these errors were encountered: