Author Topic: Segmentation fault error!  (Read 29405 times)

Offline maria03

  • Jr. Member
  • *
  • Posts: 9
Re: Segmentation fault error!
« Reply #15 on: October 08, 2014, 05:46:41 PM »

I tried with your modifies, i copy and paste your code in a new file .nasm, but always there is a segmentation fault.. Today i tried to reinstall VirtualBox but nothing is changed..

Offline maria03

  • Jr. Member
  • *
  • Posts: 9
Re: Segmentation fault error!
« Reply #16 on: October 08, 2014, 05:55:37 PM »
Hi Folks!

I think it fault's because of memory somewhere.

MOVUPS
Move four unaligned packed single-precision floating-point values between XMM registers or
between and XMM register and memory


So, do what ever you want, instruction movups will LOAD OR STORE 16 bytes FROM or TO memory.


i tried with movss [ebp+sum],xmm2 first but i have the the same error and, I tried also to comment this (and other function) and the error is still there.
At last i insert return matrice but nothing to do  :-[ :-[ :-[

Offline encryptor256

  • Full Member
  • **
  • Posts: 250
  • Country: lv
  • Win64 .
    • On Youtube: encryptor256
Re: Segmentation fault error!
« Reply #17 on: October 08, 2014, 05:57:53 PM »
Hi Folks!

I think it fault's because of memory somewhere.

MOVUPS
Move four unaligned packed single-precision floating-point values between XMM registers or
between and XMM register and memory


So, do what ever you want, instruction movups will LOAD OR STORE 16 bytes FROM or TO memory.


i tried with movss [ebp+sum],xmm2 first but i have the the same error and, I tried also to comment this (and other function) and the error is still there.
At last i insert return matrice but nothing to do  :-[ :-[ :-[

Try "movd [ebp+sum],xmm2"

EDIT:
Okay, movd looks like similar to movss.

I think you will get nowhere with this kind'a problem solving approach!

So, If I think a little, what should YOU do now...

Delete everything and Start ALL over again from scratch >> Homework failed!

[1]. Build or program an initial starting point of your algorithm\application. Define program structure.
[2]. Then slowly start  to make changes and test it.
[3]. If you get expected test results then, go on, go on - follow with your mind, advance, until you get expected final result.
[4]. If you get some error then back off to previous working version and investigate what caused error.
 
« Last Edit: October 08, 2014, 06:13:58 PM by encryptor256 »
Encryptor256's Investigation \ Research Department.

Offline maria03

  • Jr. Member
  • *
  • Posts: 9
Re: Segmentation fault error!
« Reply #18 on: October 08, 2014, 07:31:51 PM »
Ok, i tried to start a new code and it was ok, the result is right and everything is ok. But, when i shoot down the VirtualBox and i restarded it, the problem magically reappears! So, it's not a problem of address, of code, but it is a problem with VirtualBox. I think I try to install a version of Ubuntu in another partition of my pc or I think i use one of the pcs of my university..
Thanks a lot for all the answers and the support.
 :)

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Segmentation fault error!
« Reply #19 on: October 08, 2014, 07:55:06 PM »
Okay. I'll just mention that if I add "-Wall" to my gcc command line, it does pick up that problem that encryptor256 noted - creaMatrice doesn't return anything. I would have thought that would be an error. I never did figure out C!

Best,
Frank


Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 429
  • Country: us
Re: Segmentation fault error!
« Reply #20 on: October 09, 2014, 04:00:00 PM »
I'm a pretty heavy user of VirtualBox (currently 4.3.12 ) and haven't experienced issues that you have.  What version of VBox are you using?  I'm thinking you may have image corruption.  Do you check the SHA values after downloading VBox and the OS iso images?  If they match then what happens if you first delete and recreate the virtual machine and then run your program again?