Ticket #1 (new defect)

Opened 1 year ago

Last modified 1 year ago

Can't load bitmap from memory with Tango

Reported by: CyberShadow Assigned to: Chris Miller
Priority: major Milestone:
Component: component1 Version:
Keywords: thecybershadow@gmail.com Cc:

Description

The straight-forward way to create a Picture using a bitmap file in memory (usually generated at runtime) is to use the Picture.this(DStream) constructor. However, this doesn't work due to some code in dfl.internal.com.DStreamToIStream.Read(): the code uses stm.input.read(...) instead of just stm.read(...). The bug is caused by the fact that the tango.io.Buffer.Buffer.this(void[] data) constructor doesn't initialize the "source" field, which causes the "input" getter used in the aforementioned code to return "null" and cause an access violation in DFL code.

Solution: replace stm.input.read with stm.read in abovementioned and other similar code.

Change History

01/27/08 18:08:51 changed by Anonymous

This was already fixed in the snapshots; however, since Buffer doesn't support seeking, it still doesn't work. I already filed a ticket with Tango about this.