Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
20 user(s) are online (14 user(s) are browsing Forums)

Members: 0
Guests: 20

more...

Support us!

Headlines

 
  Register To Post  

(1) 2 3 »
SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
This is a continuation of the discussion here:
http://www.amigans.net/modules/xforum ... t_id=65126#forumpost65126

@salass00

I have no idea why this discussion is in this thread, but...

Quote:
I think I'll be redoing the svg.datatype with libsvgtiny instead.


Did you ever do this? I've been poking the drawing.datatype this weekend and it's now in a basic working state where the majority of what libsvgtiny does can be pushed up to the superclass. So, I set aside the DR2D datatype and wrote an SVG one instead.

However, it crashes in pthread_open which is used by libxml2, with little explanation (although I assume it is some library or other that it thinks it has an interface for and actually doesn't). If you got your datatype to work with libsvgtiny, OR I guess the old one could have had the same issue if it used libxml2, do you know what it is looking for?

If I can get that working I might be in a position to release an early drawing/SVG datatype beta. Otherwise it'll be another two years before I look at it again.

On a related note, my SVG descriptor sucks because it seems to be lower down the food chain than the HTML one. How did you create your descriptor? (I might just be able to use it as-is, but it's linked to picture.datatype and I have no idea if that's a problem... dtdesc doesn't support drawing.datatype anyway of course)

Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
I vaguely remember this one. There was something about pthreads which was causing issues. At the time we didn't have access to the source code, etc. so it was difficult to move forward on it.

Well, times have changed. This may be a good time to revisit the issue.

We'll need as simple a test case as you can make for starters.

ExecSG Team Lead
Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
Quote:

I've been poking the drawing.datatype this weekend and it's now in a basic working state where the majority of what libsvgtiny does can be pushed up to the superclass. So, I set aside the DR2D datatype and wrote an SVG one instead.

I'm very curious about this "drawing.datatype" and whether you would like to consider contributing it to AmigaOS so it becomes an official component?

Do you have any documentation, etc?

ExecSG Team Lead
Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
@ssolie

There's no particular documentation, just an overview and some out-of-date implementation thoughts. At the moment the subclass sends drawing directions and attributes to the superclass (drawing.datatype), which creates a linked list that it can render. This is all working and tested via Multiview and a dummy subclass which just sends some built-in commands, and resizing Multiview's window resizes the drawing as expected. As per my first post in this thread, it is currently complete enough for the capabilities of libsvgtiny (except text), although the primary objective was intended to be to support the DR2D specification.

I would very much consider contributing it to AmigaOS, that's the main reason it's on OpenAmiga. In fact, I think datatypes.library might need some tweaks to support GID_DRAWING (to allow NewDTOject/ObtainDataType to filter for drawing.datatype subclasses), and dtdesc will need to be able to create descriptors that identify themselves as "draw" subclasses (required for the filtering I think).


As for the pthreads crash source code, unless somebody else already has something sensible that demonstrates the problem, I'll have to get back to you. It needs to be written as a library I think to get the problem to show, which increases the complexity of writing a simple test case.

Go to top
Re: SVG datatype/library linked pthreads problems
Just popping in
Just popping in


See User information
With regards the older svg datatype, when I was working on MindSpace, I always had trouble as soon as I wanted the datatype to render text. Other sorts of drawing/rendering were fine. Don't know if that's of any use or not.

Happiness is mandatory
Go to top
Re: SVG datatype/library linked pthreads problems
Just can't stay away
Just can't stay away


See User information
Quote:

Chris wrote:

However, it crashes in pthread_open which is used by libxml2


My build of libxml2 has threading disabled. I did that when xmoto was updated to use libxml2 instead of its own built-in tinyxml.

It would crash and I tracked it down to libxml2. There's a possibility that libxml2 with threading enabled may work when linked against programs coded in C instead of C++.

Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
Quote:

MickJT wrote:
My build of libxml2 has threading disabled. I did that when xmoto was updated to use libxml2 instead of its own built-in tinyxml.

It would crash and I tracked it down to libxml2. There's a possibility that libxml2 with threading enabled may work when linked against programs coded in C instead of C++.


I'm using C (hate C++), however I'm using an older build of libxml2, so I will try the latest.

Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
could you post the stacktrace?

i'm really tired...
Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
@afxgroup

This is linked dynamically but I got the same with the static version (I tried dynamic linking to see if it would solve it. It didn't.)

Symbol info:
Instruction pointer 0x6C7456A4 belongs to module "libpthread.so" (PowerPC)
Symbol: pthread_once + 0x38 in section 8 offset 0x00003478

Stack trace:
[source/linklib/lib.c:344] libpthread.so:pthread_once()+0x38 (section 8 @ 0x3478)
libxml2.so.9:xmlIsMainThread()+0x50 (section 11 @ 0x875B0)
libxml2.so.9:__xmlDefaultSAXHandler()+0x24 (section 11 @ 0x865BC)
libxml2.so.9:xmlDefaultSAXHandlerInit()+0x10 (section 11 @ 0xE0EA4)
libxml2.so.9:xmlInitParserCtxt()+0x34 (section 11 @ 0x86EC)
libxml2.so.9:xmlNewParserCtxt()+0x58 (section 11 @ 0x8B34)
libxml2.so.9:xmlCreateMemoryParserCtxt()+0x5c (section 11 @ 0xC8D4)
libxml2.so.9:xmlReadMemory()+0x2c (section 11 @ 0x23C10)
libsvgtiny.so.0:svgtiny_parse()+0x68 (section 7 @ 0x3894)
svg.datatype:ClassDispatch()+0x2d4 (section 6 @ 0x92C)
native kernel module intuition.library.kmod+0x00018178
native kernel module intuition.library.kmod+0x0001839c
native kernel module intuition.library.kmod+0x00008378
native kernel module intuition.library.kmod+0x0000810c
module LIBS:datatypes.library at 0x6FF427D8 (section 5 @ 0x27BC)
module LIBS:datatypes.library at 0x6FF41C94 (section 5 @ 0x1C78)
module SYS:Utilities/MultiView at 0x6C885108 (section 5 @ 0x30EC)
MultiView:_start()+0x10 (section 1 @ 0x10)
native kernel module dos.library.kmod+0x0002295c
native kernel module kernel+0x0003b630
native kernel module kernel+0x0003b6b0

Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
Some minor problems, but the new libxml2 works without error.

Resized Image

Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
I've fixed the drawing issue and made a beta available here: http://www.openamiga.org/?function=viewfiles&projectid=51

Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
Quote:

Some minor problems, but the new libxml2 works without error.

So does this mean there really is no problem with pthreads or did you just built it without threading support?

ExecSG Team Lead
Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
Quote:

ssolie wrote:
Quote:

Some minor problems, but the new libxml2 works without error.

So does this mean there really is no problem with pthreads or did you just built it without threading support?


That's built without threading support. With it pthreads crashes as per the above stack trace.

Go to top
Re: SVG datatype/library linked pthreads problems
Quite a regular
Quite a regular


See User information
@Chris

I'm just curious: Did you ever had a look at Henk Jonas amigametaformat.library (http://aminet.net/package/util/libs/amf_library) and/or his MetaView datatype (http://aminet.net/package/util/dtype/DT_MetaView)?

X1000|II/G4|440ep|2000/060|2000/040|1000
Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
Quote:

cha05e90 wrote:
@Chris

I'm just curious: Did you ever had a look at Henk Jonas amigametaformat.library (http://aminet.net/package/util/libs/amf_library) and/or his MetaView datatype (http://aminet.net/package/util/dtype/DT_MetaView)?


Yes, I used to use it under OS3. The DataType is a bit weird though, as it launches MetaView to render the graphic.

Actually MetaView works quite nicely on OS4, I used it for checking the output of svg2dr2d.

Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
Quote:

Chris wrote:
Quote:

ssolie wrote:
Quote:

Some minor problems, but the new libxml2 works without error.

So does this mean there really is no problem with pthreads or did you just built it without threading support?


That's built without threading support. With it pthreads crashes as per the above stack trace.

Gotcha. I'll see if I can squeeze some time in this weekend to look into that crash.

What I need is a reproducible test case. Can you please package up the software/code and the steps necessary to make that crash happen? I'd love to try and get to the bottom of this one but my time is limited.

ExecSG Team Lead
Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
@ssolie

I don't have the old static libxml2 anymore, but fortunately the old shared version was still on my hard drive, so I've re-linked svg.datatype to it.

http://homepage.ntlworld.com/cdyoung/tmp/svgdt_crash.lha

You'll need to copy the two .datatype files to SYS:Classes/DataTypes, and the contents of SObjs to SObjs:. Double-click on SVG and then double-click (or open into MultiView) rect1.svg. This should crash it.

I'm not sure how helpful the source is, since it only really calls svgtiny_parse and the rest cascades through various other libraries, but it's there anyway (dispatch.c is the important one).

Thanks for looking into this.

Go to top
Re: SVG datatype/library linked pthreads problems
Amigans Defender
Amigans Defender


See User information
@Chris, ssolie

I keep my fingers crossed for you to get the crash resolved! We really need to extend the datatype class set (and improve the entire datatypes infrastructure along the way).

Quote:
I think datatypes.library might need some tweaks to support GID_DRAWING (to allow NewDTOject/ObtainDataType to filter for drawing.datatype subclasses)

Absolutely.

Quote:
dtdesc will need to be able to create descriptors that identify themselves as "draw" subclasses

Some time ago I asked about dtdesc in the Hyperion forums. I was wondering if the OS dev team had sources to this tool because it's old and could do with an overhaul of the GUI (heck, I could even volunteer to do the job). The thread died out nevertheless.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: SVG datatype/library linked pthreads problems
Not too shy to talk
Not too shy to talk


See User information

http://aminet.net/package/dev/misc/MakeDT-1.3

Always worked perfectly for me. It's great to be included in makefiles. I don't understand why one would need a GUI.

Go to top
Re: SVG datatype/library linked pthreads problems
Just can't stay away
Just can't stay away


See User information
@Chris

I haven't done anything on svg.datatype using libsvgtiny yet.

You can find the descriptor file and the source files I used to generate it in the archive on OS4Depot (I used MakeDT.rexx to generate the descriptor file):
http://os4depot.net/index.php?functio ... datatype/image/svg_dt.lha

Go to top

  Register To Post
(1) 2 3 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project