Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
10 user(s) are online (8 user(s) are browsing Forum)

Members: 0
Guests: 10

more...


Browsing this Thread:   1 Anonymous Users






Re: NewDTObjectA() extended error issue
#7
Home away from home
Home away from home


See User information
Thank you for the confirmation ncafferkey.

I've reported it to the ML.

Yes indeed, the previous question is now moot (unless it solves current problem )

Posted on: 2015/11/12 17:39
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: NewDTObjectA() extended error issue
#6
Home away from home
Home away from home


See User information
I get the same error while using the AROS-20151111-linux-i386-system and AROS-20151111-pc-i386-contrib packages together. Could you report this on the dev list please?

I'm assuming your previous question is moot now that the contrib package is up-to-date.

Posted on: 2015/11/12 13:03
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: NewDTObjectA() extended error issue
#5
Home away from home
Home away from home


See User information
Unable to test, v1 mingw nightly 11/11

sh
gcc testDT.c -o testDT
/Development/lib/gcc/i386-aros/4.6.4/libgcc.a: file not recognized: File format not recognized

Help ?

Posted on: 2015/11/11 20:37
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: NewDTObjectA() extended error issue
#4
Home away from home
Home away from home


See User information
Well, at least now, when i do:
testDT testDT

i receive the following output:
Quote:

load file testDT as datatype
lasterr = 212
object is not of required type


Which would indicate that your fix improved the previous encountered situation

BTW: i tested only on 68k for now (not hosted v1).
If i install aros hosted v1 nightly and overwrite development with that from boot-iso from 07/11 (last available build) should that work when compiled natively ?

Posted on: 2015/11/11 1:50
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: NewDTObjectA() extended error issue
#3
Home away from home
Home away from home


See User information
Thank you very much for having taken a look and attempt to improve things ncafferkey.

It isn't a shop-stopper perse, as the return-value does tell me that the loaded file doesn't return a valid object, so error checking can be done.

It was in light of the workbench backdrop load failures, that i wanted to make a small helpful utility that would show exactly why that (sometimes) fails, expressing the exact reason to user/tester.

Having a 'fix' for V1 would be good enough, as that is where things seems to go wrong atm.

I'll try to check things out after new nightly has build.

Thanks again, appreciated.

Posted on: 2015/11/9 19:36
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: NewDTObjectA() extended error issue
#2
Home away from home
Home away from home


See User information
I think you're right. The handling of IoErr()/SetIoErr() is sloppy in that function. I've committed a fix for ABIv1 in SVN r51208. However, I haven't tested that the right error condition is definitely passed through in your situation, and there may be other places where it was assumed that IoErr() would still contain a meaningful error that I'm not aware of.

EDIT: can you work around the bug in ABIv0 for now, or is it a show stopper?

Posted on: 2015/11/9 19:18
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


NewDTObjectA() extended error issue
#1
Home away from home
Home away from home


See User information
Why does following code not return an error number for IoErr() when loading unsupported file-type ?

int main (void)
{
  
struct RDArgs *rdargs;
  static 
struct { char *filename; } args = {NULL};
  
Object *o;
  
SIPTR lasterr;

  if ( 
rdargs = ReadArgs ((CONST_STRPTR)"FILE/A",(APTR)&args,NULL) )
  {
    
printf("load file %s as datatypen", args.filename);
    if ( 
o = NewDTObject ( args.filename,DTA_GroupID,GID_PICTURE,TAG_END ) )
    {
      
printf ("datatype was created successfullyn");
      
DisposeDTObject (o);
    } 
  }

  
lasterr = IoErr();
  
printf ( "lasterr = %ldn",lasterr );
  
PrintFault (lasterr, NULL);

  return 
0;
}


because, according to reference:
Quote:

Result
A BOOPSI object. This may be used in different contexts such as a gadget or image. NULL indicates failure -- in that case IoErr() gives more information:

ERROR_REQUIRED_ARG_MISSING -- A required attribute wasn't specified.

ERROR_BAD_NUMBER -- The group ID specified was invalid.

ERROR_OBJECT_WRONG_TYPE -- Object data type doesn't match DTA_GroupID.



Looking at the AROS sources for both v1 and latest V0 trunk from deadwood, i am able to locate the code that should apply to my situation, and shows that indeed it does a SetIoErr(ERROR_OBJECT_WRONG_TYPE).

Maybe i'm dense in my analysis, but the code seems to continue after that.

Since i've not suplied a DTA_DataType attribute it will skip that part. Also the BaseName seems not set, so that part would also be skipped.

But then the code does this check: if(dtobj == NULL) which would apply.

Looking at the code that gets performed when that if-statement is true i can see all kind of operations that could mess with IoErr() value, such as UnLock() and CloseIFF(). (i haven't pursued called routines tough).

Help ?

Posted on: 2015/11/7 5:31
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project