Skip to content
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

Closed
quakec opened this issue Mar 16, 2019 · 17 comments
Closed

segmentation fault. #31

quakec opened this issue Mar 16, 2019 · 17 comments

Comments

@quakec
Copy link
Contributor

quakec commented Mar 16, 2019

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

}

^

@bartoszbielawski
Copy link
Owner

bartoszbielawski commented Mar 16, 2019 via email

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019

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.

@bartoszbielawski
Copy link
Owner

bartoszbielawski commented Mar 16, 2019 via email

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019 via email

@bartoszbielawski
Copy link
Owner

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.

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019 via email

@bartoszbielawski
Copy link
Owner

bartoszbielawski commented Mar 16, 2019 via email

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019 via email

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019 via email

@bartoszbielawski
Copy link
Owner

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.

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019 via email

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019 via email

@bartoszbielawski
Copy link
Owner

bartoszbielawski commented Mar 16, 2019 via email

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019 via email

@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019

I can't reproduce the crash after retarting my machine.

@quakec quakec closed this as completed Mar 16, 2019
@quakec
Copy link
Contributor Author

quakec commented Mar 16, 2019

  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 for the loop func.
Move loop to the bottom in the latest sample I sent you if you like :)

@bartoszbielawski
Copy link
Owner

bartoszbielawski commented Mar 16, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants