It is currently 21 Nov 2018, 02:03
   
Text Size

Deck Builder (Mac) -- can't open the 2nd time

by Nate

Moderators: Snacko, CCGHQ Admins

Deck Builder (Mac) -- can't open the 2nd time

Postby crestfallen » 27 Jun 2008, 02:04

So this is a weird problem.

Info:
  • MacBook Pro
  • OS X 10.5.3
  • Newest java from apple.com/java
  • NDB 2.9.5a, downloaded here

I unzip the program and delete the .exe files, since I don't need them. I open the deckbuilder.jar file and everything is great. I modify some settings and create a deck. I save this deck to a network folder; I have it set up as an alias. The deck saves fine. I quit the deck builder.

The next time I open NDB, I get this error:

java.lang.UnsupportedOperationException: Unable to open this file type: 0
at mtg.deckbuilder.DecklistFile.getCards(DecklistFile.java:100)
at mtg.deckbuilder.DecklistFile.open(DecklistFile.java:76)
at mtg.deckbuilder.DeckBuilder.load(DeckBuilder.java:663)
at mtg.deckbuilder.DeckBuilder$3.run(DeckBuilder.java:511)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
I can reproduce this problem using the above sequence of steps every time. It even happens if I reinstall NDB and follow the above steps.

What do you think the problem is?
crestfallen
 
Posts: 7
Joined: 27 Jun 2008, 01:55
Has thanked: 0 time
Been thanked: 0 time

Re: Deck Builder (Mac) -- can't open the 2nd time

Postby Snacko » 27 Jun 2008, 11:42

NDB remembers the last opened file and tries to reopen it during the next start up.
In your case something with the path / filename goes wrong and it doesn't recognise the file extension.
Try this and report the error as it will include the filename and path NDB tries to access.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Re: Deck Builder (Mac) -- can't open the 2nd time

Postby crestfallen » 28 Jun 2008, 00:02

Thanks. Here's what I get when I run that version:

java.lang.UnsupportedOperationException: Unable to open this file type: 0
File name: Fires 1.0
Absolute path:/Volumes/Stuff/Games/Nate's Deck Builder/decks/Fires 1.0
at mtg.deckbuilder.DecklistFile.getCards(DecklistFile.java:100)
at mtg.deckbuilder.DecklistFile.open(DecklistFile.java:76)
at mtg.deckbuilder.DeckBuilder.load(DeckBuilder.java:663)
at mtg.deckbuilder.DeckBuilder$3.run(DeckBuilder.java:511)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
So apparently it doesn't like the network path at all, which is unfortunate. The /Stuff/Games/etc. is the network share. I have an alias set to /Games on this Mac. Looks like NDB is trying to locate this folder locally instead of on the network.

What's also interesting is that if it can't load the last deck, it prevents the card data from being loaded as well, so there are no cards to choose from or add to a deck.

Is the only solution to save locally, then copy over the network? That would suck having to manage two copies of each deck.
crestfallen
 
Posts: 7
Joined: 27 Jun 2008, 01:55
Has thanked: 0 time
Been thanked: 0 time

Re: Deck Builder (Mac) -- can't open the 2nd time

Postby Snacko » 28 Jun 2008, 10:02

The problem here lies with the extension or rather what the software thinks is an extension.
When you type a filename with a dot like "Fires 1.0", it thinks the 0 is the actuall extension and doesn't add the appropriate one.
If the extension isn't known then, it's not possible to determine which deck format is used.

I've changed the behaviour to always add the proper extension try this
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Re: Deck Builder (Mac) -- can't open the 2nd time

Postby crestfallen » 28 Jun 2008, 23:41

Wow, that was fast. I tried saving a deck to the network location, naming it this:
test deck 1.123
saved it, closed NDB. It re-opened the file perfectly on next launch. I tried it a few more times just in case, and it works!

Awesome job Snacko, and I really appreciate it. I have a question because I'm curious: when the next update for NDB comes out, will this "patch" be included, or will I need a custom version every time?
crestfallen
 
Posts: 7
Joined: 27 Jun 2008, 01:55
Has thanked: 0 time
Been thanked: 0 time

Re: Deck Builder (Mac) -- can't open the 2nd time

Postby Snacko » 29 Jun 2008, 13:03

I suppose it should be the default behaviour that if you select some deck format you get the proper extension so it can be loaded back, so it will stay that way.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Re: Deck Builder (Mac) -- can't open the 2nd time

Postby Huggybaby » 29 Jun 2008, 19:12

Cool, thanks Snacko.
User avatar
Huggybaby
Administrator
 
Posts: 3077
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 574 times
Been thanked: 572 times

Re: Deck Builder (Mac) -- can't open the 2nd time

Postby crestfallen » 29 Jun 2008, 22:16

Snacko wrote:I suppose it should be the default behaviour that if you select some deck format you get the proper extension so it can be loaded back, so it will stay that way.
Excellent. Cheers to all the folks who continue to update awesome software like this!
crestfallen
 
Posts: 7
Joined: 27 Jun 2008, 01:55
Has thanked: 0 time
Been thanked: 0 time

Re: Deck Builder (Mac) -- can't open the 2nd time

Postby Bog Wraith » 29 Jun 2008, 23:08

Welcome aboard crestfallen. Don't be a stranger!

As a fellow Mac user I'm glad to see that you got this corrected so quickly.

Our Snacko is sharp and fast on the draw, as you have witnessed.

He's picked up the ball that Nate passed on and he's running with it.

Thanks again Snacko for keeping this great app going! 8)
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
User avatar
Bog Wraith
Global Mod 1 (Ret)
 
Posts: 1080
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 395 times
Been thanked: 148 times


Return to Deck Builder and Excellent Rules Viewer

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 1 guest

Login Form